1 /* $NetBSD: cabs.c,v 1.1 2007/08/20 16:01:30 drochner Exp $ */
4 * Written by Matthias Drochner <drochner@NetBSD.org>.
7 * imported and modified include for newlib 2010/10/03
8 * Marco Atzeri <marco_atzeri@yahoo.it>
13 <<cabs>>, <<cabsf>>, <<cabsl>>---complex absolute-value
24 double cabs(double complex <[z]>);
25 float cabsf(float complex <[z]>);
26 long double cabsl(long double complex <[z]>);
30 These functions compute compute the complex absolute value
31 (also called norm, modulus, or magnitude) of <[z]>.
33 <<cabsf>> is identical to <<cabs>>, except that it performs
34 its calculations on <<float complex>>.
36 <<cabsl>> is identical to <<cabs>>, except that it performs
37 its calculations on <<long double complex>>.
40 The cabs* functions return the complex absolute value.
43 <<cabs>>, <<cabsf>> and <<cabsl>> are ISO C99
46 <<cabs>>, <<cabsf>> and <<cabsl>> are ISO C99
55 cabs(double complex z
)
58 return hypot( creal(z
), cimag(z
) );