UNPKG

double-double

Version:

Pure double-double precision functions *with strict error bounds*.

15 lines (10 loc) 244 B
function extractExp(s: string) { const idx = s.indexOf('e'); let exp = 0; if (idx !== -1) { exp = Number(s.slice(idx + 1)); s = s.slice(0, idx); } return { s, exp }; } export { extractExp }