I'm calculate sin by table.
Example fragment code bellow
.... #define Tabl_acos 0x80000000 ... ... double tsin (double arg) { double argout; unsigned int *adr;
adr = (unsigned int *)((unsigned int)Tabl_sin + (unsigned int)fabs(arg)*400); argout = *(double *)adr; return (argout); }
If I'm write ... + (unsigned int)fabs(arg)*400) -> result correct, but (arg) lose fraction right part and argout lose precition. If I'm write ... + (unsigned int)(fabs(arg)*400)) -> result incorrect! argout = fantastic value!!!