Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Bad math

by moritz (Cardinal)
on Oct 31, 2011 at 15:08 UTC ( #934901=note: print w/replies, xml ) Need Help??

in reply to Bad math

FWIW Perl 6 solves this problem by doing math in rational numbers by default:

$ perl6 -e 'say -53.80 + 46.70' -7.1

See also: What Every Computer Scientist Should Know About Floating-Point Arithmetic and rats and other pets.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://934901]
[stevieb]: use metamod::DateTime. Don't fsck around. Seriously. As someone who's done sensitive date/time stuff, don't roll your own. Use what is available and known stable. Do not guess.
[stevieb]: Date::Time even
[stevieb]: ffs I can't make DateTime link properly, so there.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2017-04-29 04:19 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.