| CARVIEW |
Arithmetic with Continued Fractions
Length: 60 minutes
Description
Multiprecision arithmetic algorithms usually represent real numbers as decimals, or perhaps as their base-2n analogues. But this representation has some puzzling properties. For example, there is no exact representation of even as simple a number as one-third. Continued fractions are a practical but little-known alternative.
Continued fractions are a representation of the real numbers that are in many ways more mathematically natural than the usual decimal or binary representations. All rational numbers have simple representations, and so do many irrational numbers, such as sqrt(2) and e1. One reason that continued fractions are not often used, however, is that it's not clear how to involve them in basic operations like addition and multiplication. This was an unsolved problem until 1972, when Bill Gosper found practical algorithms for continued fraction arithmetic.
In this talk, I explain what continued fractions are and why they are interesting, how to represent them in computer programs, and how to calculate with them.
Complete Slides
- Arithmetic with Continued Fractions
- What we'll do
- How do we represent real numbers for calculation?
- Decimal representation
- Decimal arithmetic
- Continued Fractions
- Truncation
- Irrational numbers
- Continued fractions
- Change of stance
- Why not continued fractions?
- The catch
- Continued fraction objects
- Input
- Output
- When to output?
- An example
- Let's ask for a term from _z_
- Aha!
- [I[ex1+2-11-7]I]
- Details
- This time with feeling
- Continued fraction arithmetic
- When to output?
- Arithmetic
- Implementation
- Thank you
- Bonus slides and deleted material
- Important properties of continued fractions
- Comparing continued fractions is easy
- Truncation
Complete slides and illustrations for the talk.
Additional Materials
A small implementation of the Gosper algorithm in C.
Gosper's HAKMEM notes, his longer monograph, and some other papers and materials.
Return to: Universe of Discourse main page | Perl Paraphernalia | Other Classes and Talks
mjd-perl-yak+@plover.com