| This is the talk page for discussing improvements to the Floating-point arithmetic article. This is not a forum for general discussion of the subject of the article. |
Article policies
|
| Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
| Archives: 1, 2, 3, 4, 5Auto-archiving period: 3 months |
| This It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
I have removed the portion after the ellipses from the following text formerly found in the article: "12.345 is a floating-point number in a base-ten representation with five digits of precision...However, 12.345 is not a floating-point number with five base-ten digits of precision." I recognize the distinction made (a number with 5 base-ten digits of precision vs. a base-ten representation of a number with five digits of precision) and I suspect the author intended to observe that a binary representation of 12.345 would not have five base-ten digits of precision, but I can't divine what useful thing is intended to have been communicated there, so I've removed it. If I'm missing something obvious in the interpretation of this line, I suspect many others could, and encourage a more direct explanation if it's replaced. john factorial (talk) 18:44, 24 July 2023 (UTC)
The other day I made an edit clarifying the nature of the Patriot missile incident, based on the public sources already cited. User:Vincent Lefèvre reverted two parts of them:
First, I replaced the link to loss of significance by the simpler word ‘error’, because loss of significance now just redirects to catastrophic cancellation since the old article was deleted. I was loosely involved in this deletion but I don't feel strongly about this; I think the term ‘loss of significance’ is unnecessarily fancy without saying anything more than ‘error’ does, but it's fine, and the error is essentially catastrophic cancellation after all.
Second, I added the text:
This text was deleted on the grounds that:
But I don't think that is the whole story. The Skeel citation[1] says (emphasis added):
At least one of these software modifications was the introduction of a subroutine for converting clock-time more accurately into floating-point. This calculation was needed in about half a dozen places in the program, but the call to the subroutine was not inserted at every point where it was needed. Hence, with a less accurate truncated time of one radar pulse being subtracted from a more accurate time of another radar pulse, the error no longer cancelled.
The designers certainly didn't assume that its accuracy did not matter—if they did assume that, why would they have written a new conversion subroutine for more accurate conversion?
Suppose the floating-point system on the control computer had 30-bit precision (a low estimate for a 48-bit floating-point format). The logic computed something like , where is (say) the new higher-precision conversion from fixed-point to floating-point giving , and is (say) the old lower-precision conversion giving . There may be an additional floating-point rounding error of about one ulp, but that pales in comparison to the discrepancy between conversion subroutines of about ulps in this hypothesis of 30-bit precision (if it were 40-bit precision, then it would be ulps, and so on).
In brief, this was a much more mundane software engineering mistake—updating a unit conversion subroutine call in one place but not another, so the units are no longer commensurate—rather than anything you can rightly blame floating-point for.
It's possible that, after long enough uptime, computing rather than with the same conversion subroutine could lose enough significant bits due to floating-point rounding error to cause the same problem. But in this case, the problem was using different conversion subroutines and . And, with at least 30-bit precision, the floating-point rounding error would take a thousand times as long to cause the same problem—over twenty thousand hours before a problem, or about two years and four months of continuous uptime. (I would also guess the format has >30 bits of precision, so it's likely much longer than that.)
This cautionary tale is often used to blame the designers for using floating-point to represent time and to argue that floating-point numbers are incomprehensible black magic where reasoning goes out the window (e.g., on Hacker News and Reddit), even though the underlying story justifies neither of these conclusions. So that's why I think it is important to spell out the actual bug here—incomplete software change caused subtraction of incommensurate (but similar) units. Taylor Riastradh Campbell (talk) 04:16, 17 July 2025 (UTC)
References
Just saying "error" would be misleading because in general, one has an error at almost each floating-point operation, and this is often not a major issue (with carefully designed code). What matters here is that the (relative) error is very large due to a catastrophic cancellation as described in the document.
Saying that there are "two different unit conversions" is incorrect, as the time unit is the same in both routines (0.1s)…the issue here is that there are different approximations in the time calculation, i.e. with different accuracy (see the term "accurate" used by Skeel).
The redirect Fast math has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2026 January 5 § Fast math until a consensus is reached. consarn (talck) (contirbuton s) 19:29, 5 January 2026 (UTC)
It should be mentioned that 0 is a special case, just like ∞, because the underlying scheme (normalized mantissa + exponent) cannot represent it.
AFAIU 0 can be argued to be an edge case of Subnormal numbers, but 0 is supported even when subnormals aren't. Musaran (talk) 12:05, 3 February 2026 (UTC)
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.