Heinrich Bohne created NUMBERS-131:
--------------------------------------
Summary: Re-designing BigFraction.from(double, double, int, int)
Key: NUMBERS-131
URL: https://issues.apache.org/jira/browse/NUMBERS-131
Project: Commons Numbers
Issue Type: Improvement
Components: fraction
Affects Versions: 1.0
Reporter: Heinrich Bohne
The method {{BigFraction.from(double, double, int, int)}} can be improved in
several ways:
* It only allows a maximum denominator in the {{int}} range, which defies the
purpose of having a {{BigFraction}} class in addition to the class
{{Fraction}}. Since {{BigFraction}} is {{BigInteger}} based, it would only be
natural to allow the maximum denominator to be passed as a {{BigInteger}}.
* It only calculates the convergents of the simple continued fraction, but not
its semi-convergents, so it doesn't necessarily produce the closest possible
approximation within the given bounds.
* The design is awkward. Making the method's behavior dependent on the values
of its arguments is confusing, even the documentation acknowledges this.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)