1fmax(3) Library Functions Manual fmax(3)
2
3
4
6 fmax, fmaxf, fmaxl - determine maximum of two floating-point numbers
7
9 Math library (libm, -lm)
10
12 #include <math.h>
13
14 double fmax(double x, double y);
15 float fmaxf(float x, float y);
16 long double fmaxl(long double x, long double y);
17
18 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
19
20 fmax(), fmaxf(), fmaxl():
21 _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
22
24 These functions return the larger value of x and y.
25
27 These functions return the maximum of x and y.
28
29 If one argument is a NaN, the other argument is returned.
30
31 If both arguments are NaN, a NaN is returned.
32
34 No errors occur.
35
37 For an explanation of the terms used in this section, see at‐
38 tributes(7).
39
40 ┌────────────────────────────────────────────┬───────────────┬─────────┐
41 │Interface │ Attribute │ Value │
42 ├────────────────────────────────────────────┼───────────────┼─────────┤
43 │fmax(), fmaxf(), fmaxl() │ Thread safety │ MT-Safe │
44 └────────────────────────────────────────────┴───────────────┴─────────┘
45
47 C11, POSIX.1-2008.
48
50 glibc 2.1. C99, POSIX.1-2001.
51
53 fdim(3), fmin(3)
54
55
56
57Linux man-pages 6.05 2023-07-20 fmax(3)