projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first commit of the new libm!
[musl]
/
src
/
complex
/
cabsl.c
diff --git a/src/complex/cabsl.c
b/src/complex/cabsl.c
new file mode 100644
(file)
index 0000000..
40a067c
--- /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