Mercurial > hg > orthanc-stone
changeset 2238:fc8be07bc72a
relax IsNear() for arm64, ppc64el, riscv64 and s390x, cf. Debian #1104044
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Sun, 27 Apr 2025 20:30:29 +0200 |
| parents | 6e995ee3b3e8 |
| children | 66b79075ac58 |
| files | OrthancStone/Sources/Toolbox/LinearAlgebra.h |
| diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/LinearAlgebra.h Sat Apr 26 21:56:58 2025 +0200 +++ b/OrthancStone/Sources/Toolbox/LinearAlgebra.h Sun Apr 27 20:30:29 2025 +0200 @@ -178,9 +178,12 @@ inline bool IsNear(double x, double y) { - // As most input is read as single-precision numbers, we take the - // epsilon machine for float32 into consideration to compare numbers - return IsNear(x, y, 10.0 * std::numeric_limits<float>::epsilon()); + /** + * The default threshold was relaxed in releases > 2.6 of the + * Stone Web viewer, as it might be the source of an issue with + * arm64, ppc64el, riscv64, and s390x, cf. Debian #110404 + **/ + return IsNear(x, y, 100.0 * std::numeric_limits<double>::epsilon()); } inline bool IsCloseToZero(double x)
