|
|
|
|
$ ./a.out Input the values of the number whose square root need be found, and the tolerance limit in the number of digits, of integer variable: tolerance, giving tolerance limit as: 10^{-tolerance} Enter the number, followed by the # tolerance digits. 2 6 Square root of 2= 1.41421 $ ./a.out Input the values of the number whose square root need be found, and the tolerance limit in the number of digits, of integer variable: tolerance, giving tolerance limit as: 10^{-tolerance} Enter the number, followed by the # tolerance digits. 2 10 Square root of 2= 1.414213562 $ ./a.out Input the values of the number whose square root need be found, and the tolerance limit in the number of digits, of integer variable: tolerance, giving tolerance limit as: 10^{-tolerance} Enter the number, followed by the # tolerance digits. 2 20 ^C $ ./a.out Input the values of the number whose square root need be found, and the tolerance limit in the number of digits, of integer variable: tolerance, giving tolerance limit as: 10^{-tolerance} Enter the number, followed by the # tolerance digits. 2 15 Square root of 2= 1.41421356237309 |
|
|
|
|
float: 4 6 double: 8 15 long double: 8 15 3.14159 3.141592653589793 3.141592653589793 3.141592653589793115997963468544185161590576171875 |
|
|
Although long double has a higher precision than double |
|
|
1.4 1.41 1.414 1.4142 1.41421 1.414213 1.4142135 1.41421356 1.414213562 1.4142135623 1.41421356237 1.414213562373 1.4142135623730 1.41421356237309 1.414213562373095 1.4142135623730950 1.41421356237309504 1.414213562373095048 1.4142135623730950488 1.41421356237309504880 1.414213562373095048801 1.4142135623730950488016 1.41421356237309504880168 1.414213562373095048801688 1.4142135623730950488016887 1.41421356237309504880168872 1.414213562373095048801688724 1.4142135623730950488016887242 1.41421356237309504880168872420 1.414213562373095048801688724209 1.4142135623730950488016887242096 1.41421356237309504880168872420969 1.414213562373095048801688724209698 1.4142135623730950488016887242096980 1.41421356237309504880168872420969807 1.414213562373095048801688724209698078 1.4142135623730950488016887242096980785 1.41421356237309504880168872420969807856 1.414213562373095048801688724209698078569 1.4142135623730950488016887242096980785696 1.41421356237309504880168872420969807856967 1.414213562373095048801688724209698078569671 1.4142135623730950488016887242096980785696718 1.41421356237309504880168872420969807856967187 1.414213562373095048801688724209698078569671875 1.4142135623730950488016887242096980785696718753 1.41421356237309504880168872420969807856967187537 1.414213562373095048801688724209698078569671875376 1.4142135623730950488016887242096980785696718753769 1.41421356237309504880168872420969807856967187537694 1.414213562373095048801688724209698078569671875376948 1.4142135623730950488016887242096980785696718753769480 1.41421356237309504880168872420969807856967187537694807 1.414213562373095048801688724209698078569671875376948073 1.4142135623730950488016887242096980785696718753769480731 1.41421356237309504880168872420969807856967187537694807317 1.414213562373095048801688724209698078569671875376948073176 1.4142135623730950488016887242096980785696718753769480731766 1.41421356237309504880168872420969807856967187537694807317667 1.414213562373095048801688724209698078569671875376948073176679 |