Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: RFC: Large Floating Point Numbers - Rounding Errors

by salva (Canon)
on Sep 08, 2011 at 15:57 UTC ( [id://924846]=note: print w/replies, xml ) Need Help??


in reply to RFC: Large Floating Point Numbers - Rounding Errors

SPARC has support for a quadruple precision floating-point format (though, actually not implemented in hardware but emulated by software) that can be used from perl enabling the long-double flag at compilation time.

Though, as it is described in the documented linked by the AnonMonk above, rounding errors will still happen because the sets of numbers that can be represented in base 2 floats and in base 10 floats are different.

Also, it should be possible to develop a C/XS math library for fixed-length float-point with base 10 exponent representation of numbers that would be faster than Math::BigFloat that uses a variable length representation. For your particular case, a fixed-point representation may also work.

  • Comment on Re: RFC: Large Floating Point Numbers - Rounding Errors

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 22:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found