1fmax(3)                    Library Functions Manual                    fmax(3)
2
3
4

NAME

6       fmax, fmaxf, fmaxl - determine maximum of two floating-point numbers
7

LIBRARY

9       Math library (libm, -lm)
10

SYNOPSIS

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

DESCRIPTION

24       These functions return the larger value of x and y.
25

RETURN VALUE

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

ERRORS

34       No errors occur.
35

ATTRIBUTES

37       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
38       tributes(7).
39
40       ┌────────────────────────────────────────────┬───────────────┬─────────┐
41Interface                                   Attribute     Value   
42       ├────────────────────────────────────────────┼───────────────┼─────────┤
43fmax(), fmaxf(), fmaxl()                    │ Thread safety │ MT-Safe │
44       └────────────────────────────────────────────┴───────────────┴─────────┘
45

STANDARDS

47       C11, POSIX.1-2008.
48

HISTORY

50       glibc 2.1.  C99, POSIX.1-2001.
51

SEE ALSO

53       fdim(3), fmin(3)
54
55
56
57Linux man-pages 6.04              2023-03-30                           fmax(3)
Impressum