You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Eric Barnhill (JIRA)" <ji...@apache.org> on 2019/01/18 00:46:00 UTC

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

     [ 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)