Function compute_pi::compute_pi

source ·
pub fn compute_pi(digits: usize) -> Float
Expand description

Calculates the value of pi to a specified number of decimal places using the Gauss-Legendre algorithm.

§Arguments

  • digits - The number of decimal places of pi to calculate.

§Returns

A Float representing the calculated value of pi to the specified number of decimal places.