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] Toward releasing 3.0 ?
Date Fri, 27 Jan 2012 19:44:37 GMT
Hi Luc,
thanks for this answer.
>>
>> My problem is that I do not know what getSolverAbsoluteAccuracy()
>> should return. I see three options
>> 1. Have getSolverAbsoluteAccuracy() throw an
>> UnsupportedOperationException, as the solver is *never* invoked.
>> 2. Return a default value, and specify in the Javadoc that it is
>> meaningless or not really meaningful ;).
>> 3. Return an estimate of the absolute accuracy of the explicit above
>> expressions, namely a + FastMath.sqrt(p * (b - a) * (c - a)) and b -
>> FastMath.sqrt((1 - p) * (b - a) * (b - c)).
>>
>> My preferred option is 1. I dislike option 2, because users might
>> actually be using the returned value, believing it to somehow reflect
>> the accuracy of the value returned by
>> inverseCumulativeProbability(double). Option 3 would be a good
>> compromise, but I certainly do not have the level of expertise to come
>> up with this estimate... Any help would be most welcome!
>
> I don't like UnsupportedOperationException.
>
Fine.
> In this case, I would say
> the explicit formula is some kind of "perfect" solver
I agree
>
> which has a
> theoretical accuracy of zero (or 1 ulp). So I would return this value.
>
Yes, but one ulp of which number? What I have implemented so far is
return Math.ulp(c) (the intermediate value). I sould probably return
Math.max(Math.ulp(a), Math.ulp(b)), what do you 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