[squeak-dev] ArbitraryPrecisionFloat ln and exp (was: Re:
LargeInteger benchmarks?)
Andreas Raab
andreas.raab at gmx.de
Sat Mar 22 04:12:35 UTC 2008
nicolas cellier wrote:
> You could try using tests from ArbitraryPrecisionFloat at squeak source
> http://www.squeaksource.com/ArbitraryPrecisionFl/.
One thing that was interesting when I was running the tests is that the
failed for both testExpLn and testLnVsFloat. It seems like either fdlibm
or your code is off by one bit. For example:
(1 asArbitraryPrecisionFloatNumBits: 53) exp asFloat hex
=> '4005BF0A8B145769'
1 asFloat exp hex
=> '4005BF0A8B14576A'
(3 asArbitraryPrecisionFloatNumBits: 53) ln asFloat hex
=> '3FF193EA7AAD030B'
3 asFloat ln hex
=> '3FF193EA7AAD030A'
Any ideas what could cause this? I would have expected these two to
agree on the result.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|