You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2019/12/12 04:49:00 UTC
[jira] [Commented] (NUMBERS-131) Re-designing
BigFraction.from(double, double, int, int)
[ https://issues.apache.org/jira/browse/NUMBERS-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994188#comment-16994188 ]
Gilles Sadowski commented on NUMBERS-131:
-----------------------------------------
Is there a conclusion to the discussion on GitHub?
> 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
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> 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
(v8.3.4#803005)