in reply to bignum frustration

use bignum; $foo = 12345.6789; $bar = $foo->copy()->bfround(0)->bfround(-5); $baz = $foo - $bar; print "what's wrong here? $foo - $bar = $baz\n"; $byhand = 12345.6789 - 12345; print "expected $byhand\n";
Gives:
what's wrong here? 12345.6789 - 12346.00000 = -0.32110 expected 0.6789
Seems to me that the precision is propagated to the result value, and -0.32 rounds up to zero in your original example.