]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
d6c974e7 MK |
2 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
2297bf0e | 4 | .\" |
38f20bb9 | 5 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
fea681da | 6 | .\" Distributed under GPL |
38f20bb9 | 7 | .\" %%%LICENSE_END |
fea681da | 8 | .\" |
4b8c67d9 | 9 | .TH FMAX 3 2017-09-15 "" "Linux Programmer's Manual" |
fea681da | 10 | .SH NAME |
d6c974e7 | 11 | fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers |
fea681da MK |
12 | .SH SYNOPSIS |
13 | .B #include <math.h> | |
68e4db0a | 14 | .PP |
fea681da | 15 | .BI "double fmax(double " x ", double " y ); |
fea681da | 16 | .BI "float fmaxf(float " x ", float " y ); |
fea681da | 17 | .BI "long double fmaxl(long double " x ", long double " y ); |
68e4db0a | 18 | .PP |
d6c974e7 | 19 | Link with \fI\-lm\fP. |
68e4db0a | 20 | .PP |
d6c974e7 MK |
21 | .in -4n |
22 | Feature Test Macro Requirements for glibc (see | |
23 | .BR feature_test_macros (7)): | |
24 | .in | |
68e4db0a | 25 | .PP |
d6c974e7 MK |
26 | .ad l |
27 | .BR fmax (), | |
28 | .BR fmaxf (), | |
29 | .BR fmaxl (): | |
f1f0e4ed | 30 | .RS 4 |
e464f054 | 31 | _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L |
f1f0e4ed MK |
32 | .RE |
33 | .ad | |
fea681da | 34 | .SH DESCRIPTION |
d6c974e7 MK |
35 | These functions return the larger value of |
36 | .I x | |
37 | and | |
38 | .IR y . | |
39 | .SH RETURN VALUE | |
40 | These functions return the maximum of | |
d9a10d9d MK |
41 | .I x |
42 | and | |
43 | .IR y . | |
847e0d88 | 44 | .PP |
d6c974e7 | 45 | If one argument is a NaN, the other argument is returned. |
847e0d88 | 46 | .PP |
d6c974e7 MK |
47 | If both arguments are NaN, a NaN is returned. |
48 | .SH ERRORS | |
49 | No errors occur. | |
f0d7ce1d MK |
50 | .SH VERSIONS |
51 | These functions first appeared in glibc in version 2.1. | |
d6da5759 | 52 | .SH ATTRIBUTES |
0764e0b6 MK |
53 | For an explanation of the terms used in this section, see |
54 | .BR attributes (7). | |
55 | .TS | |
56 | allbox; | |
57 | lbw24 lb lb | |
58 | l l l. | |
59 | Interface Attribute Value | |
60 | T{ | |
d6da5759 PH |
61 | .BR fmax (), |
62 | .BR fmaxf (), | |
d6da5759 | 63 | .BR fmaxl () |
0764e0b6 MK |
64 | T} Thread safety MT-Safe |
65 | .TE | |
47297adb | 66 | .SH CONFORMING TO |
9a74e018 | 67 | C99, POSIX.1-2001, POSIX.1-2008. |
47297adb | 68 | .SH SEE ALSO |
0b5ff3b6 | 69 | .BR fdim (3), |
fea681da | 70 | .BR fmin (3) |