[ https://issues.apache.org/jira/browse/NUMBERS-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jin Xu updated NUMBERS-152: --------------------------- Description: https://github.com/apache/commons-numbers/pull/85 currently, even if we already know the num and den be already reduced, we must run a gcd when creating the Fraction object. I think we can provide a private constructor, specially for situations when we can make sure the num and den be already reduced, then we do not invoke the additional gcd round. > add a private constructor for already known reduced num and den, to avoid > unneeded gcd. > --------------------------------------------------------------------------------------- > > Key: NUMBERS-152 > URL: https://issues.apache.org/jira/browse/NUMBERS-152 > Project: Commons Numbers > Issue Type: Improvement > Components: fraction > Reporter: Jin Xu > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > https://github.com/apache/commons-numbers/pull/85 > currently, even if we already know the num and den be already reduced, we > must run a gcd when creating the Fraction object. > I think we can provide a private constructor, specially for situations when > we can make sure the num and den be already reduced, then we do not invoke > the additional gcd round. -- This message was sent by Atlassian Jira (v8.3.4#803005)