Bug 12946 – Problems with floating point ^^ at compile time

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-06-19T11:35:00Z
Last change time
2015-06-09T05:14:48Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-06-19T11:35:09Z
void main() { import std.math; enum x = 2.0 ^^ 1.5; } dmd 2.066alpha gives: ...\dmd2\src\phobos\std\math.d(4012,47): Error: Cannot convert &real to ushort* at compile time ...\dmd2\src\phobos\std\math.d(5078,18): called from here: isNaN(y) ...\dmd2\src\phobos\std\math.d(5250,16): called from here: impl(cast(real)x, cast(real)y) test.d(3,14): called from here: pow(2.00000, 1.5)
Comment #1 by safety0ff.bugz — 2014-12-31T16:37:57Z
*** This issue has been marked as a duplicate of issue 5227 ***