Correct sqrt initial estimate

pull/169/head
Michael Mclaughlin 4 years ago
parent 11699c1d1c
commit e70384ea7e

@ -1728,7 +1728,7 @@
e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);
if (s == 1 / 0) {
n = '1e' + e;
n = '5e' + e;
} else {
n = s.toExponential();
n = n.slice(0, n.indexOf('e') + 1) + e;

@ -1724,7 +1724,7 @@ P.squareRoot = P.sqrt = function () {
e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);
if (s == 1 / 0) {
n = '1e' + e;
n = '5e' + e;
} else {
n = s.toExponential();
n = n.slice(0, n.indexOf('e') + 1) + e;

Loading…
Cancel
Save