commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject Re: [math] Where is the document on development guidelines?
Date Sat, 20 Mar 2010 22:53:06 GMT
Disc Magnet a écrit :
> On Sat, Mar 20, 2010 at 4:19 AM, Luc Maisonobe <> wrote:
>> Disc Magnet a écrit :
>>> A few years back when I browsed the Apache Commons Math website, I found a
>>> document describing how boundary cases, overflows, divide by zero, error
>>> conditions, etc. are handled. They were some guidelines meant to be followed
>>> by the developers of Commons Math. I am unable to locate this document now.
>>> Could someone please help? Or is it that the guidelines are no longer
>>> considered necessary?
>> Do you mean this page: <> ?
>> Luc
> Yes, but I don't find the guidelines regarding how to handle
> overflows, divide by zero, error conditions, when to use NaN and such
> things. Long back, I think the page had all this information. Can
> someone please tell me where to read all this from?

Everything is in the web site. The page you refer to may have be
rewritten since you last read it. As far as I know, there are no general
guidelines for overflows and such. Several different algorithms use
several different strategies, and we are not self consistent. For
example, some algorithms deliberately use exact equality tests on
doubles while others use a fixed tolerance for double comparisons and
still others use user customizable tolerance. These behaviors are
algorithm dependent. When we implement a well known algorithm, we try to
keep these tests as they are in the reference implementation or paper,
and the library has grown to a collection of sometimes inconsistent choices.

After some search (using grep ...) on the xml source files for the
documentation, I really found only the developers.xml and overview.xml
pages that are general enough and provide some hints about NaNs.

There were already some issues raised on inconsistencies
(<> and
<>), but we finally decided
not to fix them. If you think it would be worth doing, patches are welcome.


> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message