You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
/** Format the number in exponential notation. */void_formatExponential(num number) {
if (number ==0.0) {
_formatFixed(number);
_formatExponent(0);
return;
}
var exponent = (log(number) /log(10)).floor();
var mantissa = number /pow(10.0, exponent);
var minIntDigits = minimumIntegerDigits;
if (maximumIntegerDigits >1&& maximumIntegerDigits > minimumIntegerDigits)
{
// A repeating range is defined; adjust to it as follows.// If repeat == 3, we have 6,5,4=>3; 3,2,1=>0; 0,-1,-2=>-3;// -3,-4,-5=>-6, etc. This takes into account that the// exponent we have here is off by one from what we expect;// it is for the format 0.MMMMMx10^n.while ((exponent % maximumIntegerDigits) !=0) {
mantissa *=/* severe: StaticTypeError */10;
exponent--;
}
minIntDigits =1;
} else {
// No repeating range is defined, use minimum integer digits.if (minimumIntegerDigits <1) {
exponent++;
mantissa /=/* severe: StaticTypeError */10;
} else {
exponent -= minimumIntegerDigits -1;
mantissa *=pow(10, minimumIntegerDigits -1);
}
}
_formatFixed(mantissa);
_formatExponent(exponent);
}
The text was updated successfully, but these errors were encountered:
Repro steps from number_format.dart in intl
The text was updated successfully, but these errors were encountered: