#179: Float precision issues with epsilon
---------------------+------------------------------------------------------
Reporter: lazzara | Owner: Olena Team
Type: defect | Status: new
Priority: major | Milestone: Olena 1.0
Component: Milena | Version: 1.0
Keywords: |
---------------------+------------------------------------------------------
In level::stretch, we use float variables to do the following:
{{{
float
epsilon = mln_epsilon(float),
M = mln_max(V) + 0.5f - epsilon,
m = 0.0f - 0.5f + epsilon;
}}}
'm' is precise enough since it is a really low value. However, M is not
precise enough since mln_max(V) may be a high value, so we will loose
decimal precision if we store that number as float. As a result, M is
always equal to 'mln_max(V) + 0.5' which introduce a bug in
level::stretch.
This issue can be avoided by using double variables instead, but do we
really want that?
Don't we want to handle that issue in a more generic way?
--
Ticket URL: <https://trac.lrde.org/olena/ticket/179>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
Show replies by date
#179: Float precision issues with epsilon
----------------------+-----------------------------------------------------
Reporter: lazzara | Owner: Olena Team
Type: defect | Status: new
Priority: major | Milestone: Olena 1.0
Component: Milena | Version: 1.0
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by lazzara):
Temporarily fixed with r3145.
Computation is stored in double variables instead of float.
--
Ticket URL: <https://trac.lrde.org/olena/ticket/179#comment:1>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.
#179: Float precision issues with epsilon
----------------------+-----------------------------------------------------
Reporter: lazzara | Owner: Olena Team
Type: defect | Status: new
Priority: major | Milestone: Olena 1.1
Component: Milena | Version: 1.0
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Changes (by levill_r):
* milestone: Olena 1.0 => Olena 1.1
Comment:
Interesting. Does the code behave identically on all architectures? It
would be wise to have a test case for this issue (maybe there's already
one?).
Anyway, this is secondary issue; I'm postponing this to [milestone:"Olena
1.1" Olena 1.1].
--
Ticket URL: <https://trac.lrde.org/olena/ticket/179#comment:2>
Olena <http://olena.lrde.epita.fr>
Olena, a generic and efficient C++ image processing library.