diff options
Diffstat (limited to 'winsup/cygwin/math/fmaxl.c')
-rw-r--r-- | winsup/cygwin/math/fmaxl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/math/fmaxl.c b/winsup/cygwin/math/fmaxl.c new file mode 100644 index 000000000..4ac6e2194 --- /dev/null +++ b/winsup/cygwin/math/fmaxl.c @@ -0,0 +1,13 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ +#include <math.h> + +long double +fmaxl (long double _x, long double _y) +{ + return (__builtin_isgreaterequal (_x, _y) || __builtin_isnan (_y)) + ? _x : _y; +} |