On Thursday, September 5, 2019 at 8:25:14 PM UTC+7,
nib...@yahoo.com wrote:
> How to expaind the Pi number with n decimal digits?
Best is to start with a programming language that allows
"unlimited precision" (or very high-precision) numbers.
For example, using 'bc' I type
scale = 1001
4*a(1)
and see Pi expanded correctly for 1000 digits. The a() function
is 'built-in'; you can write your own functions to calculate pi yourself.
('bc' is a C-like language with functions, loops, arrays, etc.)
To do this WITHOUT using a language that supports unlimited precision,
you'll need to implement the high precision arithmetic yourself.
Not an overly-simple task ...
James D. Allen