amd64/144448: sin() broken in libm on amd64
das at FreeBSD.ORG
Thu Mar 4 19:39:20 UTC 2010
Computing the sin() of very large values in floating point is
generally not a good idea because fixed-width floating point
formats can't express large input operands accurately enough to
get a useful result. For example, even with a perfect sin()
implementation, the sin of pi*10^12 and the sin of pi*10^12 + 1
will be identical in double precision because the inputs will
be rounded to the same value. You're getting different results
in bc because the inputs aren't rounded to double precision.
The amd64 implementation of sin() should produce very accurate
results subject to the limitation described above. The i386
implementation is optimized and may produce less accurate
results, particularly for inputs > 2^64 or so.
More information about the freebsd-standards