Average Error: 14.1 → 5.9
Time: 7.9s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.2602231948917754 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \left(\frac{1}{z} \cdot y\right)\\ \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 z < -1.2602231948917754e-285

    1. Initial program 14.0

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

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

      \[\leadsto \color{blue}{\frac{y \cdot x}{z}}\]
    5. Using strategy rm
    6. Applied clear-num6.1

      \[\leadsto \color{blue}{\frac{1}{\frac{z}{y \cdot x}}}\]
    7. Using strategy rm
    8. Applied associate-/r/5.9

      \[\leadsto \color{blue}{\frac{1}{z} \cdot \left(y \cdot x\right)}\]
    9. Using strategy rm
    10. Applied associate-*r*5.6

      \[\leadsto \color{blue}{\left(\frac{1}{z} \cdot y\right) \cdot x}\]

    if -1.2602231948917754e-285 < z

    1. Initial program 14.2

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.2602231948917754 \cdot 10^{-285}:\\ \;\;\;\;x \cdot \left(\frac{1}{z} \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 7.9s)Debug logProfile

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