Skip to main content
Log in

Embedding universal computer arithmetic in higher programming languages

Einbettung einer umfassenden Rechnerarithmetik in höhere Programmiersprachen

  • Published:
Computing Aims and scope Submit manuscript

Abstract

In numerical computations mainly real and complex numbers, intervals as well as matrices and vectors with such components occur. It is well known that the arithmetic operations with real numbers, complex numbers etc. can be carried over to real floating-point numbers, complex floating-point numbers etc. using roundings. This proceeding results in agreeable arithmetic-, order- and compatibility-properties for an abundance of numerical data types and the accompanying arithmetic operations. Most programming languages however only provide real floating-point numbers; all the other data types and operations have to be simulated, e. g. in the form of arrays and procedure calls, which often causes loss of accuracy and arithmetic properties. Furthermore the complicate notation makes programs difficult to read. Therefore in this article an extension of PASCAL is presented which serves as an example for the way these numerical data types can be embedded into the syntax of a programming language.

Zusammenfassung

Beim numerischen Rechnen treten hauptsächlich reelle und komplexe Gleitkommazahlen, Gleitkommaintervalle sowie Matrizen und Vektoren mit solchen Komponenten auf. Die arithmetischen Operationen für reelle Zahlen, komplexe Zahlen usw. können bekanntlich mit Hilfe von Rundungen auf reelle Gleitkommazahlen, komplexe Gleitkommazahlen usw. übertragen werden, wobei möglichst viele algebraische Eigenschaften erhalten bleiben. Es ergibt sich somit eine Vielfalt von numerischen Datentypen mit zugehörigen arithmetischen Operationen, von denen in den meisten Programmiersprachen jedoch nur die reellen Gleitkommazahlen vorgesehen sind. Alle anderen Datentypen und Operationen müssen simuliert werden, z. B. in Form von Feldern und Prozeduraufrufen. Dadurch gehen in vielen Fällen Genauigkeit und wünschenswerte algebraische Eigenschaften verloren; außerdem sind Programme durch die umständliche Schreibweise schwierig zu lesen. Hier soll deshalb am Beispiel von PASCAL gezeigt werden, wie diese numerischen Datentypen in die Syntax einer Programmiersprache eingebaut werden können.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Bohlender, G.: Genaue Summation von Gleitkommazahlen. Computing, Suppl. 1, pp. 21–32. Wien-New York: Springer 1977.

    Google Scholar 

  2. Bohlender, G.: Genaue Berechnung mehrfacher Summen, Produkte und Wurzeln von Gleitkommazahlen und allgemeine Arithmetik in höheren Programmiersprachen. Dissertation, Universität Karlsruhe, 1978.

  3. Grüner, K.: Implementation of universal computer arithmetic with optimal accuracy. Computing24, 181–193 (1980).

    Google Scholar 

  4. Hoare, C. A. R., Wirth, N.: An axiomatic definition of the programming language PASCAL. Acta Informatica2, 335–355 (1973).

    Google Scholar 

  5. Jensen, K., Wirth, N.: PASCAL user manual and report. Berlin-Heidelberg-New York: Springer 1976.

    Google Scholar 

  6. Kaucher, E., Klatte, R., Ullrich, Ch.: Höhere Programmiersprachen ALGOL, FORTRAN, PASCAL in einheitlicher und übersichtlicher Darstellung. Mannheim-Wien-Zürich: Bibliographisches Institut 1978.

    Google Scholar 

  7. Kulisch, U.: Grundlagen des Numerischen Rechnens. Mannheim-Wien-Zürich: Bibliographisches Institut 1976.

    Google Scholar 

  8. Wirth, N.: Revidierter Bericht über die Programmiersprache PASCAL. Berlin: Akademie-Verlag 1976.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bohlender, G. Embedding universal computer arithmetic in higher programming languages. Computing 24, 149–160 (1980). https://doi.org/10.1007/BF02281721

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02281721

Keywords

Navigation