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

Re^2: Okay! What!?!?!?

by moritz (Cardinal)
on Apr 23, 2014 at 05:10 UTC ( #1083275=note: print w/ replies, xml ) Need Help??


in reply to Re: Okay! What!?!?!?
in thread Okay! What!?!?!?

Clearly, this is just a prototypical example of why you can never (in any programming language other than COBOL) test a fractional number for “exact equality.”

Only if by "fractional number" you actually mean floating-point number. It works fine with actual fractional numbers:

$ perl6 -e 'say 10 + 14.4 - 10 == 14.4' True

(Perl 6 stores those as actual fractions, and does exact math with them; you only get floating points if the fractions overflow, or if you request them with the scientific notation 14.4e0).

Replies are listed 'Best First'.
Re^3: Okay! What!?!?!?
by Anonymous Monk on Apr 24, 2014 at 02:25 UTC
    He said "programming language," not multi-decade performance art. COBOL has users.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2016-06-25 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (323 votes). Check out past polls.