[squeak-dev] fdlibm 1.0 exp is not the closest approximation of E

Igor Stasenko siguctua at gmail.com
Mon Dec 27 21:28:15 UTC 2010


On 27 December 2010 20:09, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com> wrote:
> It seems that
>    1.0 exp = (Float classPool at: #E)
> is now false with the fdlibm version, at leat on Cog/MacOSX.
>

tried on both John's 5.8b12
and own-built Cog VM , it returns true in both cases.
Maybe my image is obsolete and E is different there?

(Float classPool at: #E) at: 1
1074118410

(Float classPool at: #E) at: 2
 2333366121

> (Float classPool at: #E) is the closest Float approximation of e,
> which you can check with:
> (1.0 asArbitraryPrecisionFloatNumBits: 200) exp asFloat = (Float
> classPool at: #E)
>
> It's bad that fdlibm be able to compute (1.0e32 cos) with less than
> 1/2 ulp error, but (1.0 exp) with more than 1/2 ulp !
>

Nicolas, how about writing own float math plugin?
You , among all of us seems care about float math most. So how about
getting your hands dirty with some C hacking?
:)

> Nicolas
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list