diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/s_fmax_template.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/math/s_fmax_template.c b/math/s_fmax_template.c index d817406f04..4a88266e71 100644 --- a/math/s_fmax_template.c +++ b/math/s_fmax_template.c @@ -17,10 +17,14 @@ <https://www.gnu.org/licenses/>. */ #include <math.h> +#include <math-use-builtins.h> FLOAT M_DECL_FUNC (__fmax) (FLOAT x, FLOAT y) { +#if M_USE_BUILTIN (FMAX) + return M_SUF (__builtin_fmax) (x, y); +#else if (isgreaterequal (x, y)) return x; else if (isless (x, y)) @@ -29,6 +33,7 @@ M_DECL_FUNC (__fmax) (FLOAT x, FLOAT y) return x + y; else return isnan (y) ? x : y; +#endif } declare_mgen_alias (__fmax, fmax); |