[ 
https://issues.apache.org/jira/browse/MATH-996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13692184#comment-13692184
 ] 

Tim Allison commented on MATH-996:
----------------------------------

Found same behavior in BigFraction.  Same fix applied with simple unit test 
added.
                
> Fraction specified with maxDenominator and a value very close to a simple 
> fraction should not throw an overflow exception
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MATH-996
>                 URL: https://issues.apache.org/jira/browse/MATH-996
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.1.1
>            Reporter: Tim Allison
>            Priority: Minor
>         Attachments: COMMONSMATH-996.patch
>
>
> An overflow exception is thrown when a Fraction is initialized with a 
> maxDenominator from a double that is very close to a simple
> fraction.  For example:
> double d = 0.5000000001;
> Fraction f = new Fraction(d, 10);
> Patch with unit test on way.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to