0 REM Pi to 1,000 places PI PI-00.BAS PI-00.BAS.txt 400 PRINT " Why do the 8080/Z80 Computers limit Pi to 3.14159" 410 PRINT "" 420 PRINT "The limitation of Pi to 3.14159 (or more accurately, 3.1416 in" 421 PRINT " many cases) in 8080/Z80 computers primarily arises due to" 422 PRINT "constraints in memory, processing power, and floating-point" 423 PRINT "arithmetic precision available on these early microprocessors. 424 PRINT "Here are some key reasons:" 425 PRINT "" 430 PRINT "1. Limited Precision of Floating-Point Numbers:" 440 PRINT "Early microprocessors like the Intel 8080 and Zilog Z80 did not 441 PRINT "have hardware support for floating-point arithmetic, and all" 442 PRINT "arithmetic operations had to be implemented in software." 443 PRINT "Commonly, floating-point libraries for these processors used" 444 PRINT "single-precision floating-point formats, which typically allocate" 445 PRINT "4 bytes (32 bits) for a floating-point number. Out of these" 446 PRINT "32 bits, some are used for the exponent, and the rest for the" 447 PRINT "mantissa. The precision of a 32-bit floating-point number is about" 448 PRINT "7 significant decimal digits. Thus, Pi is often rounded to 3.14159" 449 PRINT "or 3.1416 in single-precision floating-point representations to fit 450 PRINT "within this precision limit." 460 PRINT "" 470 PRINT "2. Memory Constraints:" 471 PRINT "The 8080 and Z80 processors operated in a memory-limited environment," 472 PRINT "often with a few kilobytes to tens of kilobytes of RAM. Storing" 473 PRINT "numbers with higher precision would require more memory, which was" 474 PRINT "a valuable and scarce resource. This limitation led to using a 475 PRINT "reduced precision for mathematical constants like Pi." 476 PRINT "" 480 PRINT "3. Performance Considerations:" 490 PRINT "Performing floating-point arithmetic on 8080/Z80 processors is" 491 PRINT "computationally expensive because all operations are handled by" 492 PRINT "software routines. Using a smaller, less precise version of Pi helps" 493 PRINT "to speed up calculations, which is particularly important given the" 494 PRINT "slow clock speeds (typically 2-4 MHz) of these processors. The" 495 PRINT "reduction in computational effort made software applications run" 496 PRINT "faster and was often an acceptable trade-off for applications that 497 PRINT "did not require high precision." 498 PRINT "" 500 PRINT "4. Common Use Cases:" 510 PRINT "In many of the applications for these early microcomputers, such as" 520 PRINT "simple games, basic graphics, and general-purpose computation, the" 530 PRINT "reduced precision of Pi was sufficient. Only applications requiring" 540 PRINT "high precision (such as scientific calculations) would necessitate a" 550 PRINT "more accurate value of Pi, which was relatively rare on early home 560 PRINT "computers and hobbyist systems." 465 PRINT "" 570 PRINT "In summary, the limitation of Pi to 3.14159 (or 3.1416) in 8080/Z80" 580 PRINT "7computers was a practical decision based on the available resources" 590 PRINT "and typical use cases, balancing memory usage, computational speed, 600 PRINT "and the precision required for most applications of the time." 999 PRINT "" : PRINT "" 1000 PRINT "IF Pi is INPUT to the Altair 8800 as 3.14159265358979323846264338327950288419" 1010 REM PRINT "" 1020 PRINT " The Altair 8800 converts the large number to 3.141592653589794#" 1030 PI = 3.141592653589794# 1040 PRINT " The Altair sees Pi as: "PI 1050 PRINT "" : PRINT "" 2000 PRINT "Pi to 1,000 places = " 2010 PRINT " 3.14159265358979323846264338327950288419716939937510" 2011 PRINT " 58209749445923078164062862089986280348253421170679" 2012 PRINT " 82148086513282306647093844609550582231725359408128" 2013 PRINT " 48111745028410270193852110555964462294895493038196" 2014 PRINT " 44288109756659334461284756482337867831652712019091" 2015 PRINT " 45648566923460348610454326648213393607260249141273" 2016 PRINT " 72458700660631558817488152092096282925409171536436" 2017 PRINT " 78925903600113305305488204665213841469519415116094" 2018 PRINT " 33057270365759591953092186117381932611793105118548" 2019 PRINT " 07446237996274956735188575272489122793818301194912" 2020 PRINT " 98336733624406566430860213949463952247371907021798" 2021 PRINT " 60943702770539217176293176752384674818467669405132" 2022 PRINT " 00056812714526356082778577134275778960917363717872" 2023 PRINT " 14684409012249534301465495853710507922796892589235" 2024 PRINT " 42019956112129021960864034418159813629774771309960" 2025 PRINT " 51870721134999999837297804995105973173281609631859" 2026 PRINT " 50244594553469083026425223082533446850352619311881" 2027 PRINT " 71010003137838752886587533208381420617177669147303" 2028 PRINT " 59825349042875546873115956286388235378759375195778" 2029 PRINT " 18577805321712268066130019278766111959092164201989" 3000 PRINT "" : PRINT "" 3010 REM PRINT " Have a nice day ..." 9999 END