September 05, 2007 [Issue 1476] New: allow to use intrinsic math functions (e.g. trigonometry) in CTFEs | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1476 Summary: allow to use intrinsic math functions (e.g. trigonometry) in CTFEs Product: D Version: 1.021 Platform: PC OS/Version: Windows Status: NEW Severity: enhancement Priority: P3 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: thecybershadow@gmail.com The compiler already supports some math functions, like the trigonometric ones, as intrinsics, since it inlines them even when -inline is not specified. It would greatly add to CTFEs if it were possible to call such functions in compile-time functions. For example, Pi could be calculated at compile-time using: const double PI = atan(1)*4; Sine tables could also be pre-calculated at compile time, etcetera. -- |
September 05, 2007 [Issue 1476] allow to use intrinsic math functions (e.g. trigonometry) in CTFEs | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1476 thecybershadow@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #1 from thecybershadow@gmail.com 2007-09-05 15:06 ------- gah... hand jerked while clicking "Submit" *** This bug has been marked as a duplicate of 1475 *** -- |
Copyright © 1999-2021 by the D Language Foundation