| 1 |
// Include everything for unit tests. |
|---|
| 2 |
module test; |
|---|
| 3 |
|
|---|
| 4 |
import mathextra.mathstat; |
|---|
| 5 |
import mathextra.mathspecial; |
|---|
| 6 |
import mathextra.complex; |
|---|
| 7 |
import mathextra.student; |
|---|
| 8 |
import mathextra.gammadist; |
|---|
| 9 |
import mathextra.betadist; |
|---|
| 10 |
import mathextra.etcgamma; |
|---|
| 11 |
import mathextra.normaldist; |
|---|
| 12 |
import mathextra.bitmanip; |
|---|
| 13 |
import mathextra.mathtempl; |
|---|
| 14 |
import mathextra.bessel; |
|---|
| 15 |
import mathextra.elliptic; |
|---|
| 16 |
import mathextra.RealAnalysis; |
|---|
| 17 |
import mathextra.mathutil; |
|---|
| 18 |
import mathextra.leastsqr; |
|---|
| 19 |
import mathextra.ieee; |
|---|
| 20 |
|
|---|
| 21 |
import std.stdio; |
|---|
| 22 |
import mathextra.testconsistency; |
|---|
| 23 |
import mathextra.realtest; |
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
int main() |
|---|
| 27 |
{ |
|---|
| 28 |
//writefln(gammaIncompleteComplInv(8, 0)); |
|---|
| 29 |
//writefln(gammaIncompleteCompl(8, 5.0)); |
|---|
| 30 |
|
|---|
| 31 |
//writefln(gammaIncompleteComplInv(8, real.min*real.epsilon)); |
|---|
| 32 |
// writefln("All tests complete"); |
|---|
| 33 |
// writefln(betaDistribution(1.16251e20, 2.18e39, 5.45e-20)); |
|---|
| 34 |
|
|---|
| 35 |
/+ |
|---|
| 36 |
real w = betadist.betaDistributionInv( 0.5L*16, 0.5L*4, 0.008); |
|---|
| 37 |
writefln("%.30g should be %.30g", w, 0.442306518554687L); |
|---|
| 38 |
writefln("%.30g", betadist.betaDistribution(0.5L*16, 0.5L*4, w)); |
|---|
| 39 |
writefln("%a %a", std.math.log(real.max), std.math.log(real.min*real.epsilon)); |
|---|
| 40 |
+/ |
|---|
| 41 |
// writefln("%.10f", binomialDistribution(3, 10, 0.3), " ", 0.649610718); |
|---|
| 42 |
return 0; |
|---|
| 43 |
} |
|---|