On Design and Implementation of a Generic Number Type for Real Algebraic Number Computations Based on Expression Dags | Mathematics in Computer Science
Skip to main content

On Design and Implementation of a Generic Number Type for Real Algebraic Number Computations Based on Expression Dags

  • Published:
Mathematics in Computer Science Aims and scope Submit manuscript

Abstract

We report on the design and implementation of a number type called Real_algebraic. This number type allows us to compute the sign of arithmetic expressions involving the operations \({+,-,\cdot,/, \sqrt[d]{}}\). The sign computation is always correct and, in this sense, not subject to rounding errors. We focus on modularity and use generic programming techniques to make key parts of the implementation exchangeable. Thus, our design allows for easily performing experiments with different implementations or thereby tailoring the number type for specific tasks. For many problems in computational geometry, instantiations of our number type Real_algebraic are a user-friendly alternative for implementing the exact geometric computation paradigm in order to abandon numerical robustness problems.

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

Access this article

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (Japan)

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Alexandrescu A.: Modern C++ design: generic programming and design patterns applied. Addison-Wesley Longman Publishing Co. Inc., Boston (2001)

    Google Scholar 

  2. boost C++ Libraries. http://www.boost.org/

  3. Burnikel, C., Fleischer, R., Mehlhorn, K., Schirra, S.: Efficient exact geometric computation made easy. In: 15th ACM Symposium on Computational Geometry (SCG’99), pp. 341–350. ACM, New York (1999)

  4. Burnikel C., Funke S., Mehlhorn K., Schirra S., Schmitt S.: A separation bound for real algebraic expressions. Algorithmica 55(1), 14–28 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  5. CGAL: Computational Geometry Algorithms Library http://www.cgal.org/

  6. Dekker T.J.: A floating-point technique for extending the available precision. Num. Math. 18(2), 224–242 (1971)

    Article  MathSciNet  MATH  Google Scholar 

  7. Du, Z.: Guaranteed precision for transcendental and algebraic computation made easy. PhD thesis, Courant Institute of Mathematical Sciences, New York University, May 2006

  8. Funke S., Mehlhorn K., Näher S.: Structural filtering: a paradigm for efficient and exact geometric programs. Comput. Geometry 31(3), 179–194 (2005)

    Article  MATH  Google Scholar 

  9. Gamma E., Helm R., Johnson R., Vlissides J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)

    Google Scholar 

  10. GMP: The GNU multiple precision arithmetic library. http://www.gmplib.org/

  11. Kahan W.: Further remarks on reducing truncation errors. Commun. ACM 8(1), 40 (1965)

    Article  Google Scholar 

  12. Karamcheti, V., Li, C., Pechtchanski, I., Yap, C.: A core library for robust numeric and geometric computation. In: 15th ACM Symposium on Computational Geometry (SCG’99), pp. 351–359. ACM, New York (1999)

  13. Knuth D.E.: Seminumerical algorithms. The Art of Computer Programming, vol. 2, 3rd edn. Addison-Wesley, Reading (1997)

    Google Scholar 

  14. LEDA: Library of Efficient Data Structures and Algorithms. http://www.algorithmic-solutions.com/

  15. Li, C., Yap, C.: A new constructive root bound for algebraic expressions. In: SODA ’01: Proceedings of the Twelfth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 496–505, Philadelphia, PA, USA. Society for Industrial and Applied Mathematics (2001)

  16. Mörig, M.: Deferring dag construction by storing sums of floats speeds-up exact decision computations based on expression dags. In: 3rd International Congress on Mathematical Software (ICMS 2010). LNCS, vol. 6327, pp. 109–120, September 2010

  17. Mörig, M., Schirra, S.: On the design and performance of reliable geometric predicates using error-free transformations and exact sign of sum algorithms. In: 19th Canadian Conference on Computational Geometry (CCCG’07), pp. 45–48, August 2007

  18. MPFR: A multiple precision floating-point library. http://www.mpfr.org/

  19. Muller, J.-M., Brisebarre, N., de Dinechin, F., Jeannerod, C.-P., Lefèvre, V., Melquiond, G., Revol, N., Stehlé, D., Torres, S.: Handbook of Floating-Point Arithmetic. Birkhäuser Boston 2010

  20. Ogita T., Rump S.M., Oishi S.: Accurate sum and dot product. SIAM J. Sci. Comput. 26(6), 1955–1988 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  21. Pion, S., Yap, C.: Constructive root bound for k-ary rational input numbers. In: Proceedings of the 19th ACM Symposium on Computational Geometry, pp. 256–263. ACM Press, San Diego, January 2003

  22. RealAlgebraic: A number type for exact geometric computation. http://www.isg.cs.uni-magdeburg.de/ag/RealAlgebraic/

  23. Schirra, S.: Much Ado about Zero. In: Efficient Algorithms. LNCS, vol. 5760, pp. 408–421, September 2009

  24. Shewchuk J.R.: Adaptive precision floating-point arithmetic and fast robust geometric predicates. Discrete Comput. Geom. 18(3), 305–363 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  25. Shewchuk, J.R.: http://www.cs.cmu.edu/~quake/robust.html (1997)

  26. Yap C.: Towards exact geometric computation. Comput. Geom. Theory Appl. 7(1-2), 3–23 (1997)

    MathSciNet  MATH  Google Scholar 

  27. Yap, C.-K.: Robust geometric computation. In: Goodman, J.E., O’Rourke, J. (eds.) Handbook of Discrete and Computational Geometry, chap. 41, 2nd edn., pp. 927–952. Chapman & Hall/CRC (2004)

  28. Yu, J., Yap, C., Du, Z., Pion, S., Brönnimann, H.: The design of Core 2: a library for exact numeric computation in geometry and algebra. In: 3rd International Congress on Mathematical Software (ICMS 2010). LNCS, vol. 6327, September 2010

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marc Mörig.

Additional information

Partially supported by DFG grant SCHI 858/1-1.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Mörig, M., Rössling, I. & Schirra, S. On Design and Implementation of a Generic Number Type for Real Algebraic Number Computations Based on Expression Dags. Math.Comput.Sci. 4, 539 (2010). https://doi.org/10.1007/s11786-011-0086-1

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11786-011-0086-1

Keywords

Mathematics Subject Classification (2010)