mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
chore(math/exponential): avoid import constants if not InlineAsm_X87
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
19c6e8d251
commit
a56287dd8b
1 changed files with 2 additions and 2 deletions
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue