Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / complex / cabs.c
blobb97579b43d306da34a7a2a372f02595e25f5e465
1 /* $NetBSD: cabs.c,v 1.1 2007/08/20 16:01:30 drochner Exp $ */
3 /*
4 * Written by Matthias Drochner <drochner@NetBSD.org>.
5 * Public domain.
7 * imported and modified include for newlib 2010/10/03
8 * Marco Atzeri <marco_atzeri@yahoo.it>
9 */
12 FUNCTION
13 <<cabs>>, <<cabsf>>, <<cabsl>>---complex absolute-value
15 INDEX
16 cabs
17 INDEX
18 cabsf
19 INDEX
20 cabsl
22 SYNOPSIS
23 #include <complex.h>
24 double cabs(double complex <[z]>);
25 float cabsf(float complex <[z]>);
26 long double cabsl(long double complex <[z]>);
29 DESCRIPTION
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>>.
39 RETURNS
40 The cabs* functions return the complex absolute value.
42 PORTABILITY
43 <<cabs>>, <<cabsf>> and <<cabsl>> are ISO C99
45 QUICKREF
46 <<cabs>>, <<cabsf>> and <<cabsl>> are ISO C99
51 #include <complex.h>
52 #include <math.h>
54 double
55 cabs(double complex z)
58 return hypot( creal(z), cimag(z) );