sercantutar / infint

Arbitrary-Precision Integer Arithmetic
http://sercantutar.github.io/infint/
198 stars 48 forks source link

log2 and log10 operations #22

Open jordanrye opened 5 years ago

jordanrye commented 5 years ago

These changes address the enhancement request #12. Added functions to calculate log2() and log10() of large integers. Descriptions were also added to README.txt.

EDIT: Please note I also included the additions from @JC-labs and @felipebnn, as I used their updated versions of InfInt in another project.

ofekih commented 5 years ago

Am I just crazy, or is JC-lab's commit wrong.

InfInt operator/(char const* lhs, InfInt const& rhs) { return rhs / lhs; }

Wouldn't that do the opposite division as what's intended?