Changeset 71

Show
Ignore:
Timestamp:
03/27/06 06:28:04 (3 years ago)
Author:
Don Clugston
Message:

Moved all files to 'mathextra' subdirectory, and updated module names accordingly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/makeall.bat

    r69 r71  
    1 dmd -Dddocs -unittest -cov -debug test.d mathstat.d mathspecial.d realtest.d complex.d student.d gammadist.d betadist.d etcgamma.d normaldist.d bitmanip.d mathtempl.d bessel.d elliptic.d findroot.d minimize.d mathutil.d leastsqr.d testconsistency.d 
    2 del *.obj 
     1build -Dddocs -unittest -cov -debug test 
  • trunk/mathextra/bessel.d

    r61 r71  
    44//   Copyright 1994 by Stephen L. Moshier (moshier@world.std.com). 
    55 
    6 module bessel; 
     6module mathextra.bessel; 
    77 
    88debug private import std.stdio; 
  • trunk/mathextra/betadist.d

    r56 r71  
    4141 *  NAN = $(RED NAN) 
    4242 */ 
    43 private import normaldist; 
     43module mathextra.betadist; 
     44 
     45private import std.math; 
     46private import mathextra.normaldist; 
    4447debug import std.stdio; 
    4548 
     
    5659 
    5760// There are still problems with std.math.tgamma. 
    58 private import etcgamma; 
    59 alias etcgamma.tgamma gamma; 
    60 alias etcgamma.lgamma loggamma; 
     61private import mathextra.etcgamma; 
     62alias mathextra.etcgamma.tgamma gamma; 
     63alias mathextra.etcgamma.lgamma loggamma; 
    6164 
    6265/* 
  • trunk/mathextra/bitmanip.d

    r53 r71  
    33 */ 
    44// Author: Don Clugston. License: Public Domain. 
    5 module bitmanip; 
     5module mathextra.bitmanip; 
    66 
    77import std.intrinsic; 
  • trunk/mathextra/complex.d

    r64 r71  
    2727 * faster than the complex equivalent. 
    2828 */ 
    29  module complex; 
     29module mathextra.complex; 
    3030 private import std.math; 
    31  private import realtest; 
     31 private import mathextra.realtest; 
    3232debug private import std.stdio; 
    3333 
  • trunk/mathextra/elliptic.d

    r60 r71  
    2929 * $(LINK http://www.netlib.org/cephes/ldoubdoc.html) 
    3030 */ 
    31 module elliptic; 
     31module mathextra.elliptic; 
    3232 
    3333import std.math; 
  • trunk/mathextra/etcgamma.d

    r51 r71  
    1414 *  NAN = $(RED NAN) 
    1515 */ 
    16 module etcgamma; 
     16module mathextra.etcgamma; 
    1717 
    1818private import std.math; 
    19 import realtest; 
     19private import mathextra.realtest; 
    2020debug import std.stdio; 
    2121 
     
    318318    const real SQRT_PI = 1.77245385090551602729816748334114518279754945612238L; 
    319319 
    320     assert(feqrel(etcgamma.tgamma(0.5L), SQRT_PI) == real.mant_dig);  
    321  
    322   assert(feqrel(etcgamma.tgamma(1.0/3.L),  2.67893853470774763365569294097467764412868937795730L)>= real.mant_dig-2); 
    323   assert(feqrel(etcgamma.tgamma(0.25L), 
     320    assert(feqrel(tgamma(0.5L), SQRT_PI) == real.mant_dig);  
     321 
     322  assert(feqrel(tgamma(1.0/3.L),  2.67893853470774763365569294097467764412868937795730L)>= real.mant_dig-2); 
     323  assert(feqrel(tgamma(0.25L), 
    324324  3.62560990822190831193068515586767200299516768288006)>= real.mant_dig-1); 
    325   assert(feqrel(etcgamma.tgamma(1.0/5.0L), 
     325  assert(feqrel(tgamma(1.0/5.0L), 
    326326  4.59084371199880305320475827592915200343410999829340L)>= real.mant_dig-1); 
    327327} 
  • trunk/mathextra/findroot.d

    r64 r71  
    11/** Algorithms for finding roots of functions. 
    22*/ 
    3 module findroot; 
     3module mathextra.findroot; 
    44 
    55import std.math; 
  • trunk/mathextra/gammadist.d

    r51 r71  
    11// incomplete gamma functions 
    22 
    3 module gammadist; 
     3module mathextra.gammadist; 
    44private import std.math; 
    5 private import normaldist; 
     5private import mathextra.normaldist; 
    66debug import std.stdio; 
    77 
     
    1111 
    1212// There are still problems with std.math.tgamma. 
    13 private import etcgamma; 
    14 alias etcgamma.tgamma gamma; 
    15 alias etcgamma.lgamma loggamma; 
     13private import mathextra.etcgamma; 
     14alias mathextra.etcgamma.tgamma gamma; 
     15alias mathextra.etcgamma.lgamma loggamma; 
    1616 
    1717 
  • trunk/mathextra/leastsqr.d

    r66 r71  
    11// Cholesky decomposition 
    2  
     2module mathextra.leastsqr; 
    33import std.math; 
    44 
  • trunk/mathextra/mathspecial.d

    r51 r71  
    2020 */ 
    2121  
    22 module mathspecial; 
     22module mathextra.mathspecial; 
    2323 
    2424private import std.math; 
  • trunk/mathextra/mathstat.d

    r52 r71  
    5050 * Copyright 1985, 1995 by Stephen L. Moshier 
    5151 */ 
    52 module mathstat; 
     52module mathextra.mathstat; 
    5353 
    5454private import std.math; 
    5555// normalDistribution, normalDistributionInv() 
    56 private import normaldist; 
     56private import mathextra.normaldist; 
    5757// formerly betaIncomplete, betaIncompleteInv() 
    5858// betaDistribution, betaDistributionInv(). 
    59 private import betadist; 
     59private import mathextra.betadist; 
    6060// studentsDistribution(), studentsDistributionInv() 
    61 private import student; 
    62 private import gammadist; 
     61private import mathextra.student; 
     62private import mathextra.gammadist; 
    6363debug import std.stdio; 
    6464 
     
    291291real normalDistribution(real x) 
    292292{ 
    293   return normaldist.normalDistribution(x); 
     293  return mathextra.normaldist.normalDistribution(x); 
    294294} 
    295295 
     
    309309real normalDistributionInv(real y) 
    310310{ 
    311   return normaldist.normalDistribution(y); 
     311  return mathextra.normaldist.normalDistribution(y); 
    312312} 
    313313 
     
    390390real gammaIncomplete(real a, real x ) 
    391391{  
    392     return gammadist.gammaIncomplete(a, x); 
     392    return mathextra.gammadist.gammaIncomplete(a, x); 
    393393} 
    394394 
     
    396396real gammaIncompleteCompl(real a, real x ) 
    397397{ 
    398     return gammadist.gammaIncompleteCompl(a, x); 
     398    return mathextra.gammadist.gammaIncompleteCompl(a, x); 
    399399} 
    400400 
     
    414414real gammaIncompleteComplInv(real a, real y0 ) 
    415415{ 
    416     return gammadist.gammaIncompleteComplInv(a, y0); 
     416    return mathextra.gammadist.gammaIncompleteComplInv(a, y0); 
    417417} 
    418418 
     
    625625real studentsDistribution(int nu, real t) 
    626626{ 
    627    return student.studentsDistribution(nu, t); 
     627   return mathextra.student.studentsDistribution(nu, t); 
    628628} 
    629629 
     
    644644real studentsDistributionInv(int nu, real p ) 
    645645{ 
    646   return student.studentsDistributionInv(nu, p); 
     646  return mathextra.student.studentsDistributionInv(nu, p); 
    647647} 
    648648 
     
    670670real betaDistribution(real a, real b, real x ) 
    671671{ 
    672    return betadist.betaDistribution(a, b, x ); 
     672   return mathextra.betadist.betaDistribution(a, b, x ); 
    673673} 
    674674 
     
    676676real betaDistributionInv(real a, real b, real y) 
    677677{ 
    678     return betadist.betaDistributionInv(a, b, y); 
    679 } 
     678    return mathextra.betadist.betaDistributionInv(a, b, y); 
     679} 
  • trunk/mathextra/mathtempl.d

    r55 r71  
    2626 */ 
    2727 
    28 module mathtempl; 
     28module mathextra.mathtempl; 
    2929debug import std.stdio; 
    3030 
  • trunk/mathextra/mathutil.d

    r64 r71  
    33 * 
    44 */ 
     5module mathextra.mathutil; 
    56 
    67import std.stdio; 
  • trunk/mathextra/minimize.d

    r68 r71  
    1  
     1module mathextra.minimize; 
    22private import std.math; 
    33debug private import std.stdio; 
  • trunk/mathextra/normaldist.d

    r51 r71  
    99 *  SUP = <span style="vertical-align:super;font-size:smaller">$0</span> 
    1010 */ 
    11 module normaldist; 
     11module mathextra.normaldist; 
    1212private import std.math; 
    1313debug import std.stdio; 
  • trunk/mathextra/realtest.d

    r51 r71  
    33 * Not intended for inclusion in a standard library. 
    44 */ 
    5 module realtest; 
     5module mathextra.realtest; 
    66import std.stdio; 
    77import std.math; 
  • trunk/mathextra/student.d

    r51 r71  
    55 *  POWER = $1<sup>$2</sup> 
    66 */ 
    7 module student; 
     7module mathextra.student; 
    88private import std.math; 
    9 private import betadist; 
    10 private import normaldist; 
     9private import mathextra.betadist; 
     10private import mathextra.normaldist; 
    1111debug private import std.stdio; 
    1212 
  • trunk/mathextra/testconsistency.d

    r51 r71  
    44 80-bit reals. 
    55*/ 
     6module mathextra.testconsistency; 
    67 
    78import std.stdio; 
    8 import realtest; 
     9import mathextra.realtest; 
    910 
    10 import mathstat; 
    11 import mathspecial; 
     11import mathextra.mathstat; 
     12import mathextra.mathspecial; 
    1213 
    1314 
     
    1819real loggamma(real x) { return std.math.lgamma(x); } 
    1920 
    20 import etcgamma; 
    21 alias etcgamma.tgamma gamma; 
     21import mathextra.etcgamma; 
     22alias mathextra.etcgamma.tgamma gamma; 
    2223//alias etcgamma.lgamma loggamma; 
    2324 
    2425 
    25 import complex; 
     26import mathextra.complex; 
    2627// do this just so it will compile. 
    2728 real cosh(real x) { return std.math.cosh(x); } 
  • trunk/test.d

    r69 r71  
    11// Include everything for unit tests. 
    2 module mathextra
     2module test
    33 
    4 import mathstat; 
    5 import mathspecial; 
    6 import complex; 
     4import mathextra.mathstat; 
     5import mathextra.mathspecial; 
     6import mathextra.complex; 
     7import mathextra.student; 
     8import mathextra.gammadist; 
     9import mathextra.betadist; 
     10import mathextra.etcgamma; 
     11import mathextra.normaldist; 
     12import mathextra.bitmanip; 
     13import mathextra.mathtempl; 
     14import mathextra.bessel; 
     15import mathextra.elliptic; 
     16import mathextra.findroot; 
     17import mathextra.minimize; 
     18import mathextra.mathutil; 
     19import mathextra.leastsqr; 
     20 
    721import std.stdio; 
    8 import testconsistency; 
     22import mathextra.testconsistency; 
     23import mathextra.realtest; 
     24 
    925 
    1026int main()