in reply to Windows / Linux puzzler
I can't spot the exact problem but I suspect a floating point problem. I suggest you follow the advice from perldoc int and use the POSIX::floor instead:
From the docs:
...For example, int(-6.725/0.025) produces -268 rather than the correct -269; that's because it's really more like -268.99999999999994315658 instead. Usually, the sprintf, printf, or the POSIX::floor and POSIX::ceil functions will serve you better than will int.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Windows / Linux puzzler
by lbrandewie (Acolyte) on Mar 23, 2020 at 20:32 UTC | |
by syphilis (Archbishop) on Mar 23, 2020 at 22:47 UTC | |
by ikegami (Patriarch) on Mar 25, 2020 at 18:45 UTC | |
by syphilis (Archbishop) on Mar 26, 2020 at 02:25 UTC | |
by ikegami (Patriarch) on Mar 26, 2020 at 21:36 UTC | |
| |
by lbrandewie (Acolyte) on Mar 24, 2020 at 06:42 UTC | |
by syphilis (Archbishop) on Mar 24, 2020 at 08:54 UTC |