You changed
$s += $k / ($n-$k);
to
$s += ($n + 1 - $i) / $i;
The "+ 1" has the same effect as the "1 *" the OP used in his fixed version. Just like him, your $n and $i are plain integers, not big ints.
In reply to Re^2: issues using bigrat
by ikegami
in thread issues using bigrat
by pc88mxer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |