Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX 11i Version 1.5 Reference Volume 4, Section 3: Libraries > c

cabs(3M)

IA-64 only
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

cabs(), cabsf() — complex absolute value (also called norm, modulus, or magnitude) functions

SYNOPSIS

#include <complex.h>

double cabs(double complex z);

float cabsf(float complex z);

DESCRIPTION

These functions are available only for IA-64.

cabs() returns the complex absolute value of z.

cabsf() is a float complex version of cabs(); it takes a float complex argument and returns a float result.

USAGE

To use these functions, compile with the default -Ae option. Make sure your program includes <complex.h>. Link in the math library by specifying -lm on the compiler or linker command line.

RETURN VALUES

cabs(z) returns the same values and raises the same floating-point exceptions as hypot(creal(z),cimag(z)). If the +Onocxlimitedrange compiler option (default for HP's C/C++) is not in effect, then cabs() may be computed with a simpler formula that does not match the specification for extreme values.

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

cabs(), cabsf() :ISO/IEC C99 (including Annex G, "IEC 60559-compatible complex arithmetic")

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2001 Hewlett-Packard Development Company, L.P.