in reply to modulus and floating point numbers
Whether it's faster or not you'll have to determine yourself, but it's another way:
use POSIX qw[ fmod ];; print fmod( $_, 100 ) for 12300, 12301, 12399;; 0 1 99
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: modulus and floating point numbers
by dextius (Monk) on Nov 18, 2008 at 03:15 UTC | |
by BrowserUk (Patriarch) on Nov 18, 2008 at 03:34 UTC |