1 * Could probably return immediately for exact zeros in 3j,6j,9j
2 functions. Easiest to implement for 3j.
4 Note from Serge Winitzki <serge@cosmos.phy.tufts.edu>:
6 The package "matpack" (www.matpack.de) includes many special functions,
7 also the 3j symbols. They refer to some quite complicated numerical
8 methods using recursion relations to get the right answers for large
9 momenta, and to 1975-1976 papers by Schulten and Gordon for the
10 description of the algorithms. The papers can be downloaded for free at
11 http://www.ks.uiuc.edu/Publications/Papers/
13 http://www.ks.uiuc.edu/Publications/Papers/abstract.cgi?tbcode=SCHU76B
14 http://www.ks.uiuc.edu/Publications/Papers/abstract.cgi?tbcode=SCHU75A
15 http://www.ks.uiuc.edu/Publications/Papers/abstract.cgi?tbcode=SCHU75
17 * add Fresnel Integrals to specfunc. See TOMS 723 + 2 subsequent
20 * make mode variables consistent in specfunc -- some seem to be
21 unnecessary from performance point of view since the speed difference
24 * From: "Alexander Babansky" <babansky@mail.ru>
25 To: "Brian Gough" <bjg@network-theory.co.uk>
27 Date: Sun, 3 Nov 2002 14:15:15 -0500
30 May I suggest you to add another function to gsl-1.2 ?
31 It's a modified Ei(x) function:
35 As u might know, Ei(x) raises as e^x on the negative interval.
36 Therefore, Ei(100) is very very large.
37 But Ei(100)*exp(-100) = 0.010;
39 Unfortunately, if u try x=800 u'll get overflow in Ei(800).
40 but Ei(800)*exp(-800) should be around 0.0001;
42 Modified function Em(x) is used in cos, sin integrals such as:
43 int_0^\infinity dx sin(bx)/(x^2+z^2)=(1/2z)*(Em(bz)-Em(-bz));
45 int_0^\infinity dx x cos(bx)/(x^2+z^2)=(1/2)*(Em(bz)+Em(-bz));
47 One of possible ways to add it to the library is:
48 Em(x) = - PV int_0^\infinity e^(-t)/(t+x) dt
53 DONE: Wed Nov 6 13:06:42 MST 2002 [GJ]
56 ----------------------------------------------------------------------
58 The following should be finished before a 1.0 level release.
60 * Implement the conicalP_sph_reg() functions.
61 DONE: Fri Nov 6 23:33:53 MST 1998 [GJ]
63 * Irregular (Q) Legendre functions, at least
64 the integer order ones. More general cases
66 DONE: Sat Nov 7 15:47:35 MST 1998 [GJ]
68 * Make hyperg_1F1() work right.
69 This is the last remaining source of test failures.
70 The problem is with an unstable recursion in certain cases.
71 Look for the recursion with the variable named "start_pair";
72 this is stupid hack to keep track of when the recursion
73 result is going the wrong way for awhile by remembering the
74 minimum value. An error estimate is amde from that. But it
75 is just a hack. Somethign must be done abou that case.
77 * Clean-up Coulomb wave functions. This does not
78 mean completing a fully controlled low-energy
79 evaluation, which is a larger project.
80 DONE: Sun May 16 13:49:47 MDT 1999 [GJ]
82 * Clean-up the Fermi-Dirac code. The full Fermi-Dirac
83 functions can probably wait until a later release,
84 but we should have at least the common j = integer and
85 j = 1/2-integer cases for the 1.0 release. These
87 DONE: Sat Nov 7 19:46:27 MST 1998 [GJ]
89 * Go over the tests and make sure nothing is left out.
91 * Sanitize all the error-checking, error-estimation,
92 algorithm tuning, etc.
94 * Fill out our scorecard, working from Lozier's
95 "Software Needs in Special Functions" paper.
97 * Final Seal of Approval
98 This section has itself gone through several
99 revisions (sigh), proving that the notion of
100 done-ness is ill-defined. So it is worth
101 stating the criteria for done-ness explicitly:
102 o interfaces stabilized
103 o error-estimation in place
104 o all deprecated constructs removed
544 ----------------------------------------------------------------------
546 The following are important but probably will
547 not see completion before a 1.0 level release.
549 * Incomplete Fermi-Dirac functions.
550 Other Fermi-Dirac functions, including the
551 generic 1/2-integer case, which was not done.
553 * Implement the low-energy regime for the Coulomb
554 wave functions. This is fairly well understood in
555 the recent literature but will require some
556 detailed work. Specifically this means creating
557 a drop-in replacement for coulomb_jwkb() which
558 is controlled and extensible.
560 * General Legendre functions (at least on the cut).
561 This subsumes the toroidal functions, so we need not
562 consider those separately. SLATEC code exists (originally
565 * Characterize the algorithms. A significant fraction of
566 the code is home-grown and it should be reviewed by
570 ----------------------------------------------------------------------
572 The following are extra features which need not
573 be implemented for a version 1.0 release.
575 * Spheroidal wave functions.
579 * Weierstrass elliptic functions.
582 ----------------------------------------------------------------------
584 Improve accuracy of ERF
586 NNTP-Posting-Date: Thu, 11 Sep 2003 07:41:42 -0500
587 From: "George Marsaglia" <geo@stat.fsu.edu>
588 Newsgroups: comp.lang.c
589 References: <t4J7b.18514$98.4310@nwrddc03.gnilink.net>
590 Subject: Re: When (32-bit) double precision isn't precise enough
591 Date: Thu, 11 Sep 2003 08:41:40 -0400
593 X-MSMail-Priority: Normal
594 X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
595 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
596 Message-ID: <wq2dnQBikNwb8P2iU-KYvg@comcast.com>
598 NNTP-Posting-Host: 68.35.247.101
599 X-Trace: sv3-4YY+jkhhdeQvGKAREa99vDBFHJoKVqVBdUTSuRxA71OwlgxX0uUFnKYs54FlnUs0Xb6BRngKigkd75d!tKin8l8rAQKylaP+4vzTI3AO33bivOw1lKDZUUtXe4lUMW1qn+goUp/Pfksstg==
600 X-Complaints-To: abuse@comcast.net
601 X-DMCA-Complaints-To: dmca@comcast.net
602 X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
603 X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
607 Why most of those who deal with the normal integral in probability
608 theory are still stuck with the historical baggage of the error function
609 is a puzzle to me, as is the poor quality of the results one gets from
610 standard library implementations of erf(). (One of the most common
611 is based on ALGORITHM AS66, APPL. STATIST.(1973) Vol.22, .424 by HILL,
612 which gives only 6-8 digit accuracy).
614 Here is a listing of my method:
617 Marsaglia Complementary Normal Distribution Function
618 cPhi(x) = integral from x to infinity of exp(-.5*t^2)/sqrt(2*pi), x<15
619 15-digit accuracy for x<15, returns 0 for x>15.
623 double cPhi(double x){
624 long double v[]={0.,.65567954241879847154L,
625 .42136922928805447322L,.30459029871010329573L,
626 .23665238291356067062L,.19280810471531576488L,
627 .16237766089686746182L,.14010418345305024160L,
628 .12313196325793229628L,.10978728257830829123L,
629 .99028596471731921395e-1L,.90175675501064682280e-1L,
630 .82766286501369177252e-1L,.76475761016248502993e-1L,
631 .71069580538852107091e-1L,.66374235823250173591e-1L};
632 long double h,a,b,z,t,sum,pwr;
634 if(x>15.) return (0.);
635 if(x<-15.) return (1.);
650 sum=sum*exp(-.5*x*x-.91893853320467274178L);
652 return ((double) sum);
658 The method is based on defining phi(x)=exp(-x^2)/sqrt(2pi) and
662 The function R(x) is well-behaved and terms of its Taylor
663 series are readily obtained by a two-term recursion. With an accurate
664 representation of R(x) at ,say, x=0,1,2,...,15, a simple evaluation
665 of the Taylor series at intermediate points provides up to
666 15 digits of accuracy.
667 An article describing the method will be in the new version of
668 my Diehard CDROM. A new version of the Diehard tests
669 of randomness (but not yet the new DVDROM) is at
670 http://www.csis.hku.hk/~diehard/