Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Decimal Floating Point (DFP) and does Perl needs DFP?

by raiph (Deacon)
on Jan 20, 2015 at 05:50 UTC ( [id://1113833]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Decimal Floating Point (DFP) and does Perl needs DFP?
in thread Decimal Floating Point (DFP) and does Perl needs DFP?

Comparing a 2014.08 Rakudo with Perl 5.20 running the rat_mul_div_cancel micro benchmark showed "Rat (rational number) support is 6x faster than Perl 5".

To quote the user doc for Rat:

"To prevent the numerator and denominator from becoming pathologically large, the denominator is limited to 64 bit storage. On overflow of the denominator a Num (floating-point number) is returned instead."

and

"If you want arbitrary precision arithmetic with rational numbers, use the FatRat type instead."

  • Comment on Re^3: Decimal Floating Point (DFP) and does Perl needs DFP?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found