fmax(), fmaxf(), fmaxl()

Determine the maximum of two floating-point numbers

Synopsis:

#include <math.h>

double fmax( double x,
             double y );

float fmaxf( float x,
             float y );

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

Arguments:

x, y
The numbers that you want to compare.

Library:

libm

Use the -l m option to qcc to link against this library.

Description:

The fmax(), fmaxf(), and fmaxl() functions determine the maximum of two floating-point numbers. If just one of the arguments is a NaN, the functions choose the numeric value.

Returns:

The maximum of the arguments. If x and y are both NaN, these functions return NaN.

Classification:

ANSI, POSIX 1003.1

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes