![]() |
![]() |
LastUpdate 8/2/2025 |
About 40 years ago , when I first became a teacher and was assigned to a high school , a computer called NEC-PC9801" was introduced. At that time , I thought about individualizing my math classes between students who were quick to understand and those who were slow to understand. I designed lessons in which students who are slow to understand would have to repeat the material until they understand , and students who are quick to understand would be challenged with more difficult problems. As one of the means to achieve this , I aimed to realize CAI (Computer Asisted Instruction). I then started developing the software , using a programming language called "N88-BASIC" that came standerded with "NEC-PC9801". As the field for developing CAI software , I chose "parallel translation of quadratic function" because I placed importance on the fact that it allows me to make the most effective use of the graphics functions of computers. The grammar of "UBASIC" programs is almost the same as that of "N88-BASIC". If you have experience with programming language "BASIC", you can easily handle "UBASIC". So , why "UBASIC" ? "UBASIC" can easily handle integers with a large number of digits and decimals with many digits after the decimal point It can easily display integers with large numbers of digits , such as 2 to the power of 1000 , decimals with many digits after the decimal point , such as approximations of pi or e , the base of the natural logarithm. Integers can be up to 2700 digits , and decimals can be up to 2596 digits after the decimal point. UBASIC is free software developed by Kida Yuji. I would like to express my gratitude to Mr. Kida Yuji. |
No | Table of contents |
1 | Consider how to use "UBASIC" |
2 | Download "UBASIC" |
3 | Execution of "UBASIC" |
4 | Download Sample programs |
【1】 Approximation of the base of natural logarithm e by expansion |
@ The expansion formula for the base of natural logarithm e , was used and the calculations were performed on a notebook computer (NEC LL750/R) using UBASIC programming. A Expansion of the base of natural logarithm e. ![]() 10 'save"enokei1" 20 cls 30 S=0 40 for N=1 to 1000 50 T=1 60 for J=1 to N 70 T=T*(1/J) 80 next J 90 S=S+T 100 locate 0,0 110 print "Expansion of e e = 1 + 1/1! + 1/2! + 1/3! + ・・・" 120 print "Current number of terms =";N+1 130 print "Calculated value by expansion =";S+1 140 print "The base of the natural logarithm e =";#e 150 next N 160 end C How to get more decimal places By specifying the number of points , you can instantly find the correct approximation of e. For example , to specify a point number of 100 , enter "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 479 decimal places. With the point number of 270 , the answer can be calculated up to 1297 decimal places. D Calculation results(a point number of 270) 2. 7182818284 5904523536 0287471352 6624977572 4709369995 9574966967 6277240766 3035354759 4571382178 5251664274 2746639193 2003059921 8174135966 2904357290 0334295260 5956307381 3232862794 3490763233 8298807531 9525101901 1573834187 9307021540 8914993488 4167509244 7614606680 8226480016 8477411853 7423454424 3710753907 7744992069 5517027618 3860626133 1384583000 7520449338 2656029760 6737113200 7093287091 2744374704 7230696977 2093101416 9283681902 5515108657 4637721112 5238978442 5056953696 7707854499 6996794686 4454905987 9316368892 3009879312 7736178215 4249992295 7635148220 8269895193 6680331825 2886939849 6465105820 9392398294 8879332036 2509443117 3012381970 6841614039 7019837679 3206832823 7646480429 5311802328 7825098194 5581530175 6717361332 0698112509 9618188159 3041690351 5988885193 4580727386 6738589422 8792284998 9208680582 5749279610 4841984443 6346324496 8487560233 6248270419 7862320900 2160990235 3043699418 4914631409 3431738143 6405462531 5209618369 0888707016 7683964243 7814059271 4563549061 3031072085 1038375051 0115747704 1718986106 8739696552 1267154688 9570350354 0212340784 9819334321 0681701210 0562788023 5193033224 7450158539 0473041995 7777093503 6604169973 2972508868 7696640355 5707162268 4471625607 9882651787 1341951246 6520103059 2123667719 4325278675 3985589448 9697096409 7545918569 5638023637 0162112047 7427228364 8961342251 6445078182 4423529486 3637214174 0238893441 2479635 E Program filename ENOKEI1.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print = print + "filename" wirhout a line number , then press Enter. By doing so , any output results that cannot be displayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【2】 Approximation of the base of natural logarithm e by definition |
@ Using the definition of the base of natural logarithm e , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). A Definition of the base of natural logarithm e ![]() 10 'save"enokei2" 20 cls 30 N=1 40 locate 0,0 50 print "Definition of e lim N→∞ (1+1/N)^N" 60 print "Current number of terms N =":N 70 print "Calculated value by definition =";(1+1/N)^N 80 print "The base of natural logarithm e =";#e 90 N=N+1 100 goto 40 110 end C It is difficult to display the correct value after 5 decimal places. D Calculation results Current number of terms N = 101613 Calculated value by definition = 2.7182684527883143728 The base of natural logarithm e = 2.7182818284590452353 E Program filename ENOKEI2.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【3】 Approximation of pi by Wallis's formula |
@ Using Wallis's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Wallis (1616-1703) A Wallis's formula ![]() 10 'save"wourisu" 20 cls 30 T=1 40 for N=1 to 1000000 50 T=T*((2*N*2*N)/((2*N-1)*(2*N+1))) 60 locate 0,0 70 print "Wallis's formula" 80 print "Current number of terms N =";N*2 90 print "Calculated value by formula =";T*2 100 print "pi π =";#pi 110 next N 120 end C It is difficult to display the correct value after five decimal places. D Calculation results Current number of terms N = 218436 Calculated value by formula = 3.141585462525402376 pi π = 3.1415926535897932384 E Program filename WOURISU.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【4】 Approximation of pi by Euler's formula 1 |
@ Using Euler's formula 1, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Euler (1707-1783) A Euler's formula 1 ![]() 10 'save"oira1" 20 cls 30 S=0 40 for N=1 to 1000000 50 S=S+((-1)^(N+1))/N^2 60 locate 0,0 70 print "Euler's formula 1" 80 print "Current number of terms N =";N 90 print "Calculated value by formula =";sqrt(S*12) 100 print "pi π =";#pi 110 next N 120 end C It is difficult to display the correct value after ten decimal places. D Calculation results Current number of terms N = 110759 Calculated value by formula = 3.1415926536676344207 pi π = 3.1415926535897932384 E Program filename OIRA1.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【5】 Approximation of pi by Euler's formula 2 |
@ Using Euler's formula 2, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Euler (1707-1783) A Euler's formula 2 ![]() B Program list 10 'save"oira2" 20 cls 30 S=0 40 for N=1 to 1000 50 S=S+((-1)^(N+1))/((2*N-1)*2^(2*N-1))+((-1)^(N+1))/((2*N-1)*3^(2*N-1)) 60 locate 0,0 70 print "Euler's formula 2" 80 print "Current number of terms N =";N 90 print "Calculated value by formula =";S*4 100 print "pi π =";#pi 110 next N 120 end ※With N=10 , you can instantly find the correct approximation of pi up to 6 decimal places. C How to get more decimal places By specifying the number of points , you can instantlly find the correct approximation of pi. For example , to specify a point number of 100 , enter "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 479 decimal places. With the point number of 270 , the answer can be calculated up to 1206 decimal places. D Calculation results(a pont number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 858361 E Program filename OIRA2.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【6】 Approximation of pi by Gregory・Leibniz's formula |
@ Using Gregory・Leibniz's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Gregory (1638-1675) Leibniz (1646-1716) A Gregory・Leibniz's formula ![]() 10 'save"gurerai" 20 cls 30 S=0 40 for N=1 to 1000000 50 S=S+((-1)^(N+1))/(2*N-1) 60 locate 0,0 70 print "Gregory・Leibniz's formula" 80 print "Current number of terms N =";N 90 print "Calculated value by formula =";S*4 100 print "pi π =";#pi 110 next N 120 end C It is difficult to display the correct value after 5 decimal places. D Calculation results Current number of terms N = 177431 Calculated value by formula = 3.1415870175643183942 pi π = 3.1415926535897932384 E Program filename GURERAI.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【7】 Approximation of pi by Machin's formula 2 |
@ Using Machin's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Machin (1685-1751) A Machin's formula 2 ![]() ![]() B Program list 10 'save"machin2" 20 cls 30 S=0 40 T=0 50 for N=1 to 500 60 S=S+((-1)^(N+1))/((2*N-1)*5^(2*N-1)) 70 T=T+((-1)^(N+1))/((2*N-1)*239^(2*N-1)) 80 locate 0,0 90 print "Machin's formula 2" 100 print "Current number of terms N =";N 110 print "Calculated value by formula=";16*S-4*T 120 print "pi π =";#pi 130 next N 140 end ※With N=10 , you can instantly find the correct approximation of pi up to 14 decimal places. C How to get more decimal places By specifying the number of points , you can instantlly find the correct approximation of pi. For example , to specify a point number of 100 , type "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 479 decimal places. With the point number of 270 , the answer can be calculated up to 700 decimal places. D Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 E Program filename MACHIN2.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【8】 Approximation of pi by Matsunaga Yoshisuke's formula 1 |
@ Using Matsunaga Yoshisuke's formula 1 , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Matsunaga Yoshisuke(?-1747) A Matsunaga Yoshisuke's formula 1 ![]() B Program list 10 'save"matsuna1" 20 cls 30 S=0 40 for N=1 to 5000 50 T=1 60 for M=1 to N 70 T=T*(M^2)/((2*M+1)*(2*M+2)) 80 next M 90 S=S+T 100 locate 0,0 110 print "Matsunaga Yoshisuke's formula 1" 120 print "Current number of terms N =";N 130 print "Calculated value by formula =";sqrt(9*(1+S)) 140 print "pi π =";#pi 150 next N 160 end ※With N=10 , you can instantly find the correct approximation of pi up to 7 decimal places. C How to get more decimal places By specifying the number of points , you can instantly find the correct approximation of pi. For example , to specify a point number of 100 , type "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 478 decimal places. With the point number of 260 , the answer can be calculated up to 1248 decimal places. D Calculation results(A point number of 260) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 46767837 E Program filename MATSUNA1.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【9】 Approximation of pi by Matsunaga Yoshisuke's formula 2 |
@ Using Matsunaga Yoshisuke's formula 2 , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Matsunaga Yoshisuke(?-1747) A Matsunaga Yoshisuke's formula 2 ![]() B Program list 10 'save"matsuna2" 20 cls 30 S=0 40 for N=1 to 5000 50 T=1 60 for M=1 to N 70 T=T*((2*M-1)^2)/((4*M)*(4*M+2)) 80 next M 90 S=S+T 100 locate 0,0 110 print "Matsunaga Yoshisuke's formula 2" 120 print "Current number of terms N =";N 130 print "Calculated value by formula =";(1+S)*3 140 print "pi π =";#pi 150 next N 160 end ※With N=10 , you can instantly find the correct approximation of pi up to 7 decimal places. C How to get more decimal places By specifying the number of points , you can instantly find the correct approximation of pi. For example , to specify a point number of 100 , type "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 477 decimal places. With the point number of 260 , the answer can be calculated up to 1248 decimal places. D Calculation results(A point number of 260) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 46767837 E Progran filename MATSUNA2.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【10】 Approximation of pi by Newton's formula |
@ Using Newton's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Newton (1642-1727) A Newton's formula ![]() B Program List 10 'save"newton" 20 cls 30 S=0 40 for N=1 to 3000 50 T=1 60 for J=1 to N 70 T=T*(2*J-1)/(2*J) 80 next J 90 T=T*1/((2*N+1)*2^(2*N+1)) 100 S=S+T 110 locate 0,0 120 print "Newton's formula" 130 print "Current number of terms N =";N 140 print "Calculated value by formula =";6*(1/2+S) 150 print "pi π =";#pi 160 next N 170 end ※With N=10 , you can instantly find the correct approximation of pi up to 7 decimal places. C How to get more decimal places By specifying the number of points , you can instantly find the correct approximation of pi. For example , to specify a point number of 100 , type "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 477 decimal places. With the point number of 260 , the answer can be calculated up to 1248 decimal places. D Calculation results(A point number of 260) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 46767837 E Program filename NEWTON.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【11】 Approximation of pi by Sharpe's formula |
@ Using Sharpe's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Sharpe (1705) A Sharpe's formula ![]() B Program list 10 'save"sharp" 20 cls 30 S=0 40 for N=1 to 5000 50 S=S+(-1)^N/((2*N+1)*3^N) 60 locate 0,0 70 print "Sharpe's formula" 80 print "Current number of terms N=";N 90 print "Calculated value by formula =";2*sqrt(3)*(1+S) 100 print "pi π=";#pi 110 next N 120 end ※With N=10 , you can instantly find the correct approximation of pi up to 5 decimal places. C How to get more decimal places By specifying the number of points , you can instantly find the correct approximation of pi. For example , to specify a point number of 100 , type "point 100" without a line number and then press Enter. With the point number of 100 , the answer can be calculated up to 479 decimal places. With the point number of 260 , the answer can be calculated up to 1250 decimal places. D Calculation results(A point number of 260) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 E Program filename SHARP.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【12】 Approximation of pi by Businger's formula |
@ Using Businger's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Busenger's formua ![]() 10 'save"buzeinga" 20 cls 30 point 270 40 A=8*atan(1/10)-4*atan(1/515)-atan(1/239) 50 print "Busenger's formula" 60 print "Calculated value =";A*4 70 end C Calculation results (a point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename BUZEINGA.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【13】 Approximation of pi by Daze's formula |
@ Using Daze's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Daze (1804-1861) ※With point number of 270 , the correct approximation of pi was found to 1298 decimal places. A Daze's formula ![]() 10 'save"dase" 20 cls 30 point 270 40 A=atan(1/2)+atan(1/5)+atan(1/8) 50 print "Daze's formula" 60 print "Calculated value by formula =" A*4 70 end C Calculation result (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 25906949 D Program filename DASE.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【14】 Approximation of pi by Euler・Vega's formula |
@ Using Euler・Vega's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Euler (1707-1783) Vega (1754-1802) ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Euler・Vega's formula ![]() 10 'save"eulerveg" 20 cls 30 point 270 40 A=5*atan(1/7)+2*atan(3/79) 50 print "Euler・Vega's formula" 60 print "Calculated value by formula ="; A*4 70 end C Calculation results(a point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename EULERVEG.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【15】 Approximation of pi by Gauss's formula 1 |
@ Using Gauss's formula 1, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R) Gauss (1777-1855) ※With point number of 270 , the correct approximation of pi was found to 1296 decimal places. A Gauss's formula 1 ![]() 10 'save"gauss1" 20 cls 30 point 270 40 A=12*atan(1/18)+8*atan(1/57)-5*atan(1/239) 50 print "Gauss's formula 1" 60 print "Calculated value by formula ="; A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 259069 D Program filename GAUSS1.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【16】 Approximation of pi by Gauss's formula 2 |
@ Using Gauss's formula 2, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Gauss (1777-1855) ※With point number of 270 , the correct approximation of pi was found to 1298 decimal places. A Gauss's formula 2 ![]() 10 'save"gauss2" 20 cls 30 point 270 40 A=3*atan(1/4)+atan(1/20)+atan(1/1985) 50 print "Gauss's formula 2" 60 print "Calculated value by formula =";A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 25906949 D Program filename GAUSS2.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【17】 Approximation of pi by Clausen's formula |
@ Using Clausen's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Clausen(1847) ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Clausen's formula ![]() 10 'save"kurauzen" 20 cls 30 point 270 40 A=2*atan(1/3)+atan(1/7) 50 print "Clausen's formula" 60 print "Calculated value by formula ="; A*4 70 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename KURAUZEN.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【18】 Approximation of pi by Machin's formula 1 |
@ Using Machin's formula 1 , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Machin (1685-1751) ※With point number of 270 , the correct approximation of pi was found to 1298 decimal places. A Machin's formula 1 ![]() 10 'save"machin1" 20 cls 30 point 270 40 A=4*atan(1/5)-atan(1/239) 50 print "Machin's formula 1" 60 print "Calculated value by formula ="; A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 25906949 D Program filename MACHIN1.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【19】 Approximation of pi by Rutherford's formula |
@ Using Rutherford's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Rutherford (1798-1871) ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Rutherford's formula ![]() 10 'save"razaford" 20 cls 30 point 270 40 A=4*atan(1/5)-atan(1/70)+atan(1/99) 50 print "Rutherford's formula" 60 print "Calculated value by formula =";A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename RAZAFORD.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【20】 Approximation of pi by Stelmer's formula |
@ Using Stelmer's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 1298 decimal places. A Stelmer's formula ![]() 10 'save"suteruma" 20 cls 30 point 270 40 A=6*atan(1/8)+2*atan(1/57)+atan(1/239) 50 print "Stelmer's formula" 60 print "Calculated value by formula=";A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 25906949 D Program filename SUTERUMA.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【21】 Approximation of pi by Shanks' formula |
@ Using Shanks' formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Shanks (1853) ※With point number of 270 , the correct approximation of pi was found to 1298 decimal places. A Shanks' formula ![]() 10 'save"syankusu" 20 cls 30 point 270 40 A=6*atan(1/8)+2*atan(1/57)+atan(1/239) 50 print "Shanks' formula" 60 print "Calculated value by formula=";A*4 70 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 25906949 D Program filename SYANKUSU.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【22】 Approximation of pi by Schultz's formula |
@ Using Schultz's formula , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Schultz (1844) ※With point number of 270 , the correct approximation of pi was found to 1298 decimal places. A Schultz's formula ![]() 10 'save"syurutsu" 20 cls 30 point 270 40 A=atan(1/2)+atan(1/5)+atan(1/8) 50 print "Schultz's formula" 60 print "Calculated value by formula =";A*4 70 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 25906949 D Program filename SYURUTSU.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【23】 Approximation of pi by Vega's formula 1 |
@ Using Vega's formula 1, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Vega (1754-1802) ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Vega's formula 1 ![]() 10 'save"vega1" 20 cls 30 point 270 40 A=4*atan(1/5)-2*atan(1/408)+atan(1/1393) 50 print "Vega's formula 1" 60 print "Calculated value by formula =";A*4 70 end C Calculation result (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename VEGA1.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【24】 Approximation of pi by Vega's formula 2 |
@ Using Vega's formula 2, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Vega (1754-1802) ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Vega's formula 2 ![]() 10 'save"vega2" 20 cls 30 point 270 40 A=5*atan(1/7)+2*atan(3/79) 50 print "Vega's formula 2" 60 print "Calculated value by formula=";A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename VEGA2.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【25】 Approximation of pi by Vega's formula 3 |
@ Using Vega's formula 3, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Vega (1754-1802) ※With point number of 270 , the correct approximation of pi was found to 1299 decimal places. A Vega's formula 3 ![]() 10 'save"vega3" 20 cls 30 point 270 40 A=2*atan(1/2)-atan(1/7) 50 print "Vega's formula 3" 60 print "Calculated value by formula =";A*4 70 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 259069491 D Program filename VEGA3.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【26】 Approximation of pi by Vega's formula 4 |
@ Using Vega's formula 4, the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). Vega (1754-1802) ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Vega's formula 4 ![]() 10 'save"vega4" 20 cls 30 point 270 40 A=2*atan(1/3)+atan(1/7) 50 print "Vega's formula 4" 60 print "Calculated value by formula =";A*4 70 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename VEGA4.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【27】 Approximation of pi by other expansion 1 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 2 decimal places. A Expansion 1 ![]() 10 'save"tenkai1" 20 cls 30 locate 0,0 40 P=sqrt(5^2+(3/4)^2)-17/4 50 print"Calculated value by expansion =";6*P^3 60 print"pi π =";#pi 70 end C Calculation results Calculated value by expansion = 3.1409042827433688985 pi π = 3.1415926535897932384 D Program filename TENKAI1.UB |
【28】 Approximation of pi by other expansion 2 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 6 decimal places. A Expansion 2 ![]() 10 'save"tenkai2" 20 cls 30 locate 0,0 40 print"Calculated value by expansion =";3+1/7-1/700+1/(700*9)+1/(700*9*30) 50 print"pi π=";#pi 60 end C Calculation results Calculated value by expansion = 3.1415925925925925925 pi π = 3.1415926535897932384 D Program filename TENKAI2.UB |
【29】 Approximation of pi by other expansion 3 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 6 decimal places. A Expansion 3 ![]() 10 'save"tenkai3" 20 cls 30 locate 0,0 40 T=(2+1/4+1/100)*(1/7-1/(10*7^2)+1/(10^2*7^3)-1/(10^3*7^4)+1/(10^4*7^5) 50 print"Calculated value by expansion =";1/T 60 print"pi π =";#pi 70 end C Calculation results Calculated value by expansion = 3.1415929184847653563 pi π = 3.1415926535897932384 D Program filename TENKAI3.UB |
【30】 Approximation of pi by other expansion 4 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 8 decimal places. A Expansion 4 ![]() 10 'save"tenkai4" 20 cls 30 P=22*atan(1/28)+atan(1/56544) 40 locate 0,0 50 print"Calculated value by expansion =";4*P 60 print"pi π=";#pi 70 end C Calculation results Calculated value by expansion = 3.141592657150054845 pi π = 3.1415926535897932384 D Program filename TENKAI4.UB |
【31】 Approximation of pi by other expansion 5 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 700 decimal places. A Expansion 5 ![]() ![]() 10 'save"tenkai5" 20 cls 30 S1=0 40 for I=1 to 1000 50 T1=1 60 for J=1 to I 70 T1=T1*(2*J)/(2*J+1) 80 next J 90 T1=T1*(2/10)^I 100 S1=S1+T1 110 next I 120 S2=0 130 for M=1 to 1000 140 T2=1 150 for N=1 to M 160 T2=T2*(2*N)/(2*N+1) 170 next N 180 T2=T2*(1/10)^M 190 S2=S2+T2 200 next M 210 P=(4/10)*(1+S1)+(3/10)*(1+S2) 220 locate 0,0 230 print"Calculated value by expansion =";4*P 240 print"pi π =";#pi 250 end C Calculation results (A point numpber of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 D Program filename TENKAI5.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【32】 Approximation of pi by other expansion 6 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 1001 decimal places. A Expansion 6 ![]() ![]() 10 ' save "tenkai6" 20 cls 30 S1=0 40 for I=1 to 1000 50 T1=1 60 for J=1 to I 70 T1=T1*(2*J)/(2*J+1) 80 next J 90 T1=T1*(1/10)^I 100 S1=S1+T1 110 next I 120 S2=0 130 for M=1 to 1000 140 T2=1 150 for N=1 to M 160 T2=T2*(2*N)/(2*N+1) 170 next N 180 T2=T2*(2/100)^M 190 S2=S2+T2 200 next M 210 P=(6/10)*(1+S1)+(7/50)*(1+S2) 220 locate 0,0 230 print "Calculated value by expansion =";4*P 240 print "pi π =";#pi 250 end C Calculation results(A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3 D Program filename TENKAI6.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【33】 Approximation of pi by other expansion 7 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 702 decimal places. A Expansion 7 ![]() ![]() 10 ' save "tenkai7" 20 cls 30 S1=0 40 for M=1 to 500 50 S1=S1+((-1)^M*4^M)/((2*M+1)*100^M) 60 next M 70 S2=0 80 for N=1 to 500 90 S2=S2+((-1)^N)/((2*N+1)*57121^N) 100 next N 110 P=(4/5)*(1+S1)-(1/239)*(1+S2) 120 print "Calculated value by expansion =";P*4 130 print "pi π =";#pi 140 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 42 D Program filename TENKAI7.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【34】 Approximation of pi by other expansion 8 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 1297 decimal places. A Expansion 8 ![]() ![]() 10 ' save "tenkai8" 20 cls 30 S1=0 40 for I=1 to 1000 50 T1=1 60 for J=1 to I 70 T1=T1*(2*J)/(2*J+1) 80 next J 90 T1=T1*(2/100)^I 100 S1=S1+T1 110 next I 120 S2=0 130 for M=1 to 1000 140 T2=1 150 for N=1 to M 160 T2=T2*(2*N)/(2*N+1) 170 next N 180 T2=T2*(144/100000)^M 190 S2=S2+T2 200 next M 210 P=(7/10)*(1+S1)+(7584/100000)*(1+S2) 220 locate 0,0 230 print "Calculated value by expansion =";4*P 240 print "pi π =";#pi 250 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 2590694 D Program filename TENKAI8.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【35】 Approximation of pi by other expansion 9 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct value of pi after thr 5th decimal place is not displayed easily. A Expansion 9 ![]() 10 ' save "tenkai9" 20 cls 30 S=0 40 for N=1 to 1000000 50 locate 0,0 60 print "N=";N 70 S=S+(N^2)/((4*N-3)*(4*N-1)*(4*N+1)*(4*N+3)) 80 print "Calculated value by expansion =";S*256 90 print "pi π =";#pi 100 next N 110 end C Calculation results N = 101243 Calculated value by expansion = 3.1415827764117942727 pi π = 3.1415926535897932384 D Program filename TENKAI9.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【36】 Approximation of pi by other expansion 10 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). ※With point number of 270 , the correct approximation of pi was found to 1296 decimal places. A Expansion 10 ![]() 10 ' save "tenkai10" 20 cls 30 S1=0 40 for I=1 to 5000 50 T1=1 60 for J=1 to I 70 T1=T1*(2*J-1)/(2*J) 80 next J 90 T1=T1*(1/(2*I+1))*(1/4)^I 100 S1=S1+T1 110 locate 0,0 120 print "I=";I 130 next I 140 P=1+S1 150 locate 0,0 160 print "Calculated value by expansion =";P*4 170 print "pi π =";#pi 180 end C Calculation results (A point number of 270) 3. 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 5058223172 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 4428810975 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 4543266482 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 9171536436 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 5759591953 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 8912279381 8301194912 9833673362 4406566430 8602139494 6395224737 1907021798 6094370277 0539217176 2931767523 8467481846 7669405132 0005681271 4526356082 7785771342 7577896091 7363717872 1468440901 2249534301 4654958537 1050792279 6892589235 4201995611 2129021960 8640344181 5981362977 4771309960 5187072113 4999999837 2978049951 0597317328 1609631859 5024459455 3469083026 4252230825 3344685035 2619311881 7101000313 7838752886 5875332083 8142061717 7669147303 5982534904 2875546873 1159562863 8823537875 9375195778 1857780532 1712268066 1300192787 6611195909 2164201989 3809525720 1065485863 2788659361 5338182796 8230301952 0353018529 6899577362 2599413891 2497217752 8347913151 5574857242 4541506959 5082953311 6861727855 8890750983 8175463746 4939319255 0604009277 0167113900 9848824012 8583616035 6370766010 4710181942 9555961989 4676783744 9448255379 7747268471 0404753464 6208046684 259069 D Program filename TENKAI10.UB 《Remarks》 What to do when the displayed numbers don't fit on the screen. Type print=print + "filename" without a line number and then press Enter. By doing so , any output results that cannot be dtsplayed on the screen will be saved in a file with the filename you entered. Open the file in a text editor and take a look. |
【37】 Approximation of pi by other expansion 11 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct value of pi after thr 13th decimal place is not displayed easily. A Expansion 11 ![]() 10 ' save "tenkai11" 20 cls 30 S=0 40 for N=1 to 1000000 50 S=S+(N+1)/((2*N-1)^2*(2*N+1)^2) 60 P=S+3/8 70 locate 0,0 80 print "N=";N 90 locate 0,1 100 print "Calculated value by expansion =";4*sqrt(P) 110 print "pi π =";#pi 120 next N 130 end C Calculation results N = 378767 Calculated value by expansion = 3.1415926535892124212 pi π = 3.1415926535897932384 D Program filename TENKAI11.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【38】 Approximation of pi by other expansion 12 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct value of pi after thr 6th decimal place is not displayed easily. A Expansion 12 ![]() 10 ' save "tenkai12" 20 cls 30 S=0 40 for N=1 to 1000000 50 if (N@4)=1 or (N@4)=2 then S=S+1/((2*N-1) else S=S-1/(2*N-1) 60 locate 0,0 70 print "N=";N 80 print "Calculated value by expansion =";S*2*sqrt(2) 90 print "pi π =";#pi 100 next N 110 end C Calculation results N = 446418 Calculated value by expansion = 3.1415958215031891565 pi π = 3.1415926535897932384 D Program filename TENKAI12.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【39】 Approximation of pi by other expansion 13 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 13 decimal places. A Expansion 13 ![]() 10 ' save "tenkai13" 20 cls 30 S=0 40 for N=1 to 100000 step 2 50 S=S+1/((2*N-1)*(2*N+1)*(2*N+3)*(2*N+5)) 60 P=S+1/18 70 locate 0,0 80 print "N=";N 90 print "Calculated value by expansion =";P*48 100 print "pi π =";#pi 110 next N 120 end C Calculation results N = 39373 Calculated value by expansion = 3.1415926535897585646 pi π = 3.1415926535897932384 D Program filename TENKAI13.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【40】 Approximation of pi by other expansion 14 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 15 decimal places. A Expansion 14 ![]() 10 ' save "tenkai14" 20 cls 30 S=0 40 K=-1 50 for N=1 to 100000 step 2 60 if K=1 then K=-1 else K=1 70 S=S+K/((2*N-1)*(2*N+1)*(2*N+3)*(2*N+5)) 80 P=1/18-S 90 locate 0,0 100 print "N=";N 110 print "Calculated value by expansion =";P*sqrt(2)*48 120 print "pi π =";#pi 130 next N 140 end C Calculation results N = 41329 Calculated value by expansion = 3.1415926535897931905 pi π = 3.1415926535897932384 D Program filename TENKAI14.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【41】 Approximation of pi by other expansion 15 |
@ Using the following expansion of pi , the calculations were performed using UBASIC and a notebook computer (NEC LL750/R). The correct approximation of pi was calculated up to 12 decimal places. A Expansion 15 ![]() 10 ' save "tenkai15" 20 cls 30 S=0 40 for N=1 to 100000 step 4 50 S=S+1/((2*N-1)*(2*N+1)*(2*N+3)*(2*N+5)) 60 P=S 70 locate 0,0 80 print "N=";N 90 print "Calculated value by expansion =";P*96*(2+sqrt(2)) 100 print "pi π =";#pi 110 next N 120 end C Calculation results N = 39289 Calculated value by expansion = 3.1415926535896749692 pi π = 3.1415926535897932384 D Program filename TENKAI15.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
【42】 Approximation of the Golden Ratio |
@ The following golden ratio values were programmed in UBASIC and calculated on a notebook computer (NEC LL750/R). With point number of 269 , the approximation of the golden ratio was calculated up to 1295 decimal places. A The Golden Ratio ![]() 10 ' save "ougonhi" 20 cls 30 point 269 40 locate 0,0 50 print "The Golden Ratio =";(1+sqrt(5))/2 60 end C Calculation results (A point number of 269) 1. 6180339887 4989484820 4586834365 6381177203 0917980576 2862135448 6227052604 6281890244 9707207204 1893911374 8475408807 5386891752 1266338622 2353693179 3180060766 7263544333 8908659593 9582905638 3226613199 2829026788 0675208766 8925017116 9620703222 1043216269 5486262963 1361443814 9758701220 3408058879 5445474924 6185695364 8644492410 4432077134 4947049565 8467885098 7433944221 2544877066 4780915884 6074998871 2400765217 0575179788 3416625624 9407589069 7040002812 1042762177 1117778053 1531714101 1704666599 1466979873 1761356006 7087480710 1317952368 9427521948 4353056783 0022878569 9782977834 7845878228 9110976250 0302696156 1700250464 3382437764 8610283831 2683303724 2926752631 1653392473 1671112115 8818638513 3162038400 5222165791 2866752946 5490681131 7159934323 5973494985 0904094762 1322298101 7261070596 1164562990 9816290555 2085247903 5240602017 2799747175 3427775927 7862561943 2082750513 1218156285 5122248093 9471234145 1702237358 0577278616 0086883829 5230459264 7878017889 9219902707 7690389532 1968198615 1437803149 9741106926 0886742962 2675756052 3172777520 3536139362 1076738937 6455606060 5921658946 6759551900 4005559089 5022953094 2312482355 2122124154 4400647034 0565734797 6639723949 4994658457 8873039623 0903750339 9385621024 2369025138 6804145779 9569812244 5747178034 1731264532 2041639723 2134044449 4873023154 1767689375 2103068737 8803441700 9395440962 7955898678 7232095124 26893 D Program filename OUGONHI.UB 《Remarks》 Pressing the [Ctrl] and [C] keys simultaneously will interrupt the execution of the program. |
Programming Language"UBASIC" | Programming Language"UBASIC" |
Clicking on the Programming Language "UBASIC" above will open
the UBASIC download site.(If the site doesn't open , search for "UBASIC"
to find a site where you can download it.) From the excutable files on the site , select the one you want to download , "UBASIC" , and click on it. |
Double-click the executable file "〜.EXE" in the folder created in the "Download UBASIC" section to launch "UBASIC". However , UBASIC can only run on 32-bit operating systems , not on 64-bit operating systems. Operation has confirmed on Windows 7 (32-bit) and Windows Vista (32-bit). |
You can download UBASIC programs introduced on this site that calculate
approximate values for the base of natural logarithms , e and pi. By clicking on the "sample program download " below , you can save compressed file "ubsample.lzh" in LZH format on the desktop or other location of your computer." When this compressed file "ubsample.lzh" is decompressed , a folder is created and the 42 UBASIC sample programs "〜.UB" in the folder are copied to the folder containing the "UBASIC" excutable file "〜.EXE" for use. |
Sample program download | Sample program download |