Small challenge
|
04-24-2023, 12:58 PM
(This post was last modified: 04-24-2023 01:09 PM by Albert Chan.)
Post: #23
|
|||
|
|||
RE: Small challenge
(04-23-2023 06:41 PM)John Keith Wrote: The exact value of 23^10 is 41426511213649, and we can see that a 1 ULP error in the least significant digit ( 4142651121365 instead of 41426511213649) can propagate to give the answer 4.14265112137 rather than the correct answer 4.14265112136. With halfway round-to-even, it will take 2 ULP error to cause incorrect result. Quote:However, if 23^10 is computed with 15-digit precision internally, this error should not occur. x^y = 10^(y*log10(x)), 1 ULP exponent error will cause incorrectly rounded 12-digits result. log10(23) ≈ 1.3617 27836 01759 28788 ... 23^10 ≈ 10 ^ 13.6172783601759 ≈ 4.14265112136463E13 23^10 ≈ 10 ^ 13.6172783601760 ≈ 4.14265112136558E13 Even if we pull out exponent (to reduce errors), we end up the same error. 23^10 = 2.3^10 * 10^10 2.3^10 ≈ 10 ^ 3.61727836017593 ≈ 4.14265112136491E+3 2.3^10 ≈ 10 ^ 3.61727836017594 ≈ 4.14265112136501E+3 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)