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

Re^6: test fails on 64bit uselongdouble Perl

by kubrat (Scribe)
on Oct 30, 2009 at 10:21 UTC ( #804123=note: print w/ replies, xml ) Need Help??


in reply to Re^5: test fails on 64bit uselongdouble Perl
in thread test fails on 64bit uselongdouble Perl

$ perl -e'printf "%.0f\n", $_ for 5.4999999999, 5.5' 5 6

I don't get what's the problem with the above. The output is what I would expect.


Comment on Re^6: test fails on 64bit uselongdouble Perl
Download Code
Re^7: test fails on 64bit uselongdouble Perl
by ikegami (Pope) on Oct 30, 2009 at 14:48 UTC

    The point is that a infinitely small floating point error can change the result by 1.0

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-04-01 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (678 votes), past polls