in reply to Why the Integer part of this calculation is 102?
$ perl -e 'printf "%.20f\n", 42435.3408/411.9936' 102.99999999999998578915
This is smaller than 103, so int rounds down to 102. You'll have to use proper rounding.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why the Integer part of this calculation is 102?
by alokam (Initiate) on Mar 22, 2010 at 21:46 UTC | |
by almut (Canon) on Mar 22, 2010 at 21:58 UTC | |
by ikegami (Patriarch) on Mar 22, 2010 at 21:56 UTC | |
by moritz (Cardinal) on Mar 22, 2010 at 22:18 UTC | |
by alokam (Initiate) on Mar 23, 2010 at 19:13 UTC |