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
Division by zero
(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!
=== Floating-point arithmetic === In computing, most numerical calculations are done with [[floating-point arithmetic]], which since the 1980s has been standardized by the [[IEEE 754]] specification. In IEEE floating-point arithmetic, numbers are represented using a sign (positive or negative), a fixed-precision [[significand]] and an integer [[exponent]]. Numbers whose exponent is too large to represent instead "overflow" to positive or negative [[infinity]] (+β or ββ), while numbers whose exponent is too small to represent instead "[[Arithmetic underflow|underflow]]" to [[signed zero|positive or negative zero]] (+0 or β0). A [[NaN]] (not a number) value represents undefined results. In IEEE arithmetic, division of 0/0 or β/β results in NaN, but otherwise division always produces a well-defined result. Dividing any non-zero number by positive zero (+0) results in an infinity of the same sign as the dividend. Dividing any non-zero number by [[negative zero]] (β0) results in an infinity of the opposite sign as the dividend. This definition preserves the sign of the result in case of [[arithmetic underflow]].<ref>{{citation|last=Cody|first=W. J.|title=Analysis of Proposals for the Floating-Point Standard|journal=Computer|date=March 1981 |volume=14|issue=3|pages=65|doi=10.1109/C-M.1981.220379|s2cid=9923085|quote=With appropriate care to be certain that the algebraic signs are not determined by rounding error, the affine mode preserves order relations while fixing up overflow. Thus, for example, the reciprocal of a negative number which underflows is still negative.}}</ref> For example, using single-precision IEEE arithmetic, if {{nowrap|1=''x'' = β2<sup>β149</sup>}}, then ''x''/2 underflows to β0, and dividing 1 by this result produces 1/(''x''/2) = ββ. The exact result β2<sup>150</sup> is too large to represent as a single-precision number, so an infinity of the same sign is used instead to indicate overflow.
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)