commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <>
Subject Re: [Math] Factorial
Date Wed, 03 Nov 2010 10:32:33 GMT

> >>Agree, we should be consistent with the JLS, so throwing exceptions in case
> >>of overflow isn't the right thing to do.
> >
> >"ArithmeticException" is currently used for that purpose in many methods of
> >"MathUtils".
> >
> For floating point values?  Which methods?

No. But from the start, my question was: Shouldn't CM be consistent with
In the same way that "MathUtils" contains methods (taking integer
arguments) that use "ArithmeticException" to signal overflow (whereas Java
will happily wrap to negative values), I suggested that the other methods
(taking floating point arguments) could be consistent with the choice of
being safer than the JLS.


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

View raw message