july 4-6, 2012numerical software workshop: design, analysis and verification 1 dlmf tables: a new...
TRANSCRIPT
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
1
DLMF Tables: A New Source of Data for Mathematical Software
Developers
Daniel LozierMathematical Software Group
Applied & Computational Math Division
Information Technology Laboratory
National Instititute of Standards and Technology
Gaithersburg, MD, 20899-8910 USA
Outline
• A Short History of Function Testing at NBS/NIST, 1971-1997
• The DLMF Project, 1997-2010
• The DLMF Tables Project, 2010-present
• Closing Remarks
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
2
J. Res. NBS, 16(2),1973
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
3
NBS Internal Report, May 1978
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
4
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
5
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
6
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
7
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
8
D.W. Lozier, A Proposed Software Test Servicefor Special Functions, in Quality of NumericalSoftware: Assessment and Enhancement,R.F. Boisvert, ed., Chapman and Hall, London,1997, pp.
The DLMF Project
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
9
1964 1965
20100
500
1000
1500
2000
2500
1971 1977 1983 1989 1995 2001 2007
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
10
Scope of Coverage• Methods (3 chapters)
– Algebraic and analytical methods– Asymptotic approximations– Numerical methods
• Mathematical Functions (33 chapters)– Elementary– Airy, Bessel, Legendre,…– Orthogonal polynomials– Elliptic integrals and functions– Combinatorics, number theory– Mathieu, Lamé, Heun, Painlevé, Coulomb,…
http://dlmf.nist.gov/
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
11
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
12
Website vs. Book• enhanced superset of the book with
cutting-edge IT capabilities:– Color visualizations– Equation search (example: d^n/?^n)– Links
• Internal to symbol definitions, bib items, help…• External to online articles, reviews, software…
– Cut & paste tex, png, MathML– Sample applications
Kelvin’s shipwave
Hankel function
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
13
Some Numbers• 36 chapters
• 876 sections
• 1996 subsections
• 2302 bibliographic items
• 9896 numbered equations
• 608 graphs
• 119 short non-numerical tables
• 976 pages in Cambridge edition
DLMF Tables Project
• NIST collaboration with U. Antwerp– 3 workshops at NIST
• 2009, 2010, 2011
– Telephone conference calls
• Task leaders:– NIST and Antwerp: overall design– Antwerp: compute engine– NIST: web interface
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
14
First Capability
Tables on Demand
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
15
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
16
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
17
Error Bounds
• Let denote relative error and .
• With n digits requested, values are computed with uniformly bounded relative error , and n+2 digits are displayed. No rounding is done.
• The line-by-line absolute errors are indicated by two digits following the sign after digit n+2.
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
18
110 nu
u
End Figures for sin(x) at x = 0.5, 1, 1.5
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
19
40th digit
[71388 0817 98, 71388 0818 08][98999 6225 54, 98999 6225 72][87322 7066 41, 87322 7066 61]
40th digit
Interval interpretation:
Raw Data for sin(x) Example
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
20
Sin 1.5707 to 5,6,7,8 Digits
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
21
[.9999 98, 1.0000 02]
[.99999 98, 1.00000 02]
[.9999999 85, 1.000000 05]
[.99999999 44, .99999999 64]
Second Capability
Comparison to Input Tableof Function Values
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
22
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
23
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
24
Values on lines 2,4,6,8,10,12are taken from Abramowitzand Stegun, Table 9.4, page 407
Previous Slide Zoomed
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
25
We can see the A&Svalues are correctlyrounded, except wecannot see this for .)100(100J
Cannot tell if is correctly roundedbecause of ambiguityin 12D interval value.In fact, it is.
)100(100J
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
26
End figures from A&S, Table 9.4(see previous slide):6866 (line 2)9756 (line 4)2647 (line 6)3144 (line 8)3528 (line 10)7330 (line 12)(intentionally mistyped figuresunderlined in lines 2 and 6)
(with intentionallymistyped A&S values)
Raw Data for Bessel Example
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
27
sin 1.5707 Revisited: Comparison
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
28
5D
6D
7D
Here, becausesin x = x(1+O(x^2)),the comparison valuemust be given to atleast 7D to get thecorrect leading digits inthe interval computation.This leads to the redfigures for 5D and 6D.
Computational Limits
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
29
Per-request execution time limit exists.Excessive repeated requests from same IP are denied.Other limits may become necessary.
Recap 1
• NIST has long history– with special functions– with software testing, especially of functions
• NIST released the DLMF in May 2010
• DLMF Tables not yet accessible to public
• Public release will be fully supported by NIST
• Users will have two new capabilities
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
30
Recap 2: Tables on Demand– Specifiable precision: n digits, up to n=500– Table values displayed to n+2 digits– Error bounded by 1 unit in digit n+1– Bounds certified accurate by NIST– Table values not rounded to n digits but
• Rounding to n digits often discernible• Leading n digits usually correct
– Big improvement over static tables (as in A&S)– Visual display for people– Raw output for computers
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
31
Recap 3: Software Verification• Verify by comparison to standard values
– Tables on Demand generates standard values– User inputs test values manually or from file
• System generates standard values to n digits, displays n+2 digits, where n is determined by input set of test values
• Test digits that differ from standard digits are colored red in visual display
• Raw output is available for computers
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
32
Acknowledgments• Antwerp group for the back end:
– Annie Cuyt, Franky Backeljauw– Stefan Becuwe, Joris Van Deun
• NIST group for front end:– Bonita Saunders, Bruce Miller,– Marjorie McClain, Daniel Lozier
• Other colleagues, too many to name, who have provided valuable advice and constructive criticism
July 4-6, 2012 Numerical Software Workshop: Design, Analysis and Verification
33