Bug#981030: RFS: sctk/2.4.10-20151007-1312Z+dfsg2-4 -- speech recognition scoring toolkit
- To: Giulio Paci <giuliopaci@gmail.com>, 981030@bugs.debian.org
- Cc: Bastian Germann <bage@debian.org>
- Subject: Bug#981030: RFS: sctk/2.4.10-20151007-1312Z+dfsg2-4 -- speech recognition scoring toolkit
- From: Tobias Frost <tobi@debian.org>
- Date: Tue, 26 Dec 2023 13:51:54 +0100
- Message-id: <[🔎] ZYrMamL5Bzuq0oqv@frost.de>
- Reply-to: Tobias Frost <tobi@debian.org>, 981030@bugs.debian.org
- In-reply-to: <CA+zRt5H2L7JQGVb1gsjf76c_DS3g_2+KmhoLiR53K-Y+dsiX9A@mail.gmail.com>
- References: <CA+zRt5HVu3aVS9W+gnGuZVpe16obvJpno8vz2Dx2BR34n=uWZw@mail.gmail.com> <20210126020012.GA1038410@angband.pl> <CA+zRt5GkbKROR8xhbr5Stq7NO0CVkf6AXcQFXmRGt57sJGBEAw@mail.gmail.com> <49a377f5-1c08-47cc-4fbc-eefd7a2b8414@debian.org> <CA+zRt5Ekd7ijOS43ZRr-shCHHkZpE5rpDMg36s=ZKw5+5UajKw@mail.gmail.com> <444819b5-7998-42d7-e3bc-0e7632652f65@debian.org> <CA+zRt5HVu3aVS9W+gnGuZVpe16obvJpno8vz2Dx2BR34n=uWZw@mail.gmail.com> <CA+zRt5H2L7JQGVb1gsjf76c_DS3g_2+KmhoLiR53K-Y+dsiX9A@mail.gmail.com> <CA+zRt5HVu3aVS9W+gnGuZVpe16obvJpno8vz2Dx2BR34n=uWZw@mail.gmail.com>
Am Mon, Nov 22, 2021 at 04:10:15PM +0100 schrieb Giulio Paci:
> The failing test case relies on the assumptions that, when a and b have the
> same double value:
> 2) "a - b" is 0.0.
(comment only based on this mail, did not check the code)
usually (C,C++) you cannot reliably say "if ( (a - b) == 0 )" or "if (a == b)"
as floating point cannot always represent the numbers exactly enough.
Usually comparing floats for almost-equality is done, something like
if (fabs(a - b) <= FLT_EPSILON)
(but FLT_EPSILION (or DBL_EPSILON) might not always be suitable, for example it
depends how much rounding you might have picked up on the way
--
tobi
Reply to: