From 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 22 Nov 2001 14:04:29 +0000 Subject: Totally rework the math library, this time based on the MacOs X math library (which is itself based on the math lib from FreeBSD). -Erik --- libm/w_cabs.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libm/w_cabs.c (limited to 'libm/w_cabs.c') diff --git a/libm/w_cabs.c b/libm/w_cabs.c new file mode 100644 index 000000000..f55a2dde8 --- /dev/null +++ b/libm/w_cabs.c @@ -0,0 +1,20 @@ +/* + * cabs() wrapper for hypot(). + * + * Written by J.T. Conklin, + * Placed into the Public Domain, 1994. + */ + +#include + +struct complex { + double x; + double y; +}; + +double +cabs(z) + struct complex z; +{ + return hypot(z.x, z.y); +} -- cgit v1.2.3