pi_digits.ijs

Contributor: William Szuch
Updated: 2023 03 07
Depend:
Definitions: loaded to locale base.
Status: dev
Script source: pi_digits.ijs

Calculate the digits of pi using several methods
as a string and integer and compare the results.
See: video by Rob Therriault on Youtube.
Bob’s pi video
See: Vocabulary at: x:
Also see Notes in the script for comparison calculations.

Definitions

B bigpi
P pi_n, pi_s

bigpi (monad)

Form: explicit
Depend:nil
Definition taken from:
~addon/math/misc/bigpi.ijs
Calculate several digits of pi
from Borwein
version: 1.0.0
Calculate pi to different levels of of precision

Syntax

bigpi(N)
N = number of steps
    each step adds about 14 digits of precision

Example

  #": bigpi 72    NB.(gives 1009 digits of pi)
1009

pi_n (monad)

Form: tacit
Depend: nil
Calculate digits of pi as an integer number

Syntax

pi_n(N)
N = number of digits of pi

Example

   pi_n 20
31415926535897932384

pi_s (monad)

Form: tacit
Depend: nil
Calculate digits of pi as a string
Taken from Vocabulary x:

Syntax

pi_s(N)
N = number of digits of pi as a string

Example

   pi_s 20
31415926535897932384