Carson Witt
How many decimals of e would you like to approximate?
NOTE: The code will approximate to the 20 digits you requested, but it will show 21 digits to prevent rounding errors.
-----------------------------------------------------------------------
Estimated value of e: 2.71828182845904523536
-----------------------------------------------------------------------
Actual value of e: 2.71828182845904523536
-----------------------------------------------------------------------
Difference: 0.00
-----------------------------------------------------------------------
How many decimals of sqrt(2) would you like to approximate?
NOTE: The code will approximate to the 20 digits you requested, but it will show 21 digits to prevent rounding errors.
-----------------------------------------------------------------------
Estimated value of 2: 1.41421356237309504880
-----------------------------------------------------------------------
Actual value of 2: 1.41421356237309504880
-----------------------------------------------------------------------
Difference: 0.00
-----------------------------------------------------------------------
How many decimals of pi would you like to approximate?
NOTE: The code will approximate to the 20 digits you requested, but it will show 21 digits to prevent rounding errors.
-----------------------------------------------------------------------
Estimated value of pi: 3.14159265358979323846
-----------------------------------------------------------------------
Actual value of pi: 3.14159265358979323846
-----------------------------------------------------------------------
Difference: 0.00
-----------------------------------------------------------------------