Skip to main content

On a High-Level Approach to Implementing Exact Real Arithmetic in the Functional Logic Programming Language Curry

  • Conference paper
  • First Online:
Declarative Programming and Knowledge Management (INAP 2013, WLP 2013, WFLP 2013)

Abstract

While many functions on the real numbers are not exactly computable, the theory of exact real arithmetic investigates the computation of such functions with respect to any given precision. In this paper, we present an approach to implementing exact real arithmetic based on Type-2 Theory of Effectivity in the functional logic language Curry. It is demonstrated how the specific features of Curry can be used to obtain a high-level realisation that is close to the underlying theoretical concepts. The new Curry data type Real and its corresponding functions can easily be used in other function definitions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Antoy, S., Hanus, M.: Functional logic programming. Commun. ACM 53(4), 74–85 (2010)

    Article  Google Scholar 

  2. Briggs, K.: Implementing exact real arithmetic in python, C++ and C. Theor. Comput. Sci. 351(1), 74–81 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  3. Escardó, M.H.: PCF extended with real numbers. Theor. Comput. Sci. 162(1), 79–115 (1996)

    Article  MATH  Google Scholar 

  4. Gowland, P., Lester, D.R.: A survey of exact arithmetic implementations. In: Blank, J., Brattka, V., Hertling, P. (eds.) CCA 2000. LNCS, vol. 2064, pp. 30–47. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  5. Hanus, M.: Functional logic programming: from theory to Curry. In: Voronkov, A., Weidenbach, C. (eds.) Programming Logics - Essays in Memory of Harald Ganzinger. LNCS, vol. 7797, pp. 123–168. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  6. Lelitko, U.: Realisation of exact real arithmetic in the functional logic programming language Curry. Diploma thesis, Department of Computer Science, FernUniversität in Hagen, Germany (2013) (in German)

    Google Scholar 

  7. Lester, D.R., Gowland, P.: Using PVS to validate the algorithms of an exact arithmetic. Theor. Comput. Sci. 291(2), 203–218 (2003)

    Article  MATH  MathSciNet  Google Scholar 

  8. Marcial-Romero, J.R., Escardó, M.H.: Semantics of a sequential language for exact real-number computation. Theor. Comput. Sci. 379(1–2), 120–141 (2007)

    Article  MATH  Google Scholar 

  9. Müller, N.T.: The iRRAM: exact arithmetic in C++. In: Blank, J., Brattka, V., Hertling, P. (eds.) CCA 2000. LNCS, vol. 2064, pp. 222–252. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  10. Plume, D.B.: A calculator for exact real number computation. University of Edinburgh (1998). http://www.dcs.ed.ac.uk/home/mhe/plume/

  11. Scott, L.R.: Numerical Analysis. Princeton Univ. Press, Princeton (2011)

    MATH  Google Scholar 

  12. Tavana, N., Weihrauch, K.: Turing machines on represented sets a model of computation for analysis. Log. Methods Comput. Sci. 7(2), 1–21 (2011)

    Article  MathSciNet  Google Scholar 

  13. Vuillemin, J.: Exact real computer arithmetic with continued fractions. IEEE Trans. Comput. 39(8), 1087–1105 (1990)

    Article  MathSciNet  Google Scholar 

  14. Weihrauch, K.: Computable Analysis. Springer, Berlin (2000)

    Book  MATH  Google Scholar 

Download references

Acknowledgements

We would like to thank the anonymous reviewers of this article for their detailed and helpful comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christoph Beierle .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Beierle, C., Lelitko, U. (2014). On a High-Level Approach to Implementing Exact Real Arithmetic in the Functional Logic Programming Language Curry. In: Hanus, M., Rocha, R. (eds) Declarative Programming and Knowledge Management. INAP WLP WFLP 2013 2013 2013. Lecture Notes in Computer Science(), vol 8439. Springer, Cham. https://doi.org/10.1007/978-3-319-08909-6_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-08909-6_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-08908-9

  • Online ISBN: 978-3-319-08909-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics