From 748d7fe47f1e86070f86e180f17637b721fe23e2 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:13:46 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- matlab/2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/2/README.md b/matlab/2/README.md index dc631b8..c531084 100644 --- a/matlab/2/README.md +++ b/matlab/2/README.md @@ -143,5 +143,5 @@ print(x) # -> 2.220446049250313e-16 ``` -One might think that this constitutes an infinite loop. To the contrary, the loop will be left in finite time. The result for double precision is $x \approx 2\times 10^{-16}$ (import sys ; print(sys.float_info.epsilon)). eps is the smallest number with $1+$eps$>1$, and is the \quoting{machine accuracy}. Rounding errors of this order of magnitude occur on a regular basis. For example, Python calculates $\sin{\pi} \approx 1.2246\times 10^{-16}$ (import math ; print(math.sin(math.pi)) # -> 1.2246467991473532e-16). It shall be mentioned hat the machine accuracy for double precision is exactly eps $= 2^{-52}$, since 52 bits (plus one bit for the sign) are used for the mantissa. This rounding error might appear to be small and negligible. However, if further calculations are performed with rounded numbers, the rounding errors can accumulate with each calculation and grow to a significant value. +One might think that this constitutes an infinite loop. To the contrary, the loop will be left in finite time. The result for double precision is $x \approx 2\times 10^{-16}$ (import sys ; print(sys.float_info.epsilon) ). eps is the smallest number with $1+$eps$>1$, and is the \quoting{machine accuracy}. Rounding errors of this order of magnitude occur on a regular basis. For example, Python calculates $\sin{\pi} \approx 1.2246\times 10^{-16}$ (import math ; print(math.sin(math.pi)) ). It shall be mentioned hat the machine accuracy for double precision is exactly eps $= 2^{-52}$, since 52 bits (plus one bit for the sign) are used for the mantissa. This rounding error might appear to be small and negligible. However, if further calculations are performed with rounded numbers, the rounding errors can accumulate with each calculation and grow to a significant value.