From dd696e7c75c5fb630d10d0ce37e53d88fecb58a0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 29 Sep 2019 22:07:02 +0200 Subject: [PATCH] LibM: Fix Toolchain build We can't rely on libstdc++ inside LibC or LibM, since these libraries are part of the Toolchain bringup build. --- Libraries/LibM/math.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/LibM/math.cpp b/Libraries/LibM/math.cpp index f50eb861a11..a45e4fcc7d7 100644 --- a/Libraries/LibM/math.cpp +++ b/Libraries/LibM/math.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include @@ -122,7 +121,7 @@ double exp(double exponent) if (integer_part & 8) result *= e_to_power<8>(); if (integer_part & 16) result *= e_to_power<16>(); if (integer_part & 32) result *= e_to_power<32>(); - if (integer_part >= 64) return std::numeric_limits::infinity(); + if (integer_part >= 64) return __builtin_huge_val(); } exponent -= integer_part; } else if (exponent < 0)