Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Numerical tower
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Set of data types that represent numbers in a given programming language}} In [[Scheme (programming language)|Scheme]], the '''numerical tower''' is a set of [[data types]] that represent [[number]]s and a logic for their hierarchical organisation. [[File:NumericalTower.svg|thumb|A representation of the numerical tower with five types of numbers.]] 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 safely allow [[Type conversion|implicit coercions]] of numerical types—without creating semantic problems—in only one direction: coercing an integer to a rational loses no information and will never influence the value returned by a function, but to coerce most reals to an integer would alter any relevant computation (e.g., the real 1/3 does not equal any integer) and is thus impermissible.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)