Post Reply 
Is super-accuracy matters?
10-07-2023, 03:44 PM
Post: #9
RE: Is super-accuracy matters?
The need for a more accurate pi comes to play when you are implementing and trying to produce correct results for example sin(π + ε) with small values of ε (but you don't know how small).
As you noted, sin(π + ε) ≈ ε so it's an easy answer...
Except you are given x = π + ε in floating point, so how do you calculate ε?

ε = x - π of course, but the "exact" value of pi, not the approximated floating point version. If x is very close to π, and that subtraction is off by 1 ULP, that 1 ULP might be of huge relative magnitude with respect to ε, (let's say the 1ULP is 10 times smaller than ε, then you only have 1 significant digit correct on the answer, which is a "bad" answer if you are trying to implement sin() in a correct way.

Now when people tell me "but the input already comes with an uncertainty", my answer is: that by itself doesn't justify needlessly introducing more uncertainty by disrespecting the calculations. 1ULP doesn't seem much, but when you are solving a system with 6000 equations, those tiny errors pile up like crazy over thousands of operations.
The idea here is that calculations should be as accurate as possible, such that the answer after many operations still has an uncertainty based on the input uncertainty, not the input + all this garbage random uncertainty I introduced because I was lazy on my implementation.
It's my opinion, of course, and I'm an engineer so I regularly use 3 or 4 digits and that's plenty for hand calculations. But when I solve an initial value problem with 100k time steps of integration... I need to trust that those ULP's are fine, otherwise my results can diverge quickly into garbage territory.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Is super-accuracy matters? - Albert Chan - 10-06-2023, 04:36 PM
RE: Is super-accuracy matters? - Jlouis - 10-06-2023, 04:42 PM
RE: Is super-accuracy matters? - Jlouis - 10-06-2023, 05:05 PM
RE: Is super-accuracy matters? - EdS2 - 10-07-2023, 07:00 AM
RE: Is super-accuracy matters? - EdS2 - 10-07-2023, 07:24 AM
RE: Is super-accuracy matters? - KeithB - 10-24-2023, 01:33 PM
RE: Is super-accuracy matters? - vaklaff - 10-24-2023, 03:38 PM
RE: Is super-accuracy matters? - johnb - 10-24-2023, 03:46 PM
RE: Is super-accuracy matters? - Claudio L. - 10-07-2023 03:44 PM
RE: Is super-accuracy matters? - johnb - 10-09-2023, 07:12 PM
RE: Is super-accuracy matters? - Johnh - 10-08-2023, 04:37 AM
RE: Is super-accuracy matters? - johnb - 10-09-2023, 07:24 PM
RE: Is super-accuracy matters? - dm319 - 10-13-2023, 03:08 PM
RE: Is super-accuracy matters? - dm319 - 10-10-2023, 07:33 PM
RE: Is super-accuracy matters? - KeithB - 10-13-2023, 03:21 PM
RE: Is super-accuracy matters? - johnb - 10-13-2023, 03:36 PM
RE: Is super-accuracy matters? - johnb - 10-14-2023, 03:38 AM
RE: Is super-accuracy matters? - KeithB - 10-13-2023, 08:57 PM
RE: Is super-accuracy matters? - DA74254 - 10-20-2023, 07:02 AM
RE: Is super-accuracy matters? - mfleming - 10-20-2023, 12:07 PM
RE: Is super-accuracy matters? - EdS2 - 10-20-2023, 08:55 AM
RE: Is super-accuracy matters? - johnb - 10-20-2023, 04:40 PM
RE: Is super-accuracy matters? - Johnh - 10-20-2023, 07:48 PM
RE: Is super-accuracy matters? - dm319 - 10-30-2023, 11:46 AM
RE: Is super-accuracy matters? - EdS2 - 10-20-2023, 09:06 PM
RE: Is super-accuracy matters? - EdS2 - 10-24-2023, 05:20 PM
RE: Is super-accuracy matters? - EdS2 - 11-18-2023, 09:13 AM
RE: Is super-accuracy matters? - klesl - 11-18-2023, 09:24 AM
RE: Is super-accuracy matters? - Johnh - 11-18-2023, 11:11 AM
RE: Is super-accuracy matters? - johnb - 11-20-2023, 11:41 PM
RE: Is super-accuracy matters? - nickapos - 11-18-2023, 05:24 PM
RE: Is super-accuracy matters? - Pekis - 11-19-2023, 08:44 PM
RE: Is super-accuracy matters? - klesl - 11-18-2023, 01:53 PM



User(s) browsing this thread: 1 Guest(s)