Package org.apfloat.samples
Class Pi.ChudnovskyPiCalculator
java.lang.Object
org.apfloat.samples.Pi.ChudnovskyPiCalculator
- All Implemented Interfaces:
Serializable
,Operation<Apfloat>
- Direct Known Subclasses:
PiParallel.ParallelChudnovskyPiCalculator
- Enclosing class:
Pi
Basic class for calculating pi using the Chudnovskys' binary splitting algorithm.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionChudnovskyPiCalculator
(long precision, int radix) Construct a pi calculator with the specified precision and radix.protected
ChudnovskyPiCalculator
(Pi.BinarySplittingPiCalculator calculator, long precision, int radix) Construct a pi calculator with the specified binary splitting algorithm. -
Method Summary
-
Constructor Details
-
ChudnovskyPiCalculator
Construct a pi calculator with the specified precision and radix.- Parameters:
precision
- The target precision.radix
- The radix to be used.- Throws:
ApfloatRuntimeException
-
ChudnovskyPiCalculator
protected ChudnovskyPiCalculator(Pi.BinarySplittingPiCalculator calculator, long precision, int radix) throws ApfloatRuntimeException Construct a pi calculator with the specified binary splitting algorithm.- Parameters:
calculator
- The binary splitting algorithm to be used.precision
- The target precision.radix
- The radix to be used.- Throws:
ApfloatRuntimeException
-
-
Method Details
-
execute
-