source:
azure_iot_hub/trunk/musl-1.1.18/src/math/fmin.c@
389
Last change on this file since 389 was 389, checked in by , 5 years ago | |
---|---|
|
|
File size: 242 bytes |
Line | |
---|---|
1 | #include <math.h> |
2 | |
3 | double fmin(double x, double y) |
4 | { |
5 | if (isnan(x)) |
6 | return y; |
7 | if (isnan(y)) |
8 | return x; |
9 | /* handle signed zeros, see C99 Annex F.9.9.2 */ |
10 | if (signbit(x) != signbit(y)) |
11 | return signbit(x) ? x : y; |
12 | return x < y ? x : y; |
13 | } |
Note:
See TracBrowser
for help on using the repository browser.