digitalmars.D - CTFE pow()
- Manu via Digitalmars-d (4/4) Jan 01 2015 Does anyone know how to fix this? Can we please do so? It's been a
- Andrei Alexandrescu (3/7) Jan 01 2015 I've been hoping for that too for a long time. Application to memoizatio...
- Shammah Chancellor (2/10) Jan 12 2015 I think that SDC can do this already. :D
- Xinok (10/16) Jan 01 2015 I was looking for a relevant issue in the bug tracker. I stumbled
- Martin Nowak (6/12) Jan 12 2015 Oh, we got yl2x recently [1].
- Martin Nowak (1/1) Jan 12 2015 https://issues.dlang.org/show_bug.cgi?id=3749
Does anyone know how to fix this? Can we please do so? It's been a problem for like 5 years it seems. It's a bit insane that we can't resolve any non-linear functions at compile time.
Jan 01 2015
Manu via Digitalmars-d <digitalmars-d puremagic.com> wrote:Does anyone know how to fix this? Can we please do so? It's been a problem for like 5 years it seems. It's a bit insane that we can't resolve any non-linear functions at compile time.I've been hoping for that too for a long time. Application to memoization tables is immediate and awesome. -- Andrei
Jan 01 2015
On 2015-01-01 17:59:09 +0000, Andrei Alexandrescu said:Manu via Digitalmars-d <digitalmars-d puremagic.com> wrote:I think that SDC can do this already. :DDoes anyone know how to fix this? Can we please do so? It's been a problem for like 5 years it seems. It's a bit insane that we can't resolve any non-linear functions at compile time.I've been hoping for that too for a long time. Application to memoization tables is immediate and awesome. -- Andrei
Jan 12 2015
On Thursday, 1 January 2015 at 16:56:24 UTC, Manu via Digitalmars-d wrote:Does anyone know how to fix this? Can we please do so? It's been a problem for like 5 years it seems. It's a bit insane that we can't resolve any non-linear functions at compile time.I was looking for a relevant issue in the bug tracker. I stumbled upon issue [1] and pull request [2] which was closed for the following reasons: 1. if(__ctfe) kills inlining in DMD. 2. Other CTFE math can not be implemented until CTFE-able unions. [1] https://issues.dlang.org/show_bug.cgi?id=5227 [2] https://github.com/D-Programming-Language/phobos/pull/2521#issuecomment-56265251
Jan 01 2015
On Thursday, 1 January 2015 at 16:56:24 UTC, Manu via Digitalmars-d wrote:Does anyone know how to fix this? Can we please do so? It's been a problem for like 5 years it seems. It's a bit insane that we can't resolve any non-linear functions at compile time.Oh, we got yl2x recently [1]. So, your code here -> https://github.com/D-Programming-Language/dmd/blob/6fe4b48891ff5d7d171f718b2a4af6ddbb6714ec/src/builtin.c#L183 [1]: https://github.com/D-Programming-Language/dmd/pull/4012
Jan 12 2015