Interval package: Difference between revisions

223 bytes added ,  17 October 2014
notes about overflow and underflow
m (added reference to Kahan)
(notes about overflow and underflow)
Line 27: Line 27:
* Even if the developer would be proficient, most developing environments / technologies limit floating point arithmetic capabilities to a very limited subset of IEEE 754: Only one or two data types, no rounding modes, … [http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf]
* Even if the developer would be proficient, most developing environments / technologies limit floating point arithmetic capabilities to a very limited subset of IEEE 754: Only one or two data types, no rounding modes, … [http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf]
* Results are hardly predictable. [https://hal.archives-ouvertes.fr/hal-00128124/en/] All operations produce the best possible accuracy ''at runtime'', this is how floating-point works. Contrariwise, financial computer systems typically use a [http://en.wikipedia.org/wiki/Fixed-point_arithmetic fixed-point arithmetic] (COBOL, PL/I, …), where overflow and rounding can be precisely predicted ''at compile-time''.
* Results are hardly predictable. [https://hal.archives-ouvertes.fr/hal-00128124/en/] All operations produce the best possible accuracy ''at runtime'', this is how floating-point works. Contrariwise, financial computer systems typically use a [http://en.wikipedia.org/wiki/Fixed-point_arithmetic fixed-point arithmetic] (COBOL, PL/I, …), where overflow and rounding can be precisely predicted ''at compile-time''.
* If you do not know the technical details, cf. first bullet, you ignore the fact that the computer lies to you in many situations. For example, when looking at numerical output and the computer says “<code>ans = 0.1</code>,” this is not absolutely correct. In fact, the value is only ''close enough'' to the value 0.1.
* If you do not know the technical details, cf. first bullet, you ignore the fact that the computer lies to you in many situations. For example, when looking at numerical output and the computer says “<code>ans = 0.1</code>,” this is not absolutely correct. In fact, the value is only ''close enough'' to the value 0.1. Additionally, many functions produce limit values (∞ × −∞ = −∞, ∞ ÷ 0 = ∞, ∞ ÷ −0 = −∞, log (0) = −∞), which is sometimes (but not always!) useful when overflow and underflow occur.


Interval arithmetic addresses above problems in its very special way and introduces new possibilities for algorithms. For example, the [http://en.wikipedia.org/wiki/Interval_arithmetic#Interval_Newton_method interval newton method] is able to find ''all'' zeros of a particular function.
Interval arithmetic addresses above problems in its very special way and introduces new possibilities for algorithms. For example, the [http://en.wikipedia.org/wiki/Interval_arithmetic#Interval_Newton_method interval newton method] is able to find ''all'' zeros of a particular function.
240

edits