[phobos] CTFE Math

Andrei Alexandrescu andrei at erdani.com
Sat Jan 30 07:36:29 PST 2010


Would be great if you did!

Andrei

P.S. Please use phobos at puremagic.com instead of phobos at erdani.com. If 
you haven't subscribed already, you missed out! Subscribe at 
http://lists.puremagic.com/

David Simcha wrote:
> Now that __ctfe has officially been folded into the compiler, is anyone 
> else already planning on making most of std.math CTFE-compatible?  If 
> not, I'll probably start working on this.  Also, as far as the design, I 
> think there should probably be a separate etc.ctfemath module under the 
> hood (though not exposed to the user).  std.math would import this 
> module and do something like:
> 
> real someFun(real num) {
>     if(__ctfe) {
>         return etc.ctfemath.someFun(num);
>    }
> 
>     // RTFE implementation.
> }
> 
> This would make things a lot easier to test, etc.


More information about the phobos mailing list