[
https://issues.apache.org/jira/browse/NUMBERS-131?focusedWorklogId=296602&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-296602
]
ASF GitHub Bot logged work on NUMBERS-131:
------------------------------------------
Author: ASF GitHub Bot
Created on: 16/Aug/19 21:39
Start Date: 16/Aug/19 21:39
Worklog Time Spent: 10m
Work Description: Schamschi commented on issue #66: [NUMBERS-131]
Re-write implementations of double approximation factory methods in BigFraction
URL: https://github.com/apache/commons-numbers/pull/66#issuecomment-522159917
Hi Eric,
sorry for the late reply, I have a bit much to do right now, and I don't
think I'll be able to have a look at it before Sunday. But thanks for taking
the time to look at it. There are some other things that need to be changed
besides those you mentioned, for example the Javadoc, as I've learned in the
meantime that MathJax is preferred over HTML also in private and
package-private elements.
And about the lengthy explanation of the algorithm: Do you have a specific
suggestion? The essence of the algorithm is described in the Wikipedia article
Continued Fraction, which is where I got it from, but I'm not sure if this is a
suitable source to cite, because it doesn't contain any explanation as to why
the algorithm works, and the references for the respective sections of the
article were not very helpful either, as far as I remember. The book by A.
Khinchin was the best source I could find, and the sections I cited are
available on the free preview on Google Books, but I couldn't find a summary of
the algorithm there (at least not in the free preview, I don't have the book,
so I don't know if there is one somewhere in the rest of the book).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 296602)
Time Spent: 50m (was: 40m)
> 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
(v7.6.14#76016)