Floating-point numbers: a visit through the looking glass
Researchers do not adequately appreciate that floating-point numbers are a simulation of real numbers and, as with all simulations, some features are preserved while others are not. When writing code, or even do-files, treating the computer's floating-point numbers as if they were real numbers can lead to substantive problems and to numerical inaccuracy. In this, the relationship between computers and real numbers is not entirely unlike the relationship between tea and Douglas Adams' Nutri-Matic drink dispenser. The Nutri-Matic produces a concoction that is "almost, but not quite, entirely unlike tea." Gould shows what the universe would be like if it was implemented in floating-point rather than in real numbers. The floating-point universe turns out to be nothing like the real universe and probably could not be made to function. Without jargon and without resort to binary, Gould shows how floating-point numbers are implemented on an imaginary base-10 computer and quantifies the kinds of errors that can arise. In this, floating-point subtraction stands out as really being almost, but not quite, entirely unlike subtraction. Gould shows out how to work around such problems. The point of the talk is to build your intuition about the floating-point world so that you as a researcher can predict when calculations might go awry, know how to think about the problem, and determine how to fix it.
Year of publication: |
2014-08-02
|
---|---|
Authors: | Gould, William |
Institutions: | Stata User Group |
Saved in:
freely available
Saved in favorites
Similar items by person
-
Floating-point numbers: A visit to the looking glass world
Gould, William, (2014)
-
Mata — matrix programming language
Gould, William, (2005)
-
Gould, William, (2011)
- More ...