8021b6e586eca57d86cf6f4b25170b56d4b59cb9
[dragonfly.git] / lib / libm / src / w_cabsf.c
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  * $NetBSD: w_cabsf.c,v 1.4 2001/01/06 00:15:00 christos Exp $
8  * $DragonFly: src/lib/libm/src/w_cabsf.c,v 1.1 2005/07/26 21:15:20 joerg Exp $
9  */
10
11 #include <complex.h>
12 #include <math.h>
13
14 float
15 cabsf(float complex z)
16 {
17         return hypot(crealf(z), cimagf(z));
18 }