Rounding errors in spreadsheets
This spreadsheet shows the effect of rounding errors on repeated small additions. For those who wish to investigate coding, a Python example – showing a program which will loop endlessly because of rounding errors – is also available.
Simple quadratic equation solution as python code
# Warning - this will probably loop forever!
# Change '!=' to '<=' below to see why
f = 2345
while f != 2346: f = f + 0.01
print(f-2346) # may never get here!
The simple spreadsheets and python examples on this page may be copied freely.