update break_infinity.js from upstream

This commit is contained in:
garnet420 2019-04-01 16:50:23 -04:00
parent f1b3a7d2dd
commit def1ba642d
2 changed files with 75 additions and 75 deletions

View File

@ -1241,7 +1241,7 @@
if (Number.isSafeInteger(temp)) {
newMantissa = Math.pow(this.mantissa, numberValue);
if (isFinite(newMantissa)) {
if (isFinite(newMantissa) && newMantissa != 0) {
return ME(newMantissa, temp);
}
} // Same speed and usually more accurate.
@ -1251,7 +1251,7 @@
var residue = temp - newExponent;
newMantissa = Math.pow(10, numberValue * Math.log10(this.mantissa) + residue);
if (isFinite(newMantissa)) {
if (isFinite(newMantissa) && newMantissa != 0) {
return ME(newMantissa, newExponent);
} // return Decimal.exp(value*this.ln());
// UN-SAFETY: This should return NaN when mantissa is negative and value is non-integer.

File diff suppressed because one or more lines are too long