New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format with fixed notation not working for very large values #291

josdejong opened this Issue Feb 28, 2015 · 0 comments


None yet
1 participant

josdejong commented Feb 28, 2015

var x = 1e+27;

console.log(math.format(x, {notation: 'fixed'}));
// output: "1e+27"
// expected: "1000000000000000000000000000"

console.log(math.format(x, {notation: 'auto', exponential: {lower: 1e-100, upper: 1e+100}}));
// output: "1e+27"
// expected: "1000000000000000000000000000"

This has to do with the 21 digit limit of JavaScripts toPrecision function.

Would be nice to support fixed notation for very large values too.

@josdejong josdejong added the bug label Feb 28, 2015

@josdejong josdejong closed this in 3b8eff0 Mar 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment