Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Reasons for Using Perl 6

by Laurent_R (Canon)
on Dec 23, 2017 at 20:24 UTC ( #1206123=note: print w/replies, xml ) Need Help??


in reply to Re^4: Reasons for Using Perl 6
in thread Reasons for Using Perl 6

Perl 6 is using the Rat type to represent rational numbers, such as 1/3, 23/7, .564, etc. With such numbers, calculations made with the four basic operators are generally accurate. This is because the Rat type represents rationals with two integers, one for the numerator and one for the denominator.

When using irrational numbers, such as square root of 2, or trigonometric functions, then Perl 6 is forced to use floating-point arithmetic and suffers from the same drawbacks as other programming languages.

So Perl 6 can do simple interest calculations accurately, but for compound interest calculations, it would fall back on floating-point arithmetic (and its flaws) for most common cases (although it is often possible to work around this if needed).

I agree with your point about Perl and speed not being necessarily mutually exclusive. Even though I am dealing with huge volumes of data (so speed is important to me), I have never needed to actually use things such as Inline::C at $work.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1206123]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2018-07-17 22:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (379 votes). Check out past polls.

    Notices?