I now have a proper fast_log2() approximation. I used Sollya for this, and
figured you only get a good approximation for log2(x+1), see here:
https://en.wikipedia.org/wiki/Logarithm#Power_series
That allows the constant of the approximation polynomial to be 0.0, which
guarantees correct results for 2^int inputs.
Tests and benchmark are now in master (results from a production build):
~~~~
BENCH fast_log2 # timing: fastest=0.000185s calls=487621127.8/s
diff=0.00000302175265787241 (@0.000015)
BENCH log2f # timing: fastest=0.000342s calls=263339591.6/s
diff=0.00000095218742401926 (@0.000010)
~~~~
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/pull/124#issuecomment-575898765
_______________________________________________
beast mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/beast