Hi Eric.
On Mon, 3 Dec 2018 10:01:39 -0800, Eric Barnhill wrote:
Does this mean that computations can "unpredictably" overflow
(or throw an exception)?
The ArithmeticUtils() methods mulAndCheck and addAndCheck throw
exceptions
if there is overflow during primitive operations. That is the "
>
>
> Does this mean that computations can "unpredictably" overflow
> (or throw an exception)?
>
The ArithmeticUtils() methods mulAndCheck and addAndCheck throw exceptions
if there is overflow during primitive operations. That is the "check" part
of the method name.
> Is it acceptable, or should
On Fri, 30 Nov 2018 15:56:54 -0800, Eric Barnhill wrote:
Here is what I propose for the Fraction doc text regarding this
issue:
* Implement add and subtract. This algorithm is similar to that
* described in Knuth 4.5.1. while making some concessions to
* performance. Note Knuth 4
Here is what I propose for the Fraction doc text regarding this issue:
* Implement add and subtract. This algorithm is similar to that
* described in Knuth 4.5.1. while making some concessions to
* performance. Note Knuth 4.5.1 Exercise 7, which observes that
* adding two fract
Addendum to the above. In an exercise in the Knuth book Knuth does indeed
state that "If the inputs are n-bit binary numbers, 2N+1 bits may be
necessary to represent t." where t is a derived quantity that would take
some time to explain.
So that means in extreme cases, the needed precision to repr
I'm all for the Javadoc made to reflect the reality of the code. It is fine
to have an additional section that points out Knuth and how we may want to
change things as a hint or request to contributors.
Gary
On Wed, Nov 7, 2018 at 10:52 AM Eric Barnhill
wrote:
> I read Kunth's "Art of Computer
Hi.
On Wed, 7 Nov 2018 09:52:30 -0800, Eric Barnhill wrote:
I read Kunth's "Art of Computer Programming 4.5.1" that is referenced
many
times in the doc as the guidance for the commons-math/commons-numbers
Fraction class. It is an interesting read. Also, for all the times it
is
cited in the doc
I read Kunth's "Art of Computer Programming 4.5.1" that is referenced many
times in the doc as the guidance for the commons-math/commons-numbers
Fraction class. It is an interesting read. Also, for all the times it is
cited in the doc, it is interesting that Fraction doesn't really use it as
implem