1 /* Copyright (C) 2015 by  Red Hat, Incorporated. All rights reserved.
2  *
3  * Permission to use, copy, modify, and distribute this software
4  * is freely granted, provided that this notice is preserved.
5  */
6 
7 #include <complex.h>
8 #include <math.h>
9 
10 long double
cabsl(long double complex z)11 cabsl (long double complex z)
12 {
13 #ifdef _LDBL_EQ_DBL
14   return (long double complex) cabs ((double complex) z);
15 #else
16   return hypotl (creall (z), cimagl (z));
17 #endif
18 }
19