Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Re: Re: Fix floats like you do in your head

by toma (Vicar)
on Dec 27, 2002 at 06:48 UTC ( #222489=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Fix floats like you do in your head
in thread Fix floats like you do in your head

I agree with the Math::SnapTo decision, it didn't seem consistent with your standard of coding excellence!

IIRC some ancient Intel hardware used to keep something like 80 bits of internal precision, and this was typically rounded to 64 bit IEEE by most compilers in some but not all operations. In this case, internal precision was a huge win!

When testing multi-platform floating point test code, it is often convenient to account for rounding differences on different platforms. A form of diff called ndiff has been created to "compare putatively similar files, ignoring small numeric differences." I think ndiff would be a useful perl module!

It should work perfectly the first time! - toma

  • Comment on Re: Re: Re: Fix floats like you do in your head

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://222489]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2023-09-22 14:38 GMT
Find Nodes?
    Voting Booth?

    No recent polls found