Package ch.obermuhlner.math.big.internal
Class SinhCalculator
- java.lang.Object
-
- ch.obermuhlner.math.big.internal.SeriesCalculator
-
- ch.obermuhlner.math.big.internal.SinhCalculator
-
public class SinhCalculator extends SeriesCalculator
Calculates sinus hyperbolicus using the Taylor series.No argument checking or optimizations are done. This implementation is not intended to be called directly.
-
-
Field Summary
Fields Modifier and Type Field Description private BigRational
factorial2nPlus1
static SinhCalculator
INSTANCE
private int
n
-
Constructor Summary
Constructors Modifier Constructor Description private
SinhCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
calculateNextFactor()
Calculates the factor of the next term.protected PowerIterator
createPowerIterator(java.math.BigDecimal x, java.math.MathContext mathContext)
Creates thePowerIterator
used for this series.protected BigRational
getCurrentFactor()
Returns the factor of the highest term already calculated.-
Methods inherited from class ch.obermuhlner.math.big.internal.SeriesCalculator
calculate, getFactor
-
-
-
-
Field Detail
-
INSTANCE
public static final SinhCalculator INSTANCE
-
n
private int n
-
factorial2nPlus1
private BigRational factorial2nPlus1
-
-
Method Detail
-
getCurrentFactor
protected BigRational getCurrentFactor()
Description copied from class:SeriesCalculator
Returns the factor of the highest term already calculated.When called for the first time will return the factor of the first term (index 0).
After this call the method
SeriesCalculator.calculateNextFactor()
will be called to prepare for the next term.- Specified by:
getCurrentFactor
in classSeriesCalculator
- Returns:
- the factor of the highest term
-
calculateNextFactor
protected void calculateNextFactor()
Description copied from class:SeriesCalculator
Calculates the factor of the next term.- Specified by:
calculateNextFactor
in classSeriesCalculator
-
createPowerIterator
protected PowerIterator createPowerIterator(java.math.BigDecimal x, java.math.MathContext mathContext)
Description copied from class:SeriesCalculator
Creates thePowerIterator
used for this series.- Specified by:
createPowerIterator
in classSeriesCalculator
- Parameters:
x
- the value xmathContext
- theMathContext
- Returns:
- the
PowerIterator
-
-