in reply to Behaviour of int() unexpected
Otherwise you get what you did not expect:D:\>perl -le "$x = 8.95 * 100; print int($x);" 895
(For some precisions, the closest binary approximation of 8.95 is less than 8.95, for other precisions it's greater than 8.95.)D:\>perl -le "$x = 8.95 * 100; print int($x);" 894
Cheers,D:\>perl -V:nvtype nvtype='long double';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Behaviour of int() unexpected
by pryrt (Abbot) on Mar 10, 2025 at 23:47 UTC | |
by syphilis (Archbishop) on Mar 11, 2025 at 03:02 UTC |