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 Reference > F

fmax(3M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

fmax(), fmaxf(), fmaxl(), fmaxw(), fmaxq() — maximum value functions

SYNOPSIS

#include <math.h>

double fmax(double x, double y);

HP Integrity Server Only

float fmaxf(float x, float y);

long double fmaxl(long double x, long double y);

extended fmaxw(extended x, extended y);

quad fmaxq(quad x, quad y);

DESCRIPTION

The fmax() function determines the maximum numeric value of its arguments.

Integrity Server Only

fmaxf() is a float version of fmax(); it takes float arguments and returns a float result.

fmaxl() is a long double version of fmax(); it takes long double arguments and returns a long double result.

fmaxw() is an extended version of fmax(); it takes extended arguments and returns an extended result.

fmaxq() is equivalent to fmaxl() on HP-UX systems.

USAGE

To use this function, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. To use (for Integrity servers) fmaxw() or fmaxq(), compile with the -fpwidetypes option. Make sure your program includes <math.h>. Link in the math library by specifying -lm on the compiler or linker command line.

RETURN VALUE

The fmax() function returns the maximum numeric value of its arguments.

If one argument is a NaN and the other is numeric, fmax() returns the numeric argument.

If both arguments are NaNs, fmax() returns NaN.

ERRORS

No errors are defined.

STANDARDS CONFORMANCE

fmax(), fmaxf(), fmaxl() : ISO/IEC C99 (including Annex F, ``IEC 60559 floating-point arithmetic'')

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