to robinv at ecosse dot net:
hypo(a, b, c) === hypo(a, hypo(b, c))
hypo(a, b, c, d) === hypo(a, hypo(b, hypo(c, d)))
...
![]() |
|
||||||||||
|
hypotDescriptionfloat hypot ( float x, float y )
hypot() returns the length of the hypotenuse of a
right-angle triangle with sides of length hypot
</Life>.org
10-Aug-2006 02:56
to robinv at ecosse dot net:
R. Victor Klassen
24-Jun-2005 08:03
A correct implementation of hypot( x, y ) avoids the overflow that might otherwise happen if either x or y is large enough that when squared it would overflow, but the answer is small enough not to cause overflow.
robinv at ecosse dot net
07-Jan-2004 09:18
A simpler approach would be to allow an arbitrary number of parameters. That would allow for whatever number of dimensions you want *and* it would be backwards compatible with the current implementation. |