PiCalculator class
A utility class for calculating the value of Pi (π) using various algorithms.
This class focuses on high-precision calculation of Pi, particularly using the Srinivasa Ramanujan series, which offers rapid convergence.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Methods
-
bigIntPow(
BigInt base, int exponent) → BigInt -
Calculates
baseraised to the power ofexponentusing BigInt. -
calculatePiRamanujan(
int numTerms, {int decimalPrecision = 50}) → Decimal - Calculates the value of Pi (π) using the Srinivasa Ramanujan series.
-
factorial(
int n) → BigInt -
Calculates the factorial of a non-negative integer
n.