commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject Re: [math] Adding some methods in Precision class (oacm.util)
Date Wed, 19 Sep 2012 15:44:20 GMT
Hi Yannick,

>
> About the default value (1e-14), I know the tolerance is case-dependant, but some times,
we don't precisely know the order of magnitude (ex : jacobians matrices) and it's quite practical
to have a default value.
> In our tools, we use this value in the test classes, but also for specific algorithm
convergence threshold.
>
I'm uncomfortable with CM having a default tolerance implemented
somewhere. As you said, tolerances are case-dependant, and therefore
DEFAULT_TOL (or whatever you want to call it) should stand in your
particular application, not in a utility Commons-Math class. This is
pretty much the approach adopted in our testing suites. You will
frequently find a constant field with a default tolerance which
applies for the specific unit test only. I would be very reluctant to
try and be more general, while we all know that such a constant would
not mean anything.

Don't mistake me. I'm not saying that chosing a (somewhat arbitrary)
default tolerance is bad practice. As you said, sometimes there is no
other option.

I would like to know what others think,
S├ębastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message