Average Error: 14.7 → 2.3
Time: 7.1s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -2.917171288068428 \cdot 10^{+301}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -1.2286817288539788 \cdot 10^{-238}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 2.020881514954108 \cdot 10^{-79}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \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 (/ y z) < -2.917171288068428e+301 or -1.2286817288539788e-238 < (/ y z) < 2.020881514954108e-79

    1. Initial program 19.7

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

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

    if -2.917171288068428e+301 < (/ y z) < -1.2286817288539788e-238 or 2.020881514954108e-79 < (/ y z)

    1. Initial program 11.8

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} \le -2.917171288068428 \cdot 10^{+301}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -1.2286817288539788 \cdot 10^{-238}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;\frac{y}{z} \le 2.020881514954108 \cdot 10^{-79}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array}\]

Runtime

Time bar (total: 7.1s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes6.22.30.06.262.7%
herbie shell --seed 2018290 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1"
  (* x (/ (* (/ y z) t) t)))