OSDN Git Service

(split) LDP: Change Makefile to stamp-based compilation
[linuxjm/LDP_man-pages.git] / original / man3 / fmax.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
7 .\" %%%LICENSE_END
8 .\"
9 .TH FMAX 3 2010-09-20 "" "Linux Programmer's Manual"
10 .SH NAME
11 fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers
12 .SH SYNOPSIS
13 .B #include <math.h>
14 .sp
15 .BI "double fmax(double " x ", double " y );
16 .br
17 .BI "float fmaxf(float " x ", float " y );
18 .br
19 .BI "long double fmaxl(long double " x ", long double " y );
20 .sp
21 Link with \fI\-lm\fP.
22 .sp
23 .in -4n
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
26 .in
27 .sp
28 .ad l
29 .BR fmax (),
30 .BR fmaxf (),
31 .BR fmaxl ():
32 .RS 4
33 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
34 _POSIX_C_SOURCE\ >=\ 200112L;
35 .br
36 or
37 .I cc\ -std=c99
38 .RE
39 .ad
40 .SH DESCRIPTION
41 These functions return the larger value of
42 .I x
43 and
44 .IR y .
45 .SH RETURN VALUE
46 These functions return the maximum of
47 .I x
48 and
49 .IR y .
50
51 If one argument is a NaN, the other argument is returned.
52
53 If both arguments are NaN, a NaN is returned.
54 .SH ERRORS
55 No errors occur.
56 .SH VERSIONS
57 These functions first appeared in glibc in version 2.1.
58 .SH CONFORMING TO
59 C99, POSIX.1-2001.
60 .SH SEE ALSO
61 .BR fmin (3)