Package ch.obermuhlner.math.big.internal
Class AsinCalculator
- java.lang.Object
-
- ch.obermuhlner.math.big.internal.SeriesCalculator
-
- ch.obermuhlner.math.big.internal.AsinCalculator
-
public class AsinCalculator extends SeriesCalculator
Calculates arc sinus using the Maclaurin 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 BigRationalfactorial2nprivate BigRationalfactorialNprivate BigRationalfourPowerNstatic AsinCalculatorINSTANCEprivate intn
-
Constructor Summary
Constructors Modifier Constructor Description privateAsinCalculator()
-
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 AsinCalculator INSTANCE
-
n
private int n
-
factorial2n
private BigRational factorial2n
-
factorialN
private BigRational factorialN
-
fourPowerN
private BigRational fourPowerN
-
-
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
-
-