You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2022/10/14 11:35:00 UTC

[jira] [Closed] (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 ]

Alex Herbert closed NUMBERS-79.
-------------------------------
    Resolution: Fixed

> 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
>          Components: fraction
>            Reporter: Eric Barnhill
>            Assignee: Eric Barnhill
>            Priority: Minor
>             Fix For: 1.0-beta1
>
>
> 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
(v8.20.10#820010)