mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-29 03:18:50 +00:00
Fixes #1529. Fixed: Incorrect CPDecimalNumber result for 220000/220.
And in general divisions where the quotient had fewer digits than the dividend when disregarding exponent would fail. We want to stop dividing when we've gone over all the digits in the dividend and the remainder is 0.
This commit is contained in:
1 parent
82e2c7a0e8
commit
8aaf298466
1 file changed
+1
-1
@@ -765,7 +765,7 @@ function _SimpleDivide(result, leftOperand, rightOperand, roundingMode)
|
||||
|
||||
n1._mantissa = [];
|
||||
|
||||
while ((k < leftOperand._mantissa.length) || (n1._mantissa.length
|
||||
while ((used < leftOperand._mantissa.length) || (n1._mantissa.length
|
||||
&& !((n1._mantissa.length == 1) && (n1._mantissa[0] == 0))))
|
||||
{
|
||||
while (CPOrderedAscending == CPDecimalCompare(n1, rightOperand))
|
||||
|
||||
Reference in new issue
Block a user