We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dea09f9 commit f8a72e5Copy full SHA for f8a72e5
runtime/stdlib.js
@@ -619,7 +619,7 @@ function caml_format_float (fmt, x) {
619
var p = prec;
620
if (exp < 0) { p -= exp + 1; s = x.toFixed(p); }
621
else while (s = x.toFixed(p), s.length > prec + 1) p--;
622
- if (p) {
+ if (p && ! (s.indexOf('e') > 0)) {
623
// remove trailing zeroes
624
var i = s.length - 1; while (s.charAt(i) == '0') i--;
625
if (s.charAt(i) == '.') i--;
0 commit comments