| 1 |
'\" t |
| 2 |
.\" Copyright 2002, Walter Harms <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-1.0-or-later |
| 6 |
.\" |
| 7 |
.TH fmin 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
fmin, fminf, fminl \- determine minimum of two floating-point numbers |
| 10 |
.SH LIBRARY |
| 11 |
Math library |
| 12 |
.RI ( libm ,\~ \-lm ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.B #include <math.h> |
| 16 |
.P |
| 17 |
.BI "double fmin(double " x ", double " y ); |
| 18 |
.BI "float fminf(float " x ", float " y ); |
| 19 |
.BI "long double fminl(long double " x ", long double " y ); |
| 20 |
.fi |
| 21 |
.P |
| 22 |
.RS -4 |
| 23 |
Feature Test Macro Requirements for glibc (see |
| 24 |
.BR feature_test_macros (7)): |
| 25 |
.RE |
| 26 |
.P |
| 27 |
.BR fmin (), |
| 28 |
.BR fminf (), |
| 29 |
.BR fminl (): |
| 30 |
.nf |
| 31 |
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L |
| 32 |
.fi |
| 33 |
.SH DESCRIPTION |
| 34 |
These functions return the lesser value of |
| 35 |
.I x |
| 36 |
and |
| 37 |
.IR y . |
| 38 |
.SH RETURN VALUE |
| 39 |
These functions return the minimum of |
| 40 |
.I x |
| 41 |
and |
| 42 |
.IR y . |
| 43 |
.P |
| 44 |
If one argument is a NaN, the other argument is returned. |
| 45 |
.P |
| 46 |
If both arguments are NaN, a NaN is returned. |
| 47 |
.SH ERRORS |
| 48 |
No errors occur. |
| 49 |
.SH ATTRIBUTES |
| 50 |
For an explanation of the terms used in this section, see |
| 51 |
.BR attributes (7). |
| 52 |
.TS |
| 53 |
allbox; |
| 54 |
lbx lb lb |
| 55 |
l l l. |
| 56 |
Interface Attribute Value |
| 57 |
T{ |
| 58 |
.na |
| 59 |
.nh |
| 60 |
.BR fmin (), |
| 61 |
.BR fminf (), |
| 62 |
.BR fminl () |
| 63 |
T} Thread safety MT-Safe |
| 64 |
.TE |
| 65 |
.SH STANDARDS |
| 66 |
C11, POSIX.1-2008. |
| 67 |
.SH HISTORY |
| 68 |
glibc 2.1. |
| 69 |
C99, POSIX.1-2001. |
| 70 |
.SH SEE ALSO |
| 71 |
.BR fdim (3), |
| 72 |
.BR fmax (3) |