Microcode, which is a no-go for modern designs

Paul Koning paulkoning at comcast.net
Mon Jan 7 08:28:12 CST 2019



> On Jan 7, 2019, at 3:20 AM, Johnny Eriksson via cctalk <cctalk at classiccmp.org> wrote:
> 
>> Few people (but most are right here) can recite PI to enough digits to 
>> reach the level of inaccuracy.   And those who believe that PI is exactly 
>> 22/7 are unaffected by FDIV.   (YES, some schools do still teach that!)
> 
> Why remember the digits, when a small program can provide them?
> 
>  +0un qn"E20Un' 0Uh 0uv HK
>  Qn<j 0uq Qn*10/3Ui
>  Qi<\+2*10+(Qq*qi)Ua 0LK Qi*2-1Uj Qa/QjUq Qa-(Qq*Qj)-2\10I$ Qi-1ui>
>  Qq/10Ut Qh+Qt+48Uw Qw-58"E48Uw %v' Qv"N:Qv,1^T' QwUv Qq-(Qt*10)Uh>
>  :Qv,1^T
>  !Can you figure out what this macro does before running it?  It was
>  written by Stan Rabinowitz with modifications by Mark Bramhall and
>  appeared as the Macro of the Month in the Nov. 1977 issue of the TECO
>  SIG newsletter, the "Moby Munger".  For information on the TECO Special
>  Interest Group, write to Stan at P.O. Box 76, Maynard, Mass. 01754!
> 
> --Johnny

See also  "A spigot algorithm for the digits of pi", American Mathematical Monthly,
102 (1995), 195-203.

For extra credit, find and fix the bug in Stan's program.  (Run it to 1000 digits or so to see the bug.)

	paul



More information about the cctalk mailing list