function
<cmath> <ctgmath>

# fmin

```     double fmin  (double x     , double y);
float fminf (float x      , float y);
long double fminl (long double x, long double y);
```
```     double fmin (double x     , double y);
float fmin (float x      , float y);
long double fmin (long double x, long double y);
Minimum value
Returns the smaller of its arguments: either x or y.

If one of the arguments in a NaN, the other is returned.

Header <tgmath.h> provides a type-generic macro version of this function.
Additional overloads are provided in this header (`<cmath>`) for other combinations of arithmetic types (Type1 and Type2): These overloads effectively cast its arguments to `double` before calculations, except if at least one of the arguments is of type `long double` (in which case both are casted to `long double` instead).

### Parameters

x, y
Values among which the function selects a minimum.

### Return Value

The minimum numeric value of its arguments.

### Example

 ``1234567891011`` ``````/* fmin example */ #include /* printf */ #include /* fmin */ int main () { printf ("fmin (100.0, 1.0) = %f\n", fmin(100.0,1.0)); printf ("fmin (-100.0, 1.0) = %f\n", fmin(-100.0,1.0)); printf ("fmin (-100.0, -1.0) = %f\n", fmin(-100.0,-1.0)); return 0; }``````

Output:
 ``` fmin (100.0, 1.0) = 1.000000 fmin (-100.0, 1.0) = -100.000000 fmin (-100.0,-1.0) = -100.000000 ```
{"ft_lang_label":"__label__en","ft_lang_prob":0.6894254,"math_prob":0.98176163,"size":655,"snap":"2021-43-2021-49","text_gpt3_token_len":196,"char_repetition_ratio":0.24423963,"word_repetition_ratio":0.2,"special_character_ratio":0.3465649,"punctuation_ratio":0.2027972,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99804574,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-04T05:20:17Z\",\"WARC-Record-ID\":\"<urn:uuid:c071a42d-b4fa-4408-8ee9-2ec87c43a212>\",\"Content-Length\":\"24266\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:953a54ff-7d9b-4826-acc1-7a331a95c5d8>\",\"WARC-Concurrent-To\":\"<urn:uuid:8b2b6ddb-0fb0-497e-874c-926e85ba8802>\",\"WARC-IP-Address\":\"144.217.110.12\",\"WARC-Target-URI\":\"http://www.cplusplus.com/reference/cmath/fmin/\",\"WARC-Payload-Digest\":\"sha1:TTPKRSWXED7I2LQFZPGAWCWJWTIXFPYQ\",\"WARC-Block-Digest\":\"sha1:56IZZBQM5XNPWL36H54LMDC2KJWOR2UD\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964362930.53_warc_CC-MAIN-20211204033320-20211204063320-00526.warc.gz\"}"}