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
Round-off error
(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!
== Representation error == The error introduced by attempting to represent a number using a finite string of digits is a form of roundoff error called '''representation error'''.<ref name="Laplante_2000">{{cite book |title=Dictionary of Computer Science, Engineering and Technology |first=Philip A. |last=Laplante |publisher=[[CRC Press]] |date=2000 |isbn=978-0-84932691-2 |page=420 |url=https://books.google.com/books?id=U1M3clUwCfEC&pg=PA420}}</ref> Here are some examples of representation error in decimal representations: {| class="wikitable" style="margin:1em auto" ! Notation ! Representation ! Approximation ! Error |- |{{Fraction|1|7}}|| 0.{{overline|142 857}} || 0.142 857 || 0.000 000 {{overline|142 857}} |- |[[Natural logarithm|ln 2]] || 0.693 147 180 559 945 309 41... || 0.693 147 || 0.000 000 180 559 945 309 41... |- |[[Logarithm|log<sub>10</sub> 2]] || 0.301 029 995 663 981 195 21... || 0.3010 || 0.000 029 995 663 981 195 21... |- |[[cube root|{{radic|2|3}}]] || 1.259 921 049 894 873 164 76... || 1.25992 || 0.000 001 049 894 873 164 76... |- |[[square root|{{radic|2}}]] || 1.414 213 562 373 095 048 80... || 1.41421 || 0.000 003 562 373 095 048 80... |- |[[E (mathematical constant)|''e'']] || 2.718 281 828 459 045 235 36... || 2.718 281 828 459 045 || 0.000 000 000 000 000 235 36... |- |[[Pi|''Ο'']] || 3.141 592 653 589 793 238 46... || 3.141 592 653 589 793 || 0.000 000 000 000 000 238 46... |} Increasing the number of digits allowed in a representation reduces the magnitude of possible roundoff errors, but any representation limited to finitely many digits will still cause some degree of roundoff error for [[Countable|uncountably many]] real numbers. Additional digits used for intermediary steps of a calculation are known as [[guard digit]]s.<ref name="Higham_2002">{{cite book |title=Accuracy and Stability of Numerical Algorithms |edition=2 |author-first=Nicholas John |author-link=Nicholas Higham |author-last=Higham |publisher=[[Society for Industrial and Applied Mathematics]] (SIAM) |date=2002 |isbn=978-0-89871521-7 |pages=43β44 |url=https://books.google.com/books?id=epilvM5MMxwC&pg=PA43}}</ref> Rounding multiple times can cause error to accumulate.<ref name="Volkov_1990">{{cite book |title=Numerical Methods |author-first=E. A. |author-last=Volkov |publisher=[[Taylor & Francis]] |date=1990 |isbn=978-1-56032011-1 |page=24 |url=https://books.google.com/books?id=ubfrNN8GGOIC&pg=PA24}}</ref> For example, if 9.945309 is rounded to two decimal places (9.95), then rounded again to one decimal place (10.0), the total error is 0.054691. Rounding 9.945309 to one decimal place (9.9) in a single step introduces less error (0.045309). This can occur, for example, when software performs arithmetic in [[Extended precision#x86 extended precision format|x86 80-bit floating-point]] and then rounds the result to [[Double-precision floating-point format|IEEE 754 binary64 floating-point]].
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)