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 BigRationalfactorial2nPlus1static SinhCalculatorINSTANCEprivate intn
-
Constructor Summary
Constructors Modifier Constructor Description privateSinhCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcalculateNextFactor()Calculates the factor of the next term.protected PowerIteratorcreatePowerIterator(java.math.BigDecimal x, java.math.MathContext mathContext)Creates thePowerIteratorused for this series.protected BigRationalgetCurrentFactor()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:SeriesCalculatorReturns 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:
getCurrentFactorin classSeriesCalculator- Returns:
- the factor of the highest term
-
calculateNextFactor
protected void calculateNextFactor()
Description copied from class:SeriesCalculatorCalculates the factor of the next term.- Specified by:
calculateNextFactorin classSeriesCalculator
-
createPowerIterator
protected PowerIterator createPowerIterator(java.math.BigDecimal x, java.math.MathContext mathContext)
Description copied from class:SeriesCalculatorCreates thePowerIteratorused for this series.- Specified by:
createPowerIteratorin classSeriesCalculator- Parameters:
x- the value xmathContext- theMathContext- Returns:
- the
PowerIterator
-
-