Numerical tower

numeric tower
In Scheme and in Lisp dialects inspired by it, a numerical tower is the set of data types that represent numbers in a given programming language.wikipedia
12 Related Articles

Scheme (programming language)

SchemeScheme programming languageR6RS
In Scheme and in Lisp dialects inspired by it, a numerical tower is the set of data types that represent numbers in a given programming language.
Compliant implementations are now required to support Scheme's full numeric tower, and the semantics of numbers have been expanded, mainly in the direction of support for the IEEE 754 standard for floating point numerical representation.

Lisp (programming language)

LispLisp programming languageLisp 1.5
In Scheme and in Lisp dialects inspired by it, a numerical tower is the set of data types that represent numbers in a given programming language.

Data type

typedatatypetypes
In Scheme and in Lisp dialects inspired by it, a numerical tower is the set of data types that represent numbers in a given programming language.

Number

number systemnumericalnumbers
In Scheme and in Lisp dialects inspired by it, a numerical tower is the set of data types that represent numbers in a given programming language.

Programming language

programming languageslanguagedialect
In Scheme and in Lisp dialects inspired by it, a numerical tower is the set of data types that represent numbers in a given programming language.

Integer

integersintegralZ
Each type in the tower conceptually "sits on" a more fundamental type, so an integer is a rational number and a number, but the converse is not necessarily true, i.e. not every number is an integer; this asymmetry implies that a language can allow implicit coercions of numerical types—without creating semantic problems—in only one direction: coercing an integer to a rational loses no information and does not affect the results of a function, but to coerce most reals to an integer could well result in a problem (for example, the real 1/3 does not equal any integer).

Rational number

rationalrational numbersrationals
Each type in the tower conceptually "sits on" a more fundamental type, so an integer is a rational number and a number, but the converse is not necessarily true, i.e. not every number is an integer; this asymmetry implies that a language can allow implicit coercions of numerical types—without creating semantic problems—in only one direction: coercing an integer to a rational loses no information and does not affect the results of a function, but to coerce most reals to an integer could well result in a problem (for example, the real 1/3 does not equal any integer).

Type conversion

castcastingimplicit type conversion
Each type in the tower conceptually "sits on" a more fundamental type, so an integer is a rational number and a number, but the converse is not necessarily true, i.e. not every number is an integer; this asymmetry implies that a language can allow implicit coercions of numerical types—without creating semantic problems—in only one direction: coercing an integer to a rational loses no information and does not affect the results of a function, but to coerce most reals to an integer could well result in a problem (for example, the real 1/3 does not equal any integer).

Kawa (Scheme implementation)

Kawa
Kawa, a Scheme implementation for JVM, extends it with a Quantity type that is even more generic than Number.

Java virtual machine

JVMJava Runtime EnvironmentJRE
Kawa, a Scheme implementation for JVM, extends it with a Quantity type that is even more generic than Number.

Smalltalk

Smalltalk-72ObjectStudioSmalltalk programming language
Smalltalk is another programming language that follows this model, but it has a Magnitude as superclass of Number.

Polymorphism (computer science)

polymorphismpolymorphictype polymorphism
This particular kind of type hierarchy is known—especially in the context of the Scheme programming language—as a numerical tower, and usually contains many more types.