Average Error: 14.3 → 2.3
Time: 18.8s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{x}{\frac{z}{y}} \le -9.284971931809574 \cdot 10^{-304}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{if}\;\frac{x}{\frac{z}{y}} \le 5.0394695875807 \cdot 10^{-322}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{if}\;\frac{x}{\frac{z}{y}} \le 1.1181989019239861 \cdot 10^{+212}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (/ x (/ z y)) < -9.284971931809574e-304 or 5.0394695875807e-322 < (/ x (/ z y)) < 1.1181989019239861e+212

    1. Initial program 13.2

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify2.6

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}}\]
    3. Using strategy rm
    4. Applied associate-*r/6.8

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
    5. Using strategy rm
    6. Applied associate-/l*2.3

      \[\leadsto \color{blue}{\frac{x}{\frac{z}{y}}}\]

    if -9.284971931809574e-304 < (/ x (/ z y)) < 5.0394695875807e-322 or 1.1181989019239861e+212 < (/ x (/ z y))

    1. Initial program 16.6

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Applied simplify14.4

      \[\leadsto \color{blue}{x \cdot \frac{y}{z}}\]
    3. Using strategy rm
    4. Applied associate-*r/2.2

      \[\leadsto \color{blue}{\frac{x \cdot y}{z}}\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 18.8s)Debug logProfile

herbie shell --seed 2018167 +o rules:numerics
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))