Numerical tower



         


In computing, numerical tower refers to the set of number types (datatypes that represent numbers) in a given programming language.

The Scheme standard defines the following:

+-------+ |Integer| +---------+ | Rational| +-----------+ | Real | +-------------+ | Complex | +---------------+ | Number | +---------------+

Each type in the tower conceptually "sits on" a more fundamental type, so an Integer is a Rational is a ... Number, but the inverse is not necessarily true.

Typically a language will support a modified version of this numerical tower; Kawa Scheme, for example, extands this basic numerical tower with a Quantity type that's even more general than Number. Another popular variant is having both exact and inexact versions of the tower or parts of it. Some languages and language implementations do not support a full numerical tower or support it only in a limited way.





  View Live Article   This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License