blob: 1539944faf6c09b134aa8392f469c23b86712d1e [file] [log] [blame]
Elliott Hughesa0ee0782013-01-30 19:06:37 -08001/*
2 * cabs() wrapper for hypot().
3 *
4 * Written by J.T. Conklin, <jtc@wimsey.com>
5 * Placed into the Public Domain, 1994.
6 *
7 * Modified by Steven G. Kargl for the long double type.
8 */
9
Elliott Hughesa0ee0782013-01-30 19:06:37 -080010#include <complex.h>
11#include <math.h>
12
13long double
14cabsl(long double complex z)
15{
16 return hypotl(creall(z), cimagl(z));
17}