1FMAX(3) Linux Programmer's Manual FMAX(3)
2
3
4
6 fmax, fmaxf, fmaxl - determine maximum of two floating-point numbers
7
9 #include <math.h>
10
11 double fmax(double x, double y);
12 float fmaxf(float x, float y);
13 long double fmaxl(long double x, long double y);
14
15 Link with -lm.
16
17 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19 fmax(), fmaxf(), fmaxl():
20 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21
23 These functions return the larger value of x and y.
24
26 These functions return the maximum of x and y.
27
28 If one argument is a NaN, the other argument is returned.
29
30 If both arguments are NaN, a NaN is returned.
31
33 No errors occur.
34
36 These functions first appeared in glibc in version 2.1.
37
39 For an explanation of the terms used in this section, see at‐
40 tributes(7).
41
42 ┌────────────────────────────────────────────┬───────────────┬─────────┐
43 │Interface │ Attribute │ Value │
44 ├────────────────────────────────────────────┼───────────────┼─────────┤
45 │fmax(), fmaxf(), fmaxl() │ Thread safety │ MT-Safe │
46 └────────────────────────────────────────────┴───────────────┴─────────┘
47
49 C99, POSIX.1-2001, POSIX.1-2008.
50
52 fdim(3), fmin(3)
53
55 This page is part of release 5.13 of the Linux man-pages project. A
56 description of the project, information about reporting bugs, and the
57 latest version of this page, can be found at
58 https://www.kernel.org/doc/man-pages/.
59
60
61
62 2021-03-22 FMAX(3)