stillwater-sc / universal

Large collection of number systems providing custom arithmetic and mixed-precision algorithms for AI, Machine Learning, Computer Vision, Signal Processing, CAE, EDA, control, optimization, estimation, and approximation.
MIT License
391 stars 58 forks source link

Add a constexpr log2() function to support a constexpr takum #423

Open Ravenwater opened 1 month ago

Ravenwater commented 1 month ago

to support an expression that deals with literals, such as:

constexpr takum16 t = 3.14f;

we would need a constexpr compile time log2 function approximation.