2004-11-03 13:51:07 +00:00
|
|
|
.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
|
2008-07-24 14:29:55 +00:00
|
|
|
.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
|
|
|
|
.\" <mtk.manpages@gmail.com>
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" Distributed under GPL
|
|
|
|
.\"
|
2008-08-11 17:13:47 +00:00
|
|
|
.TH FMAX 3 2008-08-11 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
2008-07-24 14:29:55 +00:00
|
|
|
fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <math.h>
|
|
|
|
.sp
|
|
|
|
.BI "double fmax(double " x ", double " y );
|
2004-11-11 17:28:42 +00:00
|
|
|
.br
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "float fmaxf(float " x ", float " y );
|
2004-11-11 17:28:42 +00:00
|
|
|
.br
|
2004-11-03 13:51:07 +00:00
|
|
|
.BI "long double fmaxl(long double " x ", long double " y );
|
|
|
|
.sp
|
2008-07-24 14:29:55 +00:00
|
|
|
Link with \fI\-lm\fP.
|
|
|
|
.sp
|
|
|
|
.in -4n
|
|
|
|
Feature Test Macro Requirements for glibc (see
|
|
|
|
.BR feature_test_macros (7)):
|
|
|
|
.in
|
|
|
|
.sp
|
|
|
|
.ad l
|
|
|
|
.BR fmax (),
|
|
|
|
.BR fmaxf (),
|
|
|
|
.BR fmaxl ():
|
2010-09-18 15:59:16 +00:00
|
|
|
.RS 4
|
|
|
|
_XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE;
|
|
|
|
.br
|
|
|
|
or
|
2008-07-24 14:29:55 +00:00
|
|
|
.I cc\ -std=c99
|
2010-09-18 15:59:16 +00:00
|
|
|
.RE
|
|
|
|
.ad
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
2008-07-24 14:29:55 +00:00
|
|
|
These functions return the larger value of
|
|
|
|
.I x
|
|
|
|
and
|
|
|
|
.IR y .
|
|
|
|
.SH RETURN VALUE
|
|
|
|
These functions return the maximum of
|
2007-12-13 20:46:52 +00:00
|
|
|
.I x
|
|
|
|
and
|
|
|
|
.IR y .
|
2008-07-24 14:29:55 +00:00
|
|
|
|
|
|
|
If one argument is a NaN, the other argument is returned.
|
|
|
|
|
|
|
|
If both arguments are NaN, a NaN is returned.
|
|
|
|
.SH ERRORS
|
|
|
|
No errors occur.
|
2008-08-11 17:13:47 +00:00
|
|
|
.SH VERSIONS
|
|
|
|
These functions first appeared in glibc in version 2.1.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "CONFORMING TO"
|
2008-07-24 14:29:55 +00:00
|
|
|
C99, POSIX.1-2001.
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR fmin (3)
|