A Scientific Calculator for Exact Real Number Computation Based on LRT, GMP and FC++

Alejandra Lucatero, J. Raymundo Marcial-Romero, J. A. Hernández
2012 Acta Universitaria  
Language for Redundant Test (LRT) is a programming language for exact real number computation. Its lazy evaluation mechanism (also called call-by-need) and its infinite list requirement, make the language appropriate to be implemented in a functional programming language such as Haskell. However, a direction translation of the operational semantics of LRT into Haskell as well as the algorithms to implement basic operations (addition subtraction, multiplication, division) and trigonometric
more » ... ons (sin, cosine, tangent, etc.) makes the resulting scientific calculator time consuming and so inefficient. In this paper, we present an alternative implementation of the scientific calculator using FC++ and GMP. FC++ is a functional C++ library while GMP is a GNU multiple presicion library. We show that a direct translation of LRT in FC++ results in a faster scientific calculator than the one presented in Haskell.
doi:10.15174/au.2012.339 fatcat:7x3eidu5lvgcbgbmfbdt5mvwgi