OSDN Git Service

libm/*: mass removal of:
[uclinux-h8/uclibc-ng.git] / libm / w_hypot.c
1 /*
2  * ====================================================
3  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4  *
5  * Developed at SunPro, a Sun Microsystems, Inc. business.
6  * Permission to use, copy, modify, and distribute this
7  * software is freely granted, provided that this notice
8  * is preserved.
9  * ====================================================
10  */
11
12 /*
13  * wrapper hypot(x,y)
14  */
15
16 #include "math.h"
17 #include "math_private.h"
18
19 double hypot(double x, double y)/* wrapper hypot */
20 {
21 #ifdef _IEEE_LIBM
22         return __ieee754_hypot(x,y);
23 #else
24         double z;
25         z = __ieee754_hypot(x,y);
26         if(_LIB_VERSION == _IEEE_) return z;
27         if((!isfinite(z))&&isfinite(x)&&isfinite(y))
28             return __kernel_standard(x,y,4); /* hypot overflow */
29         else
30             return z;
31 #endif
32 }
33 libm_hidden_def(hypot)