Tag Archives: pythagoras

Algorithms for computing Pythagoras Sum

While helping a friend of mine with programming assignments, I stumbled upon a question on two different algorithms of calculating Pythagoras Sum (Pythagoras Addition), through a function called pythag

One algorithm is straight-forward, which is just  c = \sqrt{a^2 + b^2}. \,

The other, however, is very intriguing, it makes use of absolute, min, max and several lines of weird mathematical operations to get the result. Continue reading