John Randall wrote:
Roger Hui wrote:
It is false that (sin +&*: cos) y not equal to 1
implies that sin y or cos y or both are wrong.
Here's a floating-point example:
u=:0.17211988309608894
1=!.0 (cos +&*: sin) u
0
If c and s are estimates for cos(y) and sin(y) with error less than e,
where e^2 is negligible, (c +&*: s) is an estimate for 1 with error
less than 2*e*(cos(y)+sin(y))<:e*2^3r2. So even if c and s are
accurate to 1 ULP, there is no guarantee that (c +&*: s) will be.
I would not trust those ephemerides for space travel.
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
1-(cos +&*: sin) u
1.11022e_16
Looks like its very close to 1 to me. If you need better than 15 place
precision use another tool.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm