Pi.C C/C++ script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: pi.c
  • Last update:
  • Platform: Windows / Linux / BSD / Solaris
  • Language: C/C++
  • Price:Freeware
  • Company: Bob Stout (View more)

Pi.C script description:




Publisher review:
Pi.C - Calculate PI to 8,000 digits PI.C - Computes Pi to an arbitrary number of digits

Uses far arrays when/where required so may be compiled in any memory modelThe formula that most use (including the one in the Snippets) is the classic Machin formula, with the Gregory series.pi=16arctan(1/5)-4arctan(1/239) And use the traditional Gregory arctangent series to calculate the arctangents. That's the:arctan(x)=x-(x^3)/3 (x^5)/5-(x^7)/7..... With 1/5 and 1/239, it would be:arctan(x)=1/5-1/(3*5^3) 1/(5*5^5)-1/(7*5^7)...arctan(x)=1/239-1/(3*239^3) 1/(5*239^5)-1/(7*239^7)....Doing the multi-precision isn't too hard, since we don't really need to have a general purpose math package. We can hardwire it all.Due to the % operator, ms[i] < (temp * (239**2)) so temp < 3759 and i < 1879, it fails at the 1879th term which translates to 1879 * log10(239**2) == 8941th decimal.

In practice we get a few more digits, (2 -> 8943th)
Pi.C is a C/C++ script for Snippets scripts design by Bob Stout. It runs on following operating system: Windows / Linux / BSD / Solaris.

Operating system:
Windows / Linux / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5