commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: [Math] linearCombination
Date Sun, 07 Aug 2011 23:55:44 GMT

> [...]
> >
> >However, I'm concerned that the "stress" test ("testLinearCombination1")
> >taken from your test case for Vector3D might not be stringent enough. [I
> >think that while changing my implemementation, the test was still passing
> >just before I dicovered that I was using an unitialized (set to 0 by
> >default) variable.]
> >Could you devise one sure to detect bugs like this (i.e. where all the
> >various variables in "linearCombination" would be significant)?
> I think we could try something like generating randomly the first
> n-1 components of a and b arrays as high accuracy Dfp, then set up
> the last component of each array so that the higher bits cancels out
> and some non-zero lower bits remains. The Dfp computations would
> represent reference values and we would check if the method can
> retrieve at least some of the lower bits. With a large number of
> different arrays (say a few hundreds, with a few dozen elements
> each), this would stress the algorithm.
> Does this make sense ?

Maybe, but I can't look at Dfp for now. So I'll let you try ;-).


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

View raw message