Hi Til,
I would not expect any solid reasoning in such cases (unless there is a clear note in documentation or commentaries within the code itself). Most likely, the error was chosen at random and a few checks were made that “it worked in general”.
If you did a more thorough testing and found errors about 1e-6 we just need to increase the constant. I would not worry about errors like that.
Oleh Derevenko
-- Skype with underscore
From: ode-...@googlegroups.com <ode-...@googlegroups.com>
On Behalf Of Tilmann
Sent: Thursday, May 11, 2023 6:37 PM
To: ode-users <ode-...@googlegroups.com>
Subject: [ode-users] Error tolerance for testInvertPDMatrix()
Ви нечасто отримуєте електронні листи від tilma...@gmail.com. Дізнайтеся, чому це важливо |
Hi again.
So, I checked the code. The conclusion is “you can get arbitrarily large error as the matrix size grows”. And this is natural for computations with limited precision.
Next, in the ODE itself the function is only used in dBodySetMass and there it is inverting a 3x3 matrix. So, nothing to worry about.
If the function is needed for external logic in user application we should not decide for that application. The external application should handle its extremely large matrix cases on its own.
Basically, there are only two approaches to increasing accuracy: using larger precision floating point numbers (like Quad Double/Double Double) or ordering additions so that addends had binary exponents as close as possible (I have a class for this in my work project). Both approaches require extra computational complexity the ODE does not need by itself.
Oleh Derevenko
-- Skype with underscore
From: ode-...@googlegroups.com <ode-...@googlegroups.com>
On Behalf Of Tilmann
Sent: Thursday, May 11, 2023 6:37 PM
To: ode-users <ode-...@googlegroups.com>
Subject: [ode-users] Error tolerance for testInvertPDMatrix()
Ви нечасто отримуєте електронні листи від tilma...@gmail.com. Дізнайтеся, чому це важливо |
demo_ode has a test function testInvertPDMatrix(). When compiled with "double-precision" It uses a tolerance of 1e-10 to detect errors.
--
You received this message because you are subscribed to the Google Groups "ode-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ode-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ode-users/81000eec-90dc-4403-bc34-c0a2cf10b472n%40googlegroups.com.