Average Error: 14.6 → 1.4
Time: 17.9s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -1.7952943162034784 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.563010458217956 \cdot 10^{+180}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{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 (/ (* (/ y z) t) t) < -inf.0 or -1.7952943162034784e-145 < (/ (* (/ y z) t) t) < 0.0

    1. Initial program 28.3

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

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

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

    if -inf.0 < (/ (* (/ y z) t) t) < -1.7952943162034784e-145 or 0.0 < (/ (* (/ y z) t) t) < 2.563010458217956e+180

    1. Initial program 0.7

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

    if 2.563010458217956e+180 < (/ (* (/ y z) t) t)

    1. Initial program 41.0

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -1.7952943162034784 \cdot 10^{-145}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.563010458217956 \cdot 10^{+180}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \end{array}\]

Runtime

Time bar (total: 17.9s)Debug logProfile

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