mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-09-20 11:01:45 +00:00
update break_infinity.js from upstream
This commit is contained in:
parent
f1b3a7d2dd
commit
def1ba642d
|
@ -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.
|
||||
|
|
2
javascripts/lib/break_infinity.min.js
vendored
2
javascripts/lib/break_infinity.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user