Average Error: 14.3 → 1.1
Time: 21.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} \le -4.371358299357151 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.3206363611705457 \cdot 10^{-237}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 5.137210900725661 \cdot 10^{-255}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 4.717572255688062 \cdot 10^{+266}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot 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) < -4.371358299357151e+174 or -2.3206363611705457e-237 < (/ (* (/ y z) t) t) < 5.137210900725661e-255

    1. Initial program 28.5

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

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

    if -4.371358299357151e+174 < (/ (* (/ y z) t) t) < -2.3206363611705457e-237 or 5.137210900725661e-255 < (/ (* (/ y z) t) t) < 4.717572255688062e+266

    1. Initial program 0.7

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

    if 4.717572255688062e+266 < (/ (* (/ y z) t) t)

    1. Initial program 54.7

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Taylor expanded around -inf 2.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -4.371358299357151 \cdot 10^{+174}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.3206363611705457 \cdot 10^{-237}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 5.137210900725661 \cdot 10^{-255}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 4.717572255688062 \cdot 10^{+266}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]

Runtime

Time bar (total: 21.9s)Debug logProfile

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