/*
 *	+++ NAME +++
 *
 *	 CABS   Double precision complex absolute value
 *
 *	+++ INDEX +++
 *
 *	 CABS
 *	 complex functions
 *	 machine independent routines
 *	 math libraries
 *
 *	+++ DESCRIPTION +++
 *
 *	Computes double precision absolute value of a double
 *	precision complex argument, where "absolute value"
 *	is taken to mean magnitude.  The result replaces the
 *	argument.
 *
 *	+++ USAGE +++
 *
 *	 double cabs(z)
 *	 COMPLEX *z;
 *
 *	+++ PROGRAMMER +++
 *
 *	 Fred Fish
 *	 Goodyear Aerospace Corp, Arizona Div.
 *	 (602) 932-7000 work
 *	 (602) 894-6881 home
 *
 *	+++ INTERNALS +++
 *
 *	Computes CABS(z) where z = (x) + j(y) from:
 *
 *		CABS(z) = DSQRT(x*x + y*y)
 *
 *	---
 */

/*)LIBRARY
*/

#include <stdio.h>
#include "c:pmluse.h"
#include "pml.h"


double cabs(z)
register COMPLEX *z;
{
    double dsqrt();

    return (dsqrt((z->real * z->real) + (z->imag * z->imag)));
}
