Post Reply 
Creating digits of pi
05-12-2018, 03:18 AM
Post: #46
RE: Creating digits of pi
(05-12-2018 01:42 AM)Gerson W. Barbosa Wrote:  The 12/25 factor to determine the required number of terms may not be exact. I expected it to be 1/2 from the first tests, but I cannot confirm it to be correct the thousand-digit evaluation which is possible in Decimal BASIC.

If you want to maintain compatibility with ANSI BASIC and possibly future versions of Decimal BASIC, change
PRINT left$(p$,2);
to
PRINT p$(1:2);
and
PRINT mid$(p$,i,1);
to
PRINT p$(i:i);

left$, right$ and mid$ aren't in the ANSI standard and may go away in future versions of Decimal BASIC.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Creating digits of pi - brickviking - 02-06-2018, 12:24 AM
RE: Creating digits of pi - Joe Horn - 02-06-2018, 01:38 AM
RE: Creating digits of pi - toml_12953 - 02-06-2018, 09:24 PM
RE: Creating digits of pi - brickviking - 02-06-2018, 10:38 PM
RE: Creating digits of pi - brickviking - 02-08-2018, 04:22 AM
RE: Creating digits of pi - toml_12953 - 02-08-2018, 01:02 PM
RE: Creating digits of pi - TASP - 02-07-2018, 10:30 PM
RE: Creating digits of pi - pier4r - 02-09-2018, 02:59 PM
RE: Creating digits of pi - emece67 - 02-10-2018, 09:14 PM
RE: Creating digits of pi - TASP - 02-11-2018, 12:12 AM
RE: Creating digits of pi - ttw - 02-12-2018, 03:59 AM
RE: Creating digits of pi - EdS2 - 02-17-2018, 12:27 PM
RE: Creating digits of pi - EdS2 - 02-21-2018, 11:01 AM
RE: Creating digits of pi - pier4r - 02-17-2018, 04:25 PM
RE: Creating digits of pi - brickviking - 02-17-2018, 09:27 PM
RE: Creating digits of pi - pier4r - 02-23-2018, 01:34 PM
RE: Creating digits of pi - SlideRule - 05-13-2018, 05:09 PM



User(s) browsing this thread: 4 Guest(s)