Warning: X does not support locale en_US.UTF-8 03-Jul-2023 12:22:05 vpa_test(): MATLAB/Octave version 9.14.0.2206163 (R2023a). vpa() is a variable precision arithmetic facility. agm_pi_test() agm_pi() computes the value of pi using the arithmetic-geometric-mean approach. Request PI to 10, 20, 40, 80 digits. Digits PI: p = 3.141592654 p = 3.1415926535897932385 p = 3.141592653589793238462643383279502884197 p = 3.141592653589793238462643383279502884197169399375105820974944592307816406286209 How long does it take to compute PI to D digits? Digits Seconds 1 2 0.027748 2 4 0.017532 3 8 0.019077 4 16 0.021695 5 32 0.041043 6 64 0.046126 7 128 0.024262 8 256 0.023288 9 512 0.041071 10 1024 0.034745 11 2048 0.039126 12 4096 0.031281 13 8192 0.061025 14 16384 0.041621 15 32768 0.079738 16 65536 0.201457 17 131072 0.513933 18 262144 3.04309 19 524288 4.88268 20 1048576 9.82989 agm_pi_test() Normal end of execution. bbp_pi_test(): bbp_pi() can compute 13 hexadecimal digits at a time in the value of pi using the Bailey-Borwein-Plouffe approach. Usually the first 11 or 12 digits are accurate. Request PI to 10, 20, 40, 80 hexadecimal digits. Digits PI: 0: 9 243F6A8885 0:19 243F6A8885A308D31319 0:29 243F6A8885A308D313198A2E037073 0:39 243F6A8885A308D313198A2E03707344A4093822 Correct hexadecimal representation of pi to 80 hexadecimal digits: 1 2 3 4 5 6 7 8 012345678901234567890123456789012345678901234567890123456789012345678901234567890 3.243F6A8885A308D313198A2E03707344A4093822299F31D0082EFA98EC4E6C89452821E638D01377B How long does it take to compute 13 digits of PI starting at digit D? D Seconds 1 2 0.000257 2 4 7.4e-05 3 8 0.000104 4 16 0.000119 5 32 0.00031 6 64 0.000426 7 128 0.000915 8 256 0.001768 9 512 0.003804 10 1024 0.008197 11 2048 0.016268 12 4096 0.034949 13 8192 0.073385 14 16384 0.159014 15 32768 0.345822 16 65536 0.750196 17 131072 1.62355 18 262144 3.51282 19 524288 7.55563 20 1048576 16.2703 chud_pi_test(): chud_pi() computes the value of pi using the Chudnovsky approach. Request PI to 10, 20, 40, 80 digits. Request 10 digits: p = 3.141592654 Request 20 digits: p = 3.1415926535897932385 Request 40 digits: p = 3.141592653589793238462643383279502884197 Request 80 digits: p = 3.141592653589793238462643383279502884197169399375105820974944592307816406286209 How long does it take to compute PI to D digits? Digits Seconds 1 2 0.025762 2 4 0.016036 3 8 0.016856 4 16 0.04155 5 32 0.054982 6 64 0.075748 7 128 0.150941 8 256 0.251577 9 512 0.586607 10 1024 1.15758 11 2048 4.17309 12 4096 15.6083 13 8192 55.6664 vpa_test():: Normal end of execution. 03-Jul-2023 12:24:15