Class Pi.BinarySplittingPiCalculator
java.lang.Object
org.apfloat.samples.Pi.BinarySplittingPiCalculator
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PiParallel.ParallelBinarySplittingPiCalculator
- Enclosing class:
Pi
Class for implementing the binary splitting algorithm.
- Version:
- 1.14.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a pi calculator with the specified precision and radix. -
Method Summary
Modifier and TypeMethodDescriptionprivate Apfloata(long n) private Apfloatp(long n) private Apfloatq(long n) voidr(long n1, long n2, ApfloatHolder T, ApfloatHolder Q, ApfloatHolder P, Pi.BinarySplittingProgressIndicator progressIndicator) Entry point for the binary splitting algorithm.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
series
-
-
Constructor Details
-
BinarySplittingPiCalculator
Construct a pi calculator with the specified precision and radix.- Parameters:
series- The binary splitting series to be used.
-
-
Method Details
-
r
public void r(long n1, long n2, ApfloatHolder T, ApfloatHolder Q, ApfloatHolder P, Pi.BinarySplittingProgressIndicator progressIndicator) throws ApfloatRuntimeException Entry point for the binary splitting algorithm.- Parameters:
n1- Start term.n2- End term.T- Algorithm parameter.Q- Algorithm parameter.P- Algorithm parameter.progressIndicator- Class to print out the progress of the calculation.- Throws:
ApfloatRuntimeException
-
a
- Throws:
ApfloatRuntimeException
-
p
- Throws:
ApfloatRuntimeException
-
q
- Throws:
ApfloatRuntimeException
-