1FMAX(3P) POSIX Programmer's Manual FMAX(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 fmax, fmaxf, fmaxl — determine maximum numeric value of two floating-
14 point numbers
15
17 #include <math.h>
18
19 double fmax(double x, double y);
20 float fmaxf(float x, float y);
21 long double fmaxl(long double x, long double y);
22
24 The functionality described on this reference page is aligned with the
25 ISO C standard. Any conflict between the requirements described here
26 and the ISO C standard is unintentional. This volume of POSIX.1‐2008
27 defers to the ISO C standard.
28
29 These functions shall determine the maximum numeric value of their
30 arguments. NaN arguments shall be treated as missing data: if one
31 argument is a NaN and the other numeric, then these functions shall
32 choose the numeric value.
33
35 Upon successful completion, these functions shall return the maximum
36 numeric value of their arguments.
37
38 If just one argument is a NaN, the other argument shall be returned.
39
40 If x and y are NaN, a NaN shall be returned.
41
43 No errors are defined.
44
45 The following sections are informative.
46
48 None.
49
51 None.
52
54 None.
55
57 None.
58
60 fdim(), fmin()
61
62 The Base Definitions volume of POSIX.1‐2008, <math.h>
63
65 Portions of this text are reprinted and reproduced in electronic form
66 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
67 -- Portable Operating System Interface (POSIX), The Open Group Base
68 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
69 cal and Electronics Engineers, Inc and The Open Group. (This is
70 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
71 event of any discrepancy between this version and the original IEEE and
72 The Open Group Standard, the original IEEE and The Open Group Standard
73 is the referee document. The original Standard can be obtained online
74 at http://www.unix.org/online.html .
75
76 Any typographical or formatting errors that appear in this page are
77 most likely to have been introduced during the conversion of the source
78 files to man page format. To report such errors, see https://www.ker‐
79 nel.org/doc/man-pages/reporting_bugs.html .
80
81
82
83IEEE/The Open Group 2013 FMAX(3P)