Changeset 28
- Timestamp:
- 12/07/05 04:33:40 (3 years ago)
- Files:
-
- trunk/makeall.bat (modified) (1 diff)
- trunk/maketest.bat (modified) (1 diff)
- trunk/mathspecial.d (modified) (1 diff)
- trunk/normaldist.d (modified) (1 diff)
- trunk/testconsistency.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/makeall.bat
r20 r28 1 dmd -Dddocs -unittest mathextra.d mathstat.d mathspecial.d realtest.d complex.d student.d gammadist.d betadist.d etcgamma.d normaldist.d bitoperations.d1 dmd -Dddocs -unittest -cov mathextra.d mathstat.d mathspecial.d realtest.d complex.d student.d gammadist.d betadist.d etcgamma.d normaldist.d bitoperations.d trunk/maketest.bat
r25 r28 1 build -unittest realtest.d testconsistency.d1 build -unittest -cov realtest.d testconsistency.d trunk/mathspecial.d
r19 r28 145 145 146 146 unittest { 147 // x*exp(x). Used only for testing 148 real productExp(real x) 149 { 150 return x*exp(x); 151 } 152 147 153 assert(productLog(-1/E)==-1); 148 154 assert(isnan(productLog(real.nan))); 149 155 assert(productLog(E)==1); 156 assert(isnan(productLog(-5))); 157 assert(productLog(productExp(0.25))==0.25); 158 assert(productLog(productExp(2))==2); 159 //printf("%a", productLog_1(productExp(-10))); 160 // assert(productLog_1(productExp(-2))==-2); 150 161 151 162 assert(productLog_1(-1/E)==-1); trunk/normaldist.d
r25 r28 10 10 */ 11 11 module normaldist; 12 //import etcgamma; 13 import std.math; 14 15 //alias etcgamma.tgamma mytgamma; 16 //alias etcgamma.lgamma mylgamma; 12 private import std.math; 17 13 18 14 trunk/testconsistency.d
r27 r28 10 10 import mathstat; 11 11 import mathspecial; 12 import std.math; // for lgamma, tgamma 12 //import std.math; // for lgamma, tgamma 13 14 // std.math.tgamma and lgamma are STILL buggy! 13 15 import etcgamma; 14 16 15 17 alias etcgamma.tgamma tgamma; 16 18 alias etcgamma.lgamma lgamma; 19 20 import complex; 21 // do this just so it will compile. 22 real cosh(real x) { return std.math.cosh(x); } 23 real sinh(real x) { return std.math.sinh(x); } 24 real sin(real x) { return std.math.sin(x); } 25 real cos(real x) { return std.math.cos(x); } 26 real exp(real x) { return std.math.exp(x); } 27 real log(real x) { return std.math.log(x); } 28 real atan(real x) { return std.math.atan(x); } 29 30 17 31 // ------------------------------- 18 32 // Tests of standard mathematical functions
