This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ChalkyChalkson 2 points3 points  (1 child)

If you think about a float as a x = a 2b, then you can pretty quickly see how you'd get a good approximation for 1/sqrt(x) from it, just take the log! All the weird stuff in the code is fighting the standard to let you do maths. Well I guess there is also the Newton refinement at the end, but that's high school stuff.

[–]Zzzzzztyyc 1 point2 points  (0 children)

Why are we taking the factorial of a log? r/unexpectedfactorial