www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14969] New: cannot evaluate atan at compile time

https://issues.dlang.org/show_bug.cgi?id=14969

          Issue ID: 14969
           Summary: cannot evaluate atan at compile time
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: yosikawa altalk.com

import std.math;
enum foo = atan(1.0);

above code failed to compile using
DMD32 D Compiler v2.068.0

Building Debug\T38DTest.exe...
C:\APP\D\dmd2\windows\bin\..\..\src\phobos\std\math.d(1135): Error: asm
statements cannot be interpreted at compile time
C:\APP\D\dmd2\windows\bin\..\..\src\phobos\std\math.d(1023):        called from
here: atan2(x, 1.00000L)
C:\APP\D\dmd2\windows\bin\..\..\src\phobos\std\math.d(1087):        called from
here: atan(cast(real)x)
main.d(2):        called from here: atan(1.00000)

--
Aug 26 2015