PiAlgorithm class abstract
Abstract base class for algorithms that compute the value of pi.
This class defines the common properties and methods for algorithms that
calculate the value of pi to a specified number of digits. Subclasses
must implement the calculate()
method to provide the specific algorithm
for computing pi.
- Implementers
Constructors
- PiAlgorithm.new(int digits, double digitsPerIteration)
Properties
Methods
-
calculate(
) → Decimal - Calculates the value of pi to the specified number of digits.
-
factorial(
int n) → Decimal -
getTimePerDigit(
) → double - Calculates the time taken to compute one digit of pi.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited