cppalliance / decimal

A C++14 implementation of IEEE 754 decimal floating point numbers
https://cppalliance.org/decimal/decimal.html
Boost Software License 1.0
17 stars 1 forks source link

Improve digit counting #643

Closed mborland closed 3 weeks ago

mborland commented 3 weeks ago

Rather than using the current binary search trees we could use the various bit scanning instrinsics or assembly instructions and take floor(log10(2) * binary digits) + 1.