[phobos] CTFE Math

David Simcha dsimcha at gmail.com
Sat Jan 30 07:51:11 PST 2010

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