Skip to content

Latest commit

 

History

History
84 lines (68 loc) · 2.23 KB

fmin-fminf-fminl.md

File metadata and controls

84 lines (68 loc) · 2.23 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic apiname apilocation apitype f1_keywords helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
fmin, fminf, fminl | Microsoft Docs
11/04/2016
cpp
devlang-cpp
article
fmin
fminf
fminl
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
api-ms-win-crt-math-l1-1-0.dll
DLLExport
fmin
fminf
fminl
math/fmin
math/fminf
math/fminl
fmin function
fminf function
fminl function
1916dfb5-99c1-4b0d-aefb-513525c3f2ac
5
corob-msft
corob
ghogen

fmin, fminf, fminl

Determines the smaller of the two specified values.

Syntax

double fmin(  
   double x,   
   double y  
);  
  
float fmin(  
   float x,   
   float y  
); //C++ only  
  
long double fmin(  
   long double x,   
   long double y  
); //C++ only  
  
float fminf(  
   float x,   
   float y  
);  
  
long double fminl(  
   long double x,   
   long double y  
);  

Parameters

x
The first value to compare.

y
The second value to compare.

Return Value

If successful, returns the smaller of x or y.

Input Result
x is NaN y
y is NaN x
x and y are NaN NaN

The function does not cause _matherr to be invoked, cause any floating-point exceptions, or change the value of errno.

Remarks

Because C++ allows overloading, you can call overloads of fmin that take and return float and long double types. In a C program, fmin always takes and returns a double.

Requirements

Routine Required header
fmin, fminf, fminl C: <math.h>
C++: <math.h> or <cmath>

For additional compatibility information, see Compatibility.

See Also

Alphabetical Function Reference
fmax, fmaxf, fmaxl