People here have been discussing exact real number computation recently.
Here are the lecture notes for a talk I gave at Fun in the Afternoon in 2011, with Haskell code computing arithmetic operations, trigonometric functions, definite integrals and more, using infinite sequences of digits to represent real numbers.
https://github.com/martinescardo/ExactRealNumberComputationInHaskell