Average Error: 14.0 → 1.7
Time: 6.6s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -6.469225560592734 \cdot 10^{-301}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -0.0:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 4.03824168991105 \cdot 10^{+205}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \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 3 regimes
  2. if (* x (/ (* (/ y z) t) t)) < -inf.0 or 4.03824168991105e+205 < (* x (/ (* (/ y z) t) t))

    1. Initial program 45.6

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification6.0

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

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

    if -inf.0 < (* x (/ (* (/ y z) t) t)) < -6.469225560592734e-301 or -0.0 < (* x (/ (* (/ y z) t) t)) < 4.03824168991105e+205

    1. Initial program 0.9

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]

    if -6.469225560592734e-301 < (* x (/ (* (/ y z) t) t)) < -0.0

    1. Initial program 22.0

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Initial simplification1.2

      \[\leadsto y \cdot \frac{x}{z}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -6.469225560592734 \cdot 10^{-301}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -0.0:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 4.03824168991105 \cdot 10^{+205}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 6.6s)Debug logProfile

herbie shell --seed 2018219 +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)))