#include <math.h>
|
double
hypot (double x, double y); |
float
hypotf (float x, float y); |
long double
hypotl (long double x, long double y); |
The function hypotl is an alias to the function
void main( void ) { double x1 = 3.0 , x2 = 4.0, y; y = hypot( x1, x2 ); printf( "atan2(%f , %f) = %f\n", x1, x2, y ); y = hypotf( x1, x2 ); printf( "atan2f(%f , %f) = %f\n", x1, x2, y ); y = hypotl( x1, x2 ); printf( "hypotl(%f , %f) = %f\n", x1, x2, y ); }
Output
hypot ( 3.0, 4.0 ) = 5.000000 hypotf( 3.0, 4.0 ) = 5.000000 hypotl( 3.0, 4.0 ) = 5.000000
hypot.
hypot (oo, v);
=
hypot (v, oo);
= +oo for all
v,
including NaN.
© 2005-2007 Nokia |