Re: [tim-janik/beast] BSE: bsemathsignal: add approximations: Bse::fast_log2 and Bse::fast_exp2 (#124)

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:
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, view it on GitHub, or unsubscribe.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]