Average Error: 14.3 → 1.5
Time: 11.5s
Precision: 64
Internal Precision: 128
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -6.023039957033584 \cdot 10^{+216}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -4.201552814739111 \cdot 10^{-87}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 6.792544867417 \cdot 10^{-310}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.1571124623674374 \cdot 10^{+263}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \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) < -6.023039957033584e+216 or 1.1571124623674374e+263 < (/ (* (/ y z) t) t)

    1. Initial program 50.5

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

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

    if -6.023039957033584e+216 < (/ (* (/ y z) t) t) < -4.201552814739111e-87 or 6.792544867417e-310 < (/ (* (/ y z) t) t) < 1.1571124623674374e+263

    1. Initial program 0.6

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

    if -4.201552814739111e-87 < (/ (* (/ y z) t) t) < 6.792544867417e-310

    1. Initial program 19.1

      \[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
    2. Simplified2.3

      \[\leadsto \color{blue}{y \cdot \frac{x}{z}}\]
    3. Taylor expanded around inf 2.0

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -6.023039957033584 \cdot 10^{+216}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -4.201552814739111 \cdot 10^{-87}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 6.792544867417 \cdot 10^{-310}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.1571124623674374 \cdot 10^{+263}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \end{array}\]

Reproduce

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