[jira] [Resolved] (NUMBERS-79) Convert fraction addition from BigInteger-based to long-based

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (NUMBERS-79) Convert fraction addition from BigInteger-based to long-based

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/NUMBERS-79?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Barnhill resolved NUMBERS-79.
----------------------------------
    Resolution: Fixed

Fraction's long-based approach passes all tests

> Convert fraction addition from BigInteger-based to long-based
> -------------------------------------------------------------
>
>                 Key: NUMBERS-79
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-79
>             Project: Commons Numbers
>          Issue Type: Improvement
>            Reporter: Eric Barnhill
>            Assignee: Eric Barnhill
>            Priority: Minor
>
> Current Fraction class uses BigInteger due to the fact that in extreme cases adding and subtraction of fractions can require 65 bits of precision. However this is very costly in terms of performance for all but the most extreme cases. This ticket proposes using long-based arithmetic for Fraction addition and subtraction, and recommending BigFraction if the operation may run very large.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)