The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /* |
| 2 | * cabsf() wrapper for hypotf(). |
| 3 | * |
| 4 | * Written by J.T. Conklin, <jtc@wimsey.com> |
| 5 | * Placed into the Public Domain, 1994. |
| 6 | */ |
| 7 | |
| 8 | #ifndef lint |
| 9 | static const char rcsid[] = |
Elliott Hughes | a0ee078 | 2013-01-30 19:06:37 -0800 | [diff] [blame] | 10 | "$FreeBSD$"; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 11 | #endif /* not lint */ |
| 12 | |
| 13 | #include <complex.h> |
| 14 | #include <math.h> |
| 15 | #include "math_private.h" |
| 16 | |
| 17 | float |
Elliott Hughes | 022e1aa | 2022-07-12 17:01:46 -0700 | [diff] [blame] | 18 | cabsf(float complex z) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | { |
| 20 | |
| 21 | return hypotf(crealf(z), cimagf(z)); |
| 22 | } |