commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: svn commit: r651074 - in /commons/sandbox/nabla/trunk/src/site/xdoc: index.xml internals.xml usage.xml
Date Fri, 25 Apr 2008 00:19:48 GMT
On Wed, Apr 23, 2008 at 2:37 PM,  <> wrote:
> Author: luc
>  Date: Wed Apr 23 14:37:08 2008
>  New Revision: 651074
>  URL:
>  Log:
>  improved documentation
>  the developers-oriented documentation has been started

Thanks, Luc!

>  +        <p>
>  +          For singularities not related to domain definition boundaries (like
>  +          <code>Math.abs</code> and conditional branches), the theoretical
derivative is not
>  +          defined as a single value, but as a pair of left and a right half-derivatives,
one for
>  +          each side of the singularity. Since there is little support in the IEEE754
>  +          to distinguish the left and right hand side of a single value (except for
zero, since
>  +          -0 and +0 both exist), we have decided to adopt a simplified approach. These
cases are
>  +          implemented by simple conditional branches (we added explicitly such a conditional
in the
>  +          <code>Math.abs</code> case). Nabla then simply computes the value
of the smooth
>  +          derivative on the branch of the computation path that is selected at run
time, depending
>  +          on the values of the input parameters. This choice allows to preserve the
property of
>  +          having a derivative that is always consistent with the associated value,
and it is a simple
>  +          arbitrary choice of one of the two possibilities that correspond to the mathematical
>  +          which by itself does not choose between them.
>  +        </p>

The problem here is that it is not an "arbitrary choice" between the
two different values - the limit that is the derivative does not
exist.  It would make more sense to me to return NaN or throw IAE in
these cases.  Is that tractable?  Moreover, is it tractable to
consistently define differentiability and throw an appopriate
exception or return NaN at points where a java-defined function is not

We should at least document the behavior in the javadoc in any case.


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

View raw message