Interval package: Difference between revisions

m
→‎What to expect: Updated benchmark after implementing fast matrix multiplication
m (→‎What to expect: Updated benchmark after implementing fast matrix multiplication)
Line 54: Line 54:


{| class="wikitable" style="margin: auto; align:right"
{| class="wikitable" style="margin: auto; align:right"
|+ Approximate runtime (wall clock time in seconds) on an<br/>Intel® Core™ i5-4340M CPU (2.9–3.6 GHz)
|+ Approximate runtime (wall clock time in seconds) <span style="font-weight: normal">— Results have been produced with GNU Octave 3.8.2 and Interval package 0.1.4 on an Intel® Core™ i5-4340M CPU (2.9–3.6 GHz)</span>
!Matrix dimension
!Interval matrix size
!Interval <code>plus</code>
!valign="top" style="min-width:6em"|<code>plus</code>
!Interval <code>log</code>
!valign="top" style="min-width:6em"|<code>times</code>
!Interval <code>mtimes</code>
!valign="top" style="min-width:6em"|<code>log</code>
!Interval <code>inv</code>
!valign="top" style="min-width:6em"|<code>pow</code>
!valign="top" style="min-width:6em"|<code>mtimes</code><br/><span style="font-weight: normal">fast mode</span>
!valign="top" style="min-width:6em"|<code>mtimes</code><br/><span style="font-weight: normal">accurate mode<br/>(default)</span>
!valign="top" style="min-width:6em"|<code>inv</code>
|-
|-
| 10
| 10 × 10
|align="right"| < 0.001
|align="right"| < 0.001
|align="right"| < 0.001
|align="right"| 0.001
|align="right"| 0.008
|align="right"| 0.001
|align="right"| 0.002
|align="right"| 0.002
|align="right"| < 0.01
|align="right"| 0.025
|align="right"| 0.05
|-
|-
| 20
| 100 × 100
|align="right"| < 0.001
|align="right"| 0.003
|align="right"| 0.005
|align="right"| 0.010
|align="right"| 0.01
|align="right"| 0.055
|align="right"| 0.09
|align="right"| 0.61
|align="right"| 0.012
|align="right"| 0.53
|align="right"| 0.30
|-
|-
| 30
| 500 × 500
|align="right"| < 0.001
|align="right"| 0.060
|align="right"| 0.007
|align="right"| 0.24
|align="right"| 0.02
|align="right"| 1.3
|align="right"| 0.15
|align="right"| 15
|-
| 40
|align="right"| < 0.001
|align="right"| 0.009
|align="right"| 0.04
|align="right"| 0.30
|align="right"| 0.30
|align="right"| 63
|align="right"| 4.2
|-
|-
| 50
|align="right"| 0.001
|align="right"| 0.013
|align="right"| 0.07
|align="right"| 0.45
|}
|}


''Why is the interval package accurate?''
''Why is the interval package accurate?''
The GNU Octave built-in floating-point routines are not useful for interval arithmetic: Their results depend on hardware, system libraries and compilation options.  
The GNU Octave built-in floating-point routines are not useful for interval arithmetic: Their results depend on hardware, system libraries and compilation options.  
The interval package handles all arithmetic functions with the help of the [http://www.mpfr.org/ GNU MPFR library]. With MPFR it is possible to compute system-independent, valid and tight enclosures of the correct results. However, it should be noted that some reverse operations and matrix operations do not exists in GNU MPFR and therefore cannot be computed with the same accuracy.
The interval package handles all arithmetic functions with the help of the [http://www.mpfr.org/ GNU MPFR library]. With MPFR it is possible to compute system-independent, valid and tight enclosures of the correct results for most functions. However, it should be noted that some reverse operations and matrix operations do not exists in GNU MPFR and therefore cannot be computed with the same accuracy.


== Quick start introduction ==
== Quick start introduction ==
240

edits