Re: (cos (scale-float 1d0 120)) incorrect

Sam Steingold <[email protected]>
Newsgroups gmane.lisp.clisp.devel
Message-ID <[email protected]>
Please file a bug report on SF.net.
Thanks.

> * Raymond Toy <[email protected]> [2013-11-19 13:49:56 -0800]:
>
> Clisp 2.49 on a Linux Ubuntu box says:
>
> [1]> (cos (scale-float 1d0 120))
> 1.0d0
>
> The true answer is closer to -0.92.  Cmucl and ccl produce this
> answer.  Maxima says this is the correct answer.
>
> I think the issue is that pi reduction is not done to full precision.
>
> Using long-floats, clisp still produces 1L0, but making
> long-float-digits 128 gives the correct answer.
>
> Note also that (scale-float 1d0 120) can be represented exactly as an
> IEEE754 double precision value, and that IEEE754 doubles are not
> approximations.  They are exact rationals (of a certain form).
>
> Ray
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing 
> conversations that shape the rapidly evolving mobile landscape. Sign up now. 
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> clisp-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/clisp-devel
>

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1265
http://www.childpsy.net/ http://honestreporting.com http://ffii.org
http://www.PetitionOnline.com/tap12009/ http://iris.org.il http://dhimmi.com
nobody's life, liberty or property are safe while the legislature is in session

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.