Timeline for How to handle precision problems with the correct terminology
Current License: CC BY-SA 4.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 19, 2024 at 10:50 | review | Close votes | |||
| Sep 24, 2024 at 3:02 | |||||
| Apr 3, 2024 at 16:01 | comment | added | JacquesB | @Scene: Who are the intended users of the library? Are they mathematicians or computer scientists or the average web or app developer? | |
| Mar 9, 2024 at 18:27 | review | Close votes | |||
| Mar 14, 2024 at 3:08 | |||||
| Mar 9, 2024 at 16:00 | comment | added | rwong | (1) It cannot be a constant - each mathematical formula, and each numerical method or algorithm have their own epsilon; (2) furthermore a result's uncertainty partly depends on the input's uncertainty; (3) Generally speaking, tolerance can be specified as either absolute or relative; (4) for matrices, "condition number" is used to predict how sensitive a matrix is to errors. | |
| Mar 9, 2024 at 13:58 | answer | added | chux | timeline score: 0 | |
| Dec 15, 2023 at 22:38 | history | protected | gnat | ||
| Dec 15, 2023 at 16:05 | answer | added | Edwin Buck | timeline score: 0 | |
| Dec 15, 2023 at 9:31 | answer | added | Chris Thorne | timeline score: 0 | |
| Dec 4, 2023 at 18:13 | answer | added | gnasher729 | timeline score: 2 | |
| Dec 4, 2023 at 17:38 | comment | added | Alexander | Ruby's Minitest library (gem) is an interesting point of comparison. It has both assert_in_delta (checks the value has an absolute error less than "delta") and assert_in_epsilon (checks that the value has a relative error less than the "epsilon"). Interestingly, both have have a default value for the allowable error, despite it only really making sense for the epsilon. | |
| Nov 2, 2023 at 9:59 | comment | added | Cem Polat | As a library writer, lets say you provide a generic 'InRange' function, it is not a bad idea to pass the issue to the users of the library since you may not know the data range of the inputs and the precision in this range. What you can do is to make sure that your APIs work as expected with various normal and abnormal (e.g. Nan, Inf) inputs. | |
| Nov 2, 2023 at 7:14 | comment | added | Doc Brown | Canonical read: What Every Computer Scientist Should Know About Floating-Point Arithmetic | |
| Nov 2, 2023 at 6:32 | answer | added | Basile Starynkevitch | timeline score: 2 | |
| Nov 2, 2023 at 3:26 | answer | added | J_H | timeline score: 5 | |
| Nov 1, 2023 at 18:36 | comment | added | CPlus♦ | My thought is, since floats by nature lose precision with magnitude, make the precision be relative to the magnitude of larger of the 2 numbers, instead of a fixed amount. | |
| Nov 1, 2023 at 7:56 | comment | added | Filip Milovanović | "exposing precision to the user is just passing on the issue instead of solving it" - consider that this might be exactly what you should do; you can't anticipate the details of somebody else's use case - allow your users to specify the precision themselves. Just don't do it as a global, make it an optional parameter. | |
| Nov 1, 2023 at 6:46 | review | Close votes | |||
| Nov 7, 2023 at 3:05 | |||||
| Nov 1, 2023 at 1:00 | comment | added | Scene | @PhilipKendall I understand. Thank you Erik Eidt and Ewan for the references, though! It's a good starting point. | |
| Oct 31, 2023 at 22:51 | comment | added | Ewan | stackoverflow.com/questions/4915462/… | |
| Oct 31, 2023 at 21:26 | comment | added | Erik Eidt | A precision value also doesn't scale well. For example, within 0.01 is great for certain numbers but with large numbers, like 1e70, won't work and for small numbers like 1e-70 also won't work. Maybe what you really want is something like within an ULP, which is a varying magnitude depending on the exponents involved — the idea is to get within some range of the last or last few digits of the binary value. | |
| Oct 31, 2023 at 21:26 | comment | added | Philip Kendall | There is no answer to this as different use cases have different requirements. | |
| S Oct 31, 2023 at 21:13 | review | First questions | |||
| Nov 1, 2023 at 18:34 | |||||
| S Oct 31, 2023 at 21:13 | history | asked | Scene | CC BY-SA 4.0 |