next up previous contents
Next: Possible Extensions and Future Up: Conclusion Previous: Summary of Analysis

Evaluation of Implementation

The implementation used the functional language Haskell. This was an ideal choice for this work because the availability of lazy lists made working with streams extremely easy, and features such as unbounded length integers, good I/O facilities, and a module system all simplified aspects of the work which simply enable the work on exact real arithmetic to continue without being of direct interest in and of themselves. In addition, the availability of both an interpreter and compiler gave the benefits of easier development, testing, and experimentation afforded by an interpreter with a higher performance end product from the compiler. Tools such as a profiler, the parser generator ``Happy'', and the lexer generator ``Alex'' aided the development. The choice of language was discussed further in section 6.2.1.

We have observed that the performance of the calculator appears poor when compared with floating point arithmetic. However one would expect to have to sacrifice some efficiency of other approaches for the benefits afforded by the use of this approach. In fact, an application involving real number computation would probably only use these exact approaches where it was strictly necessary, and would use optimised code to do so. It is important to remember that this implementation has been conducted with simplicity, readability, and flexibility in mind, and is not optimised for performance.

It may be possible to significantly improve the performance of the transcendental functions. There are two ways in which this might be performed. Firstly there may be cases in which it is possible to find a Cauchy sequence whose limit is the desired result and which converges more quickly than the ones used in this implementation. Alternatively specific algorithms could be found which avoid the use of nested sequences of intervals altogether. Early implementations of division, for example, used a iterative approximation to compute the reciprocal of the denominator in the same way as the transcendental functions, and this result was then multiplied by the numerator. The division algorithm developed in section 4.4.4 was significantly faster.


next up previous contents
Next: Possible Extensions and Future Up: Conclusion Previous: Summary of Analysis
Martin Escardo
5/11/2000