]>
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 | .\" |
95fb8859 | 5 | .\" SPDX-License-Identifier: GPL-1.0-or-later |
fea681da | 6 | .\" |
1ae6b2c7 | 7 | .TH FMAX 3 2021-03-22 GNU "Linux Programmer's Manual" |
fea681da | 8 | .SH NAME |
d6c974e7 | 9 | fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers |
2af19291 AC |
10 | .SH LIBRARY |
11 | Math library | |
8fc3b2cf | 12 | .RI ( libm ", " \-lm ) |
fea681da | 13 | .SH SYNOPSIS |
7b5d39f4 | 14 | .nf |
fea681da | 15 | .B #include <math.h> |
68e4db0a | 16 | .PP |
fea681da | 17 | .BI "double fmax(double " x ", double " y ); |
fea681da | 18 | .BI "float fmaxf(float " x ", float " y ); |
fea681da | 19 | .BI "long double fmaxl(long double " x ", long double " y ); |
7b5d39f4 | 20 | .fi |
68e4db0a | 21 | .PP |
d39ad78f | 22 | .RS -4 |
d6c974e7 MK |
23 | Feature Test Macro Requirements for glibc (see |
24 | .BR feature_test_macros (7)): | |
d39ad78f | 25 | .RE |
68e4db0a | 26 | .PP |
d6c974e7 MK |
27 | .BR fmax (), |
28 | .BR fmaxf (), | |
29 | .BR fmaxl (): | |
9d2adbae | 30 | .nf |
5c10d2c5 | 31 | _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
9d2adbae | 32 | .fi |
fea681da | 33 | .SH DESCRIPTION |
d6c974e7 MK |
34 | These functions return the larger value of |
35 | .I x | |
36 | and | |
37 | .IR y . | |
38 | .SH RETURN VALUE | |
39 | These functions return the maximum of | |
d9a10d9d MK |
40 | .I x |
41 | and | |
42 | .IR y . | |
847e0d88 | 43 | .PP |
d6c974e7 | 44 | If one argument is a NaN, the other argument is returned. |
847e0d88 | 45 | .PP |
d6c974e7 MK |
46 | If both arguments are NaN, a NaN is returned. |
47 | .SH ERRORS | |
48 | No errors occur. | |
f0d7ce1d MK |
49 | .SH VERSIONS |
50 | These functions first appeared in glibc in version 2.1. | |
d6da5759 | 51 | .SH ATTRIBUTES |
0764e0b6 MK |
52 | For an explanation of the terms used in this section, see |
53 | .BR attributes (7). | |
c466875e MK |
54 | .ad l |
55 | .nh | |
0764e0b6 MK |
56 | .TS |
57 | allbox; | |
c466875e | 58 | lbx lb lb |
0764e0b6 MK |
59 | l l l. |
60 | Interface Attribute Value | |
61 | T{ | |
d6da5759 PH |
62 | .BR fmax (), |
63 | .BR fmaxf (), | |
d6da5759 | 64 | .BR fmaxl () |
0764e0b6 MK |
65 | T} Thread safety MT-Safe |
66 | .TE | |
c466875e MK |
67 | .hy |
68 | .ad | |
69 | .sp 1 | |
47297adb | 70 | .SH CONFORMING TO |
9a74e018 | 71 | C99, POSIX.1-2001, POSIX.1-2008. |
47297adb | 72 | .SH SEE ALSO |
0b5ff3b6 | 73 | .BR fdim (3), |
fea681da | 74 | .BR fmin (3) |