[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

fmax, fmaxf, or fmaxl Subroutine

Purpose

Determines the maximum numeric value of two floating-point numbers.

Syntax

#include <math.h>

double fmax (x, y)
double x;
double y;

float fmaxf (x, y)
float x;
float y;

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

Description

The fmax, fmaxf, and fmaxl subroutines determine the maximum numeric value of their arguments. NaN arguments are treated as missing data. If one argument is a NaN and the other numeric, the fmax, fmaxf, and fmaxl subroutines choose the numeric value.

Parameters

x Specifies the value to be computed.
y Specifies the value to be computed.

Return Values

Upon successful completion, the fmax, fmaxf, and fmaxl subroutines return the maximum numeric value of their arguments.

If one argument is a NaN, the other argument is returned.

If x and y are NaN, a NaN is returned.

Related Information

fdim, fdimf, or fdiml Subroutine and madd, msub, mult, mdiv, pow, gcd, invert, rpow, msqrt, mcmp, move, min, omin, fmin, m_in, mout, omout, fmout, m_out, sdiv, or itom Subroutine

math.h in AIX 5L Version 5.2 Files Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]