I cam cross a fast good approximation routine from celt as (https://chromium.googlesource.com/chromium/deps/opus/+/1.0.x/celt/mathops.h), you can see code as below: