commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Rossi" <b...@rossi.com>
Subject Re: [math] unit tests for FastMath
Date Sat, 28 Aug 2010 22:48:26 GMT

On Sat, 28 Aug 2010 18:25:23 -0400,  wrote:
> Luc Maisonobe wrote:
> > Hi all,
> > 
> > I have started integrating the FastMath class from MATH-375. I have not
> > committed anything for now as I am first fixing numerous checkstyle
> > errors (more than 300) and wanted to have one clean commit to simplify
> > patching both trunk for 3.0 and branch 2.X.
> > 
> > One less obvious problem is unit tests. The current tests (which I
> > converted to Junit 4) depend on a few external classes that themselve
> > depend on a LGPL library, and this library doesn seem to be available in
> > maven repositories. This imply that we cannot include the library in the
> > release, and we cannot either use it as an optional dependency for tests.
> > 
> > I would suggest to completely remove this library and create tests
> > simply by storing reference values in files that we would read. It would
> > be similar to the existing tests for random values or stats. The file
> > could of course be created using dfp or any other reference high
> > precision package (having several different reference sources would be
> > better IMHO). We would remove the random aspect of the tests, which may
> > or may not be a problem.
> 
> Sounds like a reasonable approach.  Can you explain a little more
> what the tests do and what you have in mind in terms of data
> coverage?  In particular, what are the "random aspects" of the
> tests?  I know the answer here is really RTFP (p = patch ;)
> but hey, I am a little lazy this evening.
> 
> Phil

For each API the test generates a set of input data using an RNG.  The function is evaluated
and compared to a reference high precision library.   Random data was used because its hard
to predict which inputs will cause issues.  Its probably reasonable to just seed the RNG before
the test to get more predictable results.

Some other tests compare the performance to the standard Math implementation.



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


Mime
View raw message