Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Sbcl-help] SIN on Darwin

 [Sbcl-help] SIN on Darwin From: Pascal J.Bourguignon - 2004-02-04 20:57:37 ```I've just compiled sbcl 0.8.7 on Darwin naiad.informatimago.com 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc, which went well. In irrat.pure.lisp, the tests fail on (SIN (* 8 (/ PI 2))) which returns: -4.898425415289509d-16 on Linux/ix86 but returns: -4.898587196588413d-16 on Darwin/ppc750. which is wrong in both cases: sin(8pi/2)=sin(4pi)=sin(2*2pi)=sin(0)=0. So I guess it does not matter that the eleventh significant digit differ if the first is wrong! Instead of testing against a string representation of the computed value, it would be much better to test sanely for a floating point number: (assert (and (< (abs (sin (* 8 (/ pi 2)))) 1d15) (equal (print1-to-string -4.898425415289509d-16) "-4.898425415289509d-16"))) instead of: (assert (equal (print1-to-string (sin (* 8 (/pi 2)))) "-4.89whateverD-16")) And similarly for some other tests involving floating point or complex floating point numbers... -- __Pascal_Bourguignon__ http://www.informatimago.com/ There is no worse tyranny than to force a man to pay for what he doesn't want merely because you think it would be good for him.--Robert Heinlein http://www.theadvocates.org/ ```

 [Sbcl-help] SIN on Darwin From: Pascal J.Bourguignon - 2004-02-04 20:57:37 ```I've just compiled sbcl 0.8.7 on Darwin naiad.informatimago.com 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc, which went well. In irrat.pure.lisp, the tests fail on (SIN (* 8 (/ PI 2))) which returns: -4.898425415289509d-16 on Linux/ix86 but returns: -4.898587196588413d-16 on Darwin/ppc750. which is wrong in both cases: sin(8pi/2)=sin(4pi)=sin(2*2pi)=sin(0)=0. So I guess it does not matter that the eleventh significant digit differ if the first is wrong! Instead of testing against a string representation of the computed value, it would be much better to test sanely for a floating point number: (assert (and (< (abs (sin (* 8 (/ pi 2)))) 1d15) (equal (print1-to-string -4.898425415289509d-16) "-4.898425415289509d-16"))) instead of: (assert (equal (print1-to-string (sin (* 8 (/pi 2)))) "-4.89whateverD-16")) And similarly for some other tests involving floating point or complex floating point numbers... -- __Pascal_Bourguignon__ http://www.informatimago.com/ There is no worse tyranny than to force a man to pay for what he doesn't want merely because you think it would be good for him.--Robert Heinlein http://www.theadvocates.org/ ```