From d9cab29a3155c101b2c41ecc312bdbcd68729d15 Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Sun, 20 Mar 2016 19:32:38 +0100 Subject: [PATCH] [ltsmaster] std.math.pow: change type from `double` to `real` for internal variable. This change fixes a unittest failure with LDC with optimizations on. Note that the return type of `impl` is `real` (not `Float`) and thus changing the type of `sign` to `real` should not matter / be more correct? I am not sure why `w` on line 6299 is of type `Float`. (cherry picked from commit 4b1f2f0147cfa8a6fed9bc9830f72060024d305d) --- std/math.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/math.d b/std/math.d index 11f8835ec42..c8d740d493d 100644 --- a/std/math.d +++ b/std/math.d @@ -7027,7 +7027,7 @@ Unqual!(Largest!(F, G)) pow(F, G)(F x, G y) @nogc @trusted pure nothrow if (iy == y && fabs(y) < 32768.0) return pow(x, iy); - double sign = 1.0; + real sign = 1.0; if (x < 0) { // Result is real only if y is an integer