High Precision Calculation of the Digamma Function - PowerPoint PPT Presentation

About This Presentation
Title:

High Precision Calculation of the Digamma Function

Description:

... of this research project is to be able to compute the digamma and other related ... To use an adaptive precision system rather than a fixed precision system. ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 9
Provided by: mir150
Learn more at: http://www.cs.cmu.edu
Category:

less

Transcript and Presenter's Notes

Title: High Precision Calculation of the Digamma Function


1
High Precision Calculation of the Digamma Function
  • Mohammad I Rafiq
  • School of Computer Science, Carnegie Mellon
    University
  • Research Advisor Dr. Victor Adamchik

2
Goal of the Project
  • The main goal of this research project is to
    be able to compute the digamma and other related
    special functions, to an arbitrary precision.
    This has been implemented using NASA's ARPREC
    package. The other important aspects of this
    project are to deal with dynamically controlled
    precision, self correcting error codes and fixed
    precision calculations.

3
Formulas for computation of the Digamma function
4
Results
X -(110/213)-5 -110/213 110/213 110/213 5
Precision 1000 1000 1000 1000
Our time (sec) 3.69 3.31 2.15 3.32
Mathematica time (sec) 2.29 2.20 2.24 2.20
Accuracy 1000 1000 1000 1000
5
Results(contd)
X -(110/213)-5 -110/213 110/213 110/213 5
Precision 2000 2000 2000 2000
Our time (sec) 32.36 33.23 32.01 31.93
Mathematica time (sec) 23.05 23.45 23.0 23.29
Accuracy 2000 2000 2000 2000
6
  • Problem
  • Accuracy decreases as precision and x is
    increased e.g.
  • 1) digamma(110/213 500) when calculated
    at a precision of 500 gives an accuracy of 362.
  • 2) digamma(110/213 50) when calculated at a
    precision of 1000 gives an accuracy of 781.
  • Solution
  • To use an adaptive precision system rather
    than a fixed precision system. An adaptive
    precision system is a floating point system based
    on significance arithmetic which dynamically
    adjusts the number of digits used in
    computations. This is also known as self
    correcting error codes.

7
Future Additions
  • To add a two layer caching mechanism in order to
    improve the calculation times.

8
  • Splay Tree A stores the result corresponding to
    each input x for a particular precision. If the
    function is called multiple times for the same
    input x, but with a different precision then only
    the result of the higher precision is stored.
  • Splay Tree B stores the coefficients Ci in the
    struct k_st, corresponding to each iteration i
    for each precision.
  • Each time the function digamma(x,prec) is called,
    we first search through A for x. If we find x and
    the precision stored is equal or less than our
    prec then we truncate the stored result and
    output it. If we do not find x or our prec is
    greater than the stored precision, then we search
    through B for our prec. If we find our prec in
    the tree, we use the stored coefficients to
    calculate our result and also update Tree A with
    the result. If we do not find our prec in B, we
    calculate both the coefficients and the result
    and update both Trees A and B.
Write a Comment
User Comments (0)
About PowerShow.com