Numerical Errors

home1 home2
and the


Floating point arithmetic is only carried out to a finite accuracy by computer hardware. This means that there is

  1. a limited number of significant digits (about 6 decimal digits for 32-bit floats, more, perhaps 16 digits, for 64-bits etc.)
  2. a maximum floating point number
  3. a minimum +ve floating point number >0

1.0 = 1.0 - δ

Because of the finite accuracy, there is a floating point number, δ > 0.0, such that 1.0 - δ equals 1.0 as far as the computer hardware can tell.

Click on `go' in the form below to see what δ is for the implementation of JavaScript on your computer:

δ is quite small, but it is certainly greater than zero.


Mathematically, the following two equations are equal:

 big - (big'  - δ)           -- 1
(big -  big') + δ            -- 2
However, if big~big' then then equation #1 may loose accuracy. Consider the extreme case in which big=big'=1.0. Then equation #1 will evalute to zero, but equation #2 will evaluate to δ, not zero!
-- L.A., 1999

Coding Ockham's Razor, L. Allison, Springer

A Practical Introduction to Denotational Semantics, L. Allison, CUP

free op. sys.
free office suite
~ free photoshop
web browser

© L. Allison   (or as otherwise indicated),
Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University,
was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.)
Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Thursday, 02-Feb-2023 05:59:25 AEDT.