Bug 17007 – let std.math work in CTFE

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-12-22T16:32:58Z
Last change time
2024-12-01T16:28:39Z
Assigned to
No Owner
Creator
Seb
Depends on
20197, 17705, 20159, 20192, 20196, 20198, 20199, 20200, 20202, 20203, 21407, 21408
See also
https://issues.dlang.org/show_bug.cgi?id=16296, https://issues.dlang.org/show_bug.cgi?id=20197
Moved to GitHub: phobos#10217 →

Comments

Comment #0 by greeenify — 2016-12-22T16:32:58Z
(There's a lot of custom assembler code) So there are already community-driven projects out there, e.g. https://code.dlang.org/packages/ctstdmath
Comment #1 by n8sh.secondary — 2019-08-23T21:51:52Z
*** Issue 18630 has been marked as a duplicate of this issue. ***
Comment #2 by simen.kjaras — 2019-08-26T08:23:20Z
These functions currently fail in CTFE: nextPow2/truncPow2: reinterpreting as ushort. (both call same function) nextDown/nextUp/nextafter: reinterpreting as ulong. lrint: inline assembly. ilogb: reinterpreting in union. cmp: reinterpreting in union. frexp: reinterpreting as ushort, int and/or long. feqrel: reinterpreting as ushort. isNormal: reinterpreting as ushort. isPowerOf2: reinterpreting as ushort. NaN: reinterpreting as ulong. getNaNPayload: reinterpreting as ulong. isIdentical: reinterpreting as long. isSubnormal: reinterpreting as uint. atan/atan2: reinterpreting as ubyte. (both call same function) signbit: reinterpreting as ubyte. remainder: intrinsic. cbrt: intrinsic. fmod: intrinsic. modf: intrinsic. logb: intrinsic. nearbyint: intrinsic. rint: intrinsic. rndtol: intrinsic. lround: intrinsic. expi: inline assembly. This function is deprecated. quantize: depends on rint by default, works with other rounding functions.
Comment #3 by robert.schadek — 2024-12-01T16:28:39Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10217 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB