Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

64-bit division anomolies (Solved.)

by BrowserUk (Patriarch)
on Feb 16, 2015 at 19:45 UTC ( [id://1116920]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\test>\perl5.18\perl\bin\perl.exe -le"printf qq[%f : %f\n], $_ % 10,
    + ( $_ / 10 ) for 9_000_000_000_000_000_011, 10_000_000_000_000_000_01
    +1"
    1.000000 : 900000000000000000.000000
    1.000000 : 1000000000000000000.000000
    
  2. or download this
    C:\test>\perl5.18\perl\bin\perl.exe -Minteger -le"printf qq[%u : %u\n]
    +, $_ % 10, ( $_ / 10 ) for 9_000_000_000_000_000_011, 10_000_000_000_
    +000_000_011"
    1 : 900000000000000001
    ...
    C:\test>\perl5.18\perl\bin\perl.exe -Minteger -le"printf qq[%d : %d\n]
    +, $_ % 10, ( $_ / 10 ) for 9_000_000_000_000_000_011, 10_000_000_000_
    +000_000_011"
    1 : 900000000000000001
    -5 : -844674407370955160
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found