diff options
Diffstat (limited to 'src/complex/cabsl.c')
-rw-r--r-- | src/complex/cabsl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/complex/cabsl.c b/src/complex/cabsl.c new file mode 100644 index 00000000..40a067c1 --- /dev/null +++ b/src/complex/cabsl.c @@ -0,0 +1,13 @@ +#include "libm.h" + +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 +long double cabsl(long double complex z) +{ + return cabs(z); +} +#else +long double cabsl(long double complex z) +{ + return hypotl(creall(z), cimagl(z)); +} +#endif |