MCPcopy Create free account
hub / github.com/apache/commons-lang / add

Method add

src/main/java/org/apache/commons/lang3/math/Fraction.java:505–507  ·  view source on GitHub ↗

Adds the value of this fraction to another, returning the result in reduced form. The algorithm follows Knuth, 4.5.1. @param fraction the fraction to add, must not be null @return a Fraction instance with the resulting values @throws NullPointerException if the fraction is {@code n

(final Fraction fraction)

Source from the content-addressed store, hash-verified

503 * {@code Integer.MAX_VALUE}
504 */
505 public Fraction add(final Fraction fraction) {
506 return addSub(fraction, true /* add */);
507 }
508
509 /**
510 * Implements add and subtract using the algorithm described in <a href="https://www-cs-faculty.stanford.edu/~knuth/taocp.html">

Callers 15

testAddMethod · 0.95
getStackFrameListMethod · 0.45
getThrowableListMethod · 0.45
addContextValueMethod · 0.45
normalizeUpperBoundsMethod · 0.45
unrollVariablesMethod · 0.45
getMatchingMethodMethod · 0.45
getOverrideHierarchyMethod · 0.45
joiningMethod · 0.45

Calls 1

addSubMethod · 0.95

Tested by 1

testAddMethod · 0.76