linuxthreads: install libpthread_nonshared.a
[uclibc-ng.git] / libm / w_cabs.c
blobb2592484c2398b2b19939ea051d2a7198d507d50
1 /*
2 * cabs() wrapper for hypot().
4 * Written by J.T. Conklin, <jtc@wimsey.com>
5 * Placed into the Public Domain, 1994.
6 */
8 #include <complex.h>
9 #include <math.h>
11 double cabs(double _Complex z)
13 return hypot(__real__ z, __imag__ z);
15 libm_hidden_def(cabs)
17 libm_hidden_proto(cabsf)
18 float cabsf(float _Complex z)
20 return (float) hypot(__real__ z, __imag__ z);
22 libm_hidden_def(cabsf)
24 #if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __NO_LONG_DOUBLE_MATH
25 libm_hidden_proto(cabsl)
26 long double cabsl(long double _Complex z)
28 return hypotl(__real__ z, __imag__ z);
30 libm_hidden_def(cabsl)
31 #endif