peterolson / BigInteger.js

An arbitrary length integer library for Javascript
The Unlicense
1.12k stars 187 forks source link

added log() and log10 functions #224

Open wopperer opened 2 years ago

wopperer commented 2 years ago

ok do you want me to just return the number? return s.length + Math.log10("0."+s.substring(0,15));

peterolson commented 2 years ago

Logarithms are not integer operations, I'm not sure they fit the scope of this library.

wopperer commented 2 years ago

That's sad if they don't fit here, because there are numerous use cases (like astronomical calculations) where you need logarithms of big integers, and they are not supported by ECMA yet.