submited by

Style Pass

Caveat: This will have at most 2-16 relative error, since man + 125 clobbers the last 8 bits, saving the first 16 bits of your mantissa.

Caveat: The 0x5c416 bias is given to center the method. If you plug in exp = -0.5, this gives the 0x5f3759df magic constant of the fast inverse root method.

Caveat: The bias term of 0x66774 is meant to center the method. We multiply by ln(2) at the end because the rest of the method computes the log2(x) function.

Caveat: The bias term of 0x38aa22 here corresponds to a multiplicative scaling of the base. In particular, it corresponds to z such that 2z = e

Read more github.com/k...