Modifier and Type | Field and Description |
---|---|
static BigFraction |
BigFraction.ONE
A fraction representing "1".
|
static BigFraction |
BigFraction.ZERO
A fraction representing "0".
|
Modifier and Type | Method and Description |
---|---|
BigFraction |
BigFraction.abs()
Returns the absolute value of this
BigFraction . |
BigFraction |
BigFraction.add(BigFraction fraction)
Adds the value of this fraction to another, returning the result in
reduced form.
|
BigFraction |
BigFraction.add(BigInteger bg)
Adds the value of this fraction to the passed
BigInteger ,
returning the result in reduced form. |
BigFraction |
BigFraction.add(int i)
Adds the value of this fraction to the passed
integer , returning
the result in reduced form. |
BigFraction |
BigFraction.add(long l)
Adds the value of this fraction to the passed
long , returning
the result in reduced form. |
BigFraction |
BigFraction.divide(BigFraction fraction)
Divide the value of this fraction by another, returning the result in
reduced form.
|
BigFraction |
BigFraction.divide(BigInteger bg)
Divide the value of this fraction by the passed
BigInteger ,
ie this * 1 / bg , returning the result in reduced form. |
BigFraction |
BigFraction.divide(int i)
Divide the value of this fraction by the passed
int , ie
this * 1 / i , returning the result in reduced form. |
BigFraction |
BigFraction.divide(long l)
Divide the value of this fraction by the passed
long , ie
this * 1 / l , returning the result in reduced form. |
static BigFraction |
BigFraction.from(double value)
Create a fraction given the double value.
|
static BigFraction |
BigFraction.from(double value,
double epsilon,
int maxIterations)
Create a fraction given the double value and maximum error allowed.
|
static BigFraction |
BigFraction.from(double value,
int maxDenominator)
Create a fraction given the double value and maximum denominator.
|
BigFraction |
BigFraction.multiply(BigFraction fraction)
Multiplies the value of this fraction by another, returning the result in
reduced form.
|
BigFraction |
BigFraction.multiply(BigInteger bg)
Multiplies the value of this fraction by the passed
BigInteger , returning the result in reduced form. |
BigFraction |
BigFraction.multiply(int i)
Multiply the value of this fraction by the passed
int , returning
the result in reduced form. |
BigFraction |
BigFraction.multiply(long l)
Multiply the value of this fraction by the passed
long ,
returning the result in reduced form. |
BigFraction |
BigFraction.negate()
Return the additive inverse of this fraction, returning the result in
reduced form.
|
static BigFraction |
BigFraction.of(BigInteger num)
Create a
BigFraction equivalent to the passed BigInteger , ie
"num / 1". |
static BigFraction |
BigFraction.of(BigInteger num,
BigInteger den)
Create a
BigFraction given the numerator and denominator as
BigInteger . |
static BigFraction |
BigFraction.of(int num)
Create a
BigFraction equivalent to the passed int , ie
"num / 1". |
static BigFraction |
BigFraction.of(int num,
int den)
Create a
BigFraction given the numerator and denominator as simple
int . |
static BigFraction |
BigFraction.of(long num)
Create a
BigFraction equivalent to the passed long, ie "num / 1". |
static BigFraction |
BigFraction.of(long num,
long den)
Create a
BigFraction given the numerator and denominator as simple
long . |
BigFraction |
BigFraction.one() |
static BigFraction |
BigFraction.parse(String s)
Parses a string that would be produced by
toString()
and instantiates the corresponding object. |
BigFraction |
BigFraction.pow(BigInteger exponent)
Returns a
BigFraction whose value is
\(\mathit{this}^{\mathit{exponent}}\), returning the result in reduced form. |
BigFraction |
BigFraction.pow(int exponent)
Returns a
BigFraction whose value is
(this<sup>exponent</sup>) , returning the result in reduced form. |
BigFraction |
BigFraction.pow(long exponent)
Returns a
BigFraction whose value is
\(\mathit{this}^{\mathit{exponent}}\), returning the result in reduced form. |
BigFraction |
BigFraction.reciprocal()
Return the multiplicative inverse of this fraction.
|
BigFraction |
BigFraction.subtract(BigFraction fraction)
Subtracts the value of another fraction from the value of this one,
returning the result in reduced form.
|
BigFraction |
BigFraction.subtract(BigInteger bg)
Subtracts the value of an
BigInteger from the value of this
BigFraction , returning the result in reduced form. |
BigFraction |
BigFraction.subtract(int i)
Subtracts the value of an
integer from the value of this
BigFraction , returning the result in reduced form. |
BigFraction |
BigFraction.subtract(long l)
Subtracts the value of a
long from the value of this
BigFraction , returning the result in reduced form. |
BigFraction |
BigFraction.zero() |
Modifier and Type | Method and Description |
---|---|
BigFraction |
BigFraction.add(BigFraction fraction)
Adds the value of this fraction to another, returning the result in
reduced form.
|
int |
BigFraction.compareTo(BigFraction other)
Compares this object to another based on size.
|
BigFraction |
BigFraction.divide(BigFraction fraction)
Divide the value of this fraction by another, returning the result in
reduced form.
|
BigFraction |
BigFraction.multiply(BigFraction fraction)
Multiplies the value of this fraction by another, returning the result in
reduced form.
|
BigFraction |
BigFraction.subtract(BigFraction fraction)
Subtracts the value of another fraction from the value of this one,
returning the result in reduced form.
|
Copyright © 2017–2020 The Apache Software Foundation. All rights reserved.