commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r762116 - in /commons/proper/math/trunk/src/java/org/apache/commons/math: ./ analysis/polynomials/ analysis/solvers/ estimation/ ode/ ode/nonstiff/ ode/sampling/ optimization/ random/ stat/ stat/descriptive/ stat/descriptive/moment/ s
Date Sun, 05 Apr 2009 21:57:42 GMT
On 05/04/2009, sebb <sebbaz@gmail.com> wrote:
> On 05/04/2009, Phil Steitz <phil.steitz@gmail.com> wrote:
>  > sebb wrote:
>  >
>  > > On 05/04/2009, Phil Steitz <phil.steitz@gmail.com> wrote:
>  > >
>  > >
>  > > > sebb@apache.org wrote:
>  > > >
>  > > >  We need to be careful with removing all of these casts.  They were
>  > inserted
>  > > > earlier to eliminate some errors resulting from int/int computations
in
>  > > > larger expressions resulting in incorrect values.   Could be later JDKs
>  > > > handle all of this seamlessly, but I would prefer to be safe rather than
>  > > > sorry here and leave the explicit casts from int/long to double alone.
>  > > >
>  > > >
>  > >
>  > > I've just checked, and there are still some (double) casts left in the
>  > > code that Eclipse does not complain about, so I assume that Eclipse
>  > > distinguishes between casts that Java does anyway and casts that
>  > > affect the resulting code.
>  > >
>  > >
>  >  I would rather not leave this decision to Eclipse.  I will review and
>  > selectively revert.
>
>
> OK, thanks, I will go through the commits as well.
>

I've looked at both the java and test tree commits, and cannot find
any incorrect cast removals.

I did find one place in the test classes where Eclipse removed one
cast and not the other:

old: expected[i] = (double)smallSampleSize*100/(double)16;
new: expected[i] = (double)smallSampleSize*100/16;

which is to be expected as smallSampleSize is long.

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


Mime
View raw message