OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / fmin.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 FMIN 3 2013-09-17 "" "Linux Programmer's Manual"
10 .SH NAME
11 fmin, fminf, fminl \- determine minimum of two floating-point numbers
12 .SH SYNOPSIS
13 .B #include <math.h>
14 .sp
15 .BI "double fmin(double " x ", double " y );
16 .br
17 .BI "float fminf(float " x ", float " y );
18 .br
19 .BI "long double fminl(long double " x ", long double " y );
20 .sp
21 Link with \fI\-lm\fP.
22 .sp
23 .in -4n
24 Feature Test Macro Requirements for glibc (see
25 .BR feature_test_macros (7)):
26 .in
27 .sp
28 .ad l
29 .BR fmin (),
30 .BR fminf (),
31 .BR fminl ():
32 .RS 4
33 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
34 _POSIX_C_SOURCE\ >=\ 200112L;
35 .br
36 or
37 .I cc\ -std=c99
38 .RE
39 .ad
40 .SH DESCRIPTION
41 These functions return the lesser value of
42 .I x
43 and
44 .IR y .
45 .SH RETURN VALUE
46 These functions return the minimum of
47 .I x
48 and
49 .IR y .
50
51 If one argument is a NaN, the other argument is returned.
52
53 If both arguments are NaN, a NaN is returned.
54 .SH ERRORS
55 No errors occur.
56 .SH VERSIONS
57 These functions first appeared in glibc in version 2.1.
58 .SH ATTRIBUTES
59 .SS Multithreading (see pthreads(7))
60 The
61 .BR fmin (),
62 .BR fminf (),
63 and
64 .BR fminl ()
65 functions are thread-safe.
66 .SH CONFORMING TO
67 C99, POSIX.1-2001.
68 .SH SEE ALSO
69 .BR fmax (3)
70 .SH COLOPHON
71 This page is part of release 3.79 of the Linux
72 .I man-pages
73 project.
74 A description of the project,
75 information about reporting bugs,
76 and the latest version of this page,
77 can be found at
78 \%http://www.kernel.org/doc/man\-pages/.