]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/fmax.3
pow.3: Minor tweak to BUGS
[thirdparty/man-pages.git] / man3 / fmax.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
4 .\"
5 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
6 .\" Distributed under GPL
7 .\" %%%LICENSE_END
8 .\"
9 .TH FMAX 3 2017-09-15 "" "Linux Programmer's Manual"
10 .SH NAME
11 fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers
12 .SH SYNOPSIS
13 .B #include <math.h>
14 .PP
15 .BI "double fmax(double " x ", double " y );
16 .BI "float fmaxf(float " x ", float " y );
17 .BI "long double fmaxl(long double " x ", long double " y );
18 .PP
19 Link with \fI\-lm\fP.
20 .PP
21 .in -4n
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
24 .in
25 .PP
26 .ad l
27 .BR fmax (),
28 .BR fmaxf (),
29 .BR fmaxl ():
30 .RS 4
31 _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L
32 .RE
33 .ad
34 .SH DESCRIPTION
35 These functions return the larger value of
36 .I x
37 and
38 .IR y .
39 .SH RETURN VALUE
40 These functions return the maximum of
41 .I x
42 and
43 .IR y .
44 .PP
45 If one argument is a NaN, the other argument is returned.
46 .PP
47 If both arguments are NaN, a NaN is returned.
48 .SH ERRORS
49 No errors occur.
50 .SH VERSIONS
51 These functions first appeared in glibc in version 2.1.
52 .SH ATTRIBUTES
53 For an explanation of the terms used in this section, see
54 .BR attributes (7).
55 .TS
56 allbox;
57 lbw24 lb lb
58 l l l.
59 Interface Attribute Value
60 T{
61 .BR fmax (),
62 .BR fmaxf (),
63 .BR fmaxl ()
64 T} Thread safety MT-Safe
65 .TE
66 .SH CONFORMING TO
67 C99, POSIX.1-2001, POSIX.1-2008.
68 .SH SEE ALSO
69 .BR fdim (3),
70 .BR fmin (3)