Average Error: 14.3 → 0.5
Time: 7.4s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -5.4132489706710926 \cdot 10^{-180}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.16488912911734 \cdot 10^{-310}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 1.397714304640237 \cdot 10^{+169}:\\ \;\;\;\;\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 3 regimes
  2. if (/ y z) < -inf.0 or -5.4132489706710926e-180 < (/ y z) < 1.16488912911734e-310

    1. Initial program 22.3

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

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

    if -inf.0 < (/ y z) < -5.4132489706710926e-180 or 1.16488912911734e-310 < (/ y z) < 1.397714304640237e+169

    1. Initial program 9.3

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around 0 8.2

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

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

    if 1.397714304640237e+169 < (/ y z)

    1. Initial program 34.0

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around 0 1.6

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y}{z} = -\infty:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le -5.4132489706710926 \cdot 10^{-180}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{elif}\;\frac{y}{z} \le 1.16488912911734 \cdot 10^{-310}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{y}{z} \le 1.397714304640237 \cdot 10^{+169}:\\ \;\;\;\;\frac{x}{\frac{z}{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 7.4s)Debug logProfile

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