From a56287dd8b51c711be9dca43792194ecd4cf502f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Ferreira?= Date: Mon, 2 May 2022 00:15:58 +0100 Subject: [PATCH] chore(math/exponential): avoid import constants if not InlineAsm_X87 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luís Ferreira --- std/math/exponential.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/std/math/exponential.d b/std/math/exponential.d index aa8e887a3..2b3779dd8 100644 --- a/std/math/exponential.d +++ b/std/math/exponential.d @@ -968,10 +968,10 @@ if (isUnsigned!F && isUnsigned!G && isUnsigned!H) pragma(inline, true) real exp(real x) @trusted pure nothrow @nogc // TODO: @safe { - import std.math.constants : LOG2E; - version (InlineAsm_X87) { + import std.math.constants : LOG2E; + // e^^x = 2^^(LOG2E*x) // (This is valid because the overflow & underflow limits for exp // and exp2 are so similar).