From: Gabriel D. R. <gd...@in...> - 2009-08-01 17:26:19
|
On Fri, Jul 31, 2009 at 7:21 PM, Harald Hanche-Olsen<ha...@ma...> wrote: > + Leo <sd...@gm...>: > >> In sbcl 1.0.22 and 1.0.27: >> >> (cos 100000000000000000000000000000000) returns 0.0 >> >> In R, it returns -0.4909367. >> >> Is this a bug? > > Yes, that is a bug (in R): The correct answer is more like -.92073138. > > Jokes aside, I think it is clearly unreasonable to expect sbcl to be > able to return a good approximation because doing so requires > knowledge of pi to thirty-some decimal places. I can't seem to find > anything in the hyperspec specifying what the trigonometric functions > should do when given huge numbers. Right, the hyperspec does not require a useful Lisp implementation. -- Gaby |