Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: modulus and floating point numbers

by BrowserUk (Patriarch)
on Nov 18, 2008 at 03:34 UTC ( #724186=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [0] Perl> print fmod( $_, 100 ) for 12300, 12301, 12399, .00001;;
    0
    1
    99
    1e-005
    
  2. or download this
    [0] Perl> print fmod( $_, 1 ) for map{ ($_, -$_ ) } 12300, 12301, 1239
    +9, .00001;;
    0
    ...
    0
    1e-005
    -1e-005
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-07-01 23:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (102 votes). Check out past polls.

    Notices?