>In case you do not know yet, but in commons-math
>we do have an arbitrary precision arithmetic implementation (Dfp)


I remember that now, but I never went too deep into ultimate accuracy,
various kinds of roundings, etc.

I've always mostly just been interested in double-like-accuracy + speed :)




>We do not yet test for the full range of possible inputs, which is quite
>tricky and there exists an issue for it (MATH-580).


In the code I uploaded, there is a NumbersTestUtils class,
which I use to generate various types of values.


If you use the "whatever" type of methods, such as "randomDoubleWhatever()",
you end up with random values of either uniform bits patterns,
or uniform magnitudes, or particular bits patterns (exponents
or mantissa filled with various amounts of 1 or 0 on the left
or on the right, etc.), or at-or-close-to mathematical integers,
or at-or-close-to equidistance between mathematical integers,
etc., which allows to test many corner cases.


If you mix that with Dfp then your tests should be more reliable.



-Jeff

Reply via email to