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

Slides:



Advertisements
Similar presentations
Floating point numbers. Computable reals computable numbers may be described briefly as the real numbers whose expressions as a decimal are calculable.
Advertisements

3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
CENG536 Computer Engineering department Çankaya University.
Overview CNS 3320 – Numerical Software Engineering.
CENG536 Computer Engineering Department Çankaya University.
Combinational Logic and Verilog. XORs and XNORs XOR.
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers
Math Problems w/Sig Figs When combining measurements with different degrees of accuracy and precision, the accuracy of the final answer can be no greater.
Chapter 2: Algorithm Discovery and Design
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
Initial-Value Problems
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Floating Point Numbers
Chapter 2: Algorithm Discovery and Design
Computer Arithmetic Integers: signed / unsigned (can overflow) Fixed point (can overflow) Floating point (can overflow, underflow) (Boolean / Character)
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
Number Systems II Prepared by Dr P Marais (Modified by D Burford)
CEN 316 Computer Organization and Design Computer Arithmetic Floating Point Dr. Mansour AL Zuair.
Significant Figures in Mathematical Operations The result of the mathematical operation cannot be expressed to any greater degree of certainty than the.
Fixed-Point Arithmetics: Part II
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
Data Representation in Computer Systems
The Importance of measurement Scientific Notation.
Chapter 8 Problems Prof. Sin-Min Lee Department of Mathematics and Computer Science.
My talk describes how the detailed error diagnosis and the automatic solution procedure of problem solving environment T-algebra can be used for automatic.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
LECTURER PROF.Dr. DEMIR BAYKA AUTOMOTIVE ENGINEERING LABORATORY I.
1 C.H. Ho © Rapid Prototyping of FPGA based Floating Point DSP Systems C.H. Ho Department of Computer Science and Engineering The Chinese University of.
ROUNDING OFF PROCEDURES Getting rid of extra digits the right way…
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2013.
COMP201 Computer Systems Floating Point Numbers. Floating Point Numbers  Representations considered so far have a limited range dependent on the number.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Computer Arithmetic Floating Point. We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large.
COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2012.
Scientific Measurement Measurements and their Uncertainty Dr. Yager Chapter 3.1.
Slide 1 of 48 Measurements and Their Uncertainty
Rounding  We need to round numbers because a calculator often gives an answer with more digits than are justified by the precision of the measurements.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
DEPARTMENTT OF ECE TECHNICAL QUIZ-1 AY Sub Code/Name: EC6502/Principles of digital Signal Processing Topic: Unit 1 & Unit 3 Sem/year: V/III.
R EPRESENTATION OF REAL NUMBER Presented by: Pawan yadav Puneet vinayak.
Chapter 2 Sec 2.3 Scientific Measurement. Vocabulary 14. accuracy 15. precision 16. percent error 17. significant figures 18. scientific notation 19.
Cosc 2150: Computer Organization Chapter 9, Part 3 Floating point numbers.
Chapter 2 Errors in Numerical Methods and Their Impacts.
Dr.Faisal Alzyoud 2/20/2018 Binary Arithmetic.
ECE 2110: Introduction to Digital Systems
Fixed-pointed FFT model
William Stallings Computer Organization and Architecture 7th Edition
Computer Architecture & Operations I
Class Notes 18: Numerical Methods (1/2)
Numeric Accuracy and Precision
Introduction to C++ Programming
Scientific Measurement
Chapter 2 Accuracy vs Precision.
Dr. Clincy Professor of CS
Week 7: Gates and Circuits: PART II
network of simple neuron-like computing elements
Storing Negative Integers
Comparing floating point numbers
Precision in Measurement
Lab Skills Intro.
Presentation transcript:

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

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. 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.

Formulas for computation of the Digamma function

Results X-(110/213)-5-110/213110/ / Precision Our time (sec) Mathematica time (sec) Accuracy

Results(contd) X-(110/213)-5-110/213110/ / Precision Our time (sec) Mathematica time (sec) Accuracy

Problem: Problem: Accuracy decreases as precision and x is increased e.g. Accuracy decreases as precision and x is increased e.g. 1) digamma(110/ ) when calculated at a precision of 500 gives an accuracy of ) digamma(110/ ) when calculated at a precision of 500 gives an accuracy of ) digamma(110/ ) when calculated at a precision of 1000 gives an accuracy of ) digamma(110/ ) when calculated at a precision of 1000 gives an accuracy of 781. Solution: 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. 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.

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

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 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. 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. 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.