4 ms·
2500 years later and the best hypotenuse algorithm is still Pythagoras’.
by onedognight 3y ago
2500 years later and the best hypotenuse algorithm is still Pythagoras’.
- goalieca 3y agoYou jest but this is a computationally slow algorithm that only works for right angle triangles in a Cartesian space. There’s very reasonable and fast trigonometric approximations. The general form would be the cosine law which applies to any triangle. We can derive this from more abstract metrics over an inner product space.. a sort of vector space of any dimension.
- quickthrower2 3y agoFirst thing I thought of is https://en.wikipedia.org/wiki/Fast_inverse_square_root https://en.wikipedia.org/wiki/Fast_inverse_square_root
- deleted 3y ago[deleted]
- User23 3y agoFunny you should say that. Here[1] is an interesting improvement. More interestingly he shows his work. [1] https://www.cs.utexas.edu/~EWD/transcriptions/EWD09xx/EWD975.html https://www.cs.utexas.edu/~EWD/transcriptions/EWD09xx/EWD975...
- d0mine 3y agoThank you for this gem. It is a delight to read.