Heinrich Bohne created NUMBERS-127:
--------------------------------------
Summary: Fraction(int, int) rejects possibly reducible numerator
or denominator 2^-31
Key: NUMBERS-127
URL: https://issues.apache.org/jira/browse/NUMBERS-127
Project: Commons Numbers
Issue Type: Bug
Components: fraction
Affects Versions: 1.0
Reporter: Heinrich Bohne
Since the sign of a fraction is held by the numerator, it is possible that the
values passed as numerator and denominator need to be negated. This is not
possible for 2^-31 due to overflow, so the constructor throws an exception in
this case. However, the constructor forgets that this value might be reducible
if the passed numerator and denominator are not coprime, so it rejects values
where the representation in lowest terms would not overflow.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)