]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
d6c974e7 MK |
2 | .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
2297bf0e | 4 | .\" |
38f20bb9 | 5 | .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE) |
fea681da | 6 | .\" Distributed under GPL |
38f20bb9 | 7 | .\" %%%LICENSE_END |
fea681da | 8 | .\" |
4b8c67d9 | 9 | .TH FMIN 3 2017-09-15 "" "Linux Programmer's Manual" |
fea681da | 10 | .SH NAME |
d6c974e7 | 11 | fmin, fminf, fminl \- determine minimum of two floating-point numbers |
fea681da MK |
12 | .SH SYNOPSIS |
13 | .B #include <math.h> | |
68e4db0a | 14 | .PP |
fea681da | 15 | .BI "double fmin(double " x ", double " y ); |
d39541ec | 16 | .br |
fea681da | 17 | .BI "float fminf(float " x ", float " y ); |
d39541ec | 18 | .br |
fea681da | 19 | .BI "long double fminl(long double " x ", long double " y ); |
68e4db0a | 20 | .PP |
d6c974e7 | 21 | Link with \fI\-lm\fP. |
68e4db0a | 22 | .PP |
d6c974e7 MK |
23 | .in -4n |
24 | Feature Test Macro Requirements for glibc (see | |
25 | .BR feature_test_macros (7)): | |
26 | .in | |
68e4db0a | 27 | .PP |
d6c974e7 MK |
28 | .ad l |
29 | .BR fmin (), | |
30 | .BR fminf (), | |
31 | .BR fminl (): | |
f1f0e4ed | 32 | .RS 4 |
e464f054 | 33 | _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L |
f1f0e4ed MK |
34 | .RE |
35 | .ad | |
fea681da | 36 | .SH DESCRIPTION |
aabbba06 | 37 | These functions return the lesser value of |
d6c974e7 MK |
38 | .I x |
39 | and | |
40 | .IR y . | |
41 | .SH RETURN VALUE | |
42 | These functions return the minimum of | |
7f45503b MK |
43 | .I x |
44 | and | |
45 | .IR y . | |
847e0d88 | 46 | .PP |
d6c974e7 | 47 | If one argument is a NaN, the other argument is returned. |
847e0d88 | 48 | .PP |
d6c974e7 MK |
49 | If both arguments are NaN, a NaN is returned. |
50 | .SH ERRORS | |
51 | No errors occur. | |
f0d7ce1d MK |
52 | .SH VERSIONS |
53 | These functions first appeared in glibc in version 2.1. | |
8300b8b8 | 54 | .SH ATTRIBUTES |
8783ef46 MK |
55 | For an explanation of the terms used in this section, see |
56 | .BR attributes (7). | |
57 | .TS | |
58 | allbox; | |
59 | lbw24 lb lb | |
60 | l l l. | |
61 | Interface Attribute Value | |
62 | T{ | |
8300b8b8 PH |
63 | .BR fmin (), |
64 | .BR fminf (), | |
8300b8b8 | 65 | .BR fminl () |
8783ef46 MK |
66 | T} Thread safety MT-Safe |
67 | .TE | |
47297adb | 68 | .SH CONFORMING TO |
9a74e018 | 69 | C99, POSIX.1-2001, POSIX.1-2008. |
47297adb | 70 | .SH SEE ALSO |
0b5ff3b6 | 71 | .BR fdim (3), |
fea681da | 72 | .BR fmax (3) |