On Fri, Oct 06, 2017 at 02:12:01PM +0200, Jan Stary wrote:

> Isn't "4 * a(1)" a more natural incarnation of pi than "2 * a(2^10000)"?

The point of this example is to (also) show that a() works on very
large numbers.

        -Otto

> 
>       Jan
> 
> 
> Index: bc.1
> ===================================================================
> RCS file: /cvs/src/usr.bin/bc/bc.1,v
> retrieving revision 1.32
> diff -u -p -r1.32 bc.1
> --- bc.1      17 Nov 2015 05:45:35 -0000      1.32
> +++ bc.1      6 Oct 2017 12:10:47 -0000
> @@ -332,7 +332,7 @@ the exponential function and
>  prints approximate values of the exponential function of
>  the first ten integers.
>  .Bd -literal -offset indent
> -$ bc -l -e 'scale = 500; 2 * a(2^10000)' -e quit
> +$ bc -l -e 'scale = 500; 4 * a(1)' -e quit
>  .Ed
>  .Pp
>  prints an approximation of pi.

Reply via email to