Average Error: 14.6 → 1.6
Time: 8.6s
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 -1.39767496535652 \cdot 10^{+162}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.908558519339926 \cdot 10^{-165}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.1564288014450195 \cdot 10^{-147}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 6.80073103094035 \cdot 10^{+155}:\\ \;\;\;\;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) < -1.39767496535652e+162

    1. Initial program 38.6

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

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

    if -1.39767496535652e+162 < (/ (* (/ y z) t) t) < -2.908558519339926e-165 or 1.1564288014450195e-147 < (/ (* (/ y z) t) t) < 6.80073103094035e+155

    1. Initial program 0.5

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

    if -2.908558519339926e-165 < (/ (* (/ y z) t) t) < 1.1564288014450195e-147 or 6.80073103094035e+155 < (/ (* (/ y z) t) t)

    1. Initial program 23.5

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} \le -1.39767496535652 \cdot 10^{+162}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.908558519339926 \cdot 10^{-165}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.1564288014450195 \cdot 10^{-147}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 6.80073103094035 \cdot 10^{+155}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]

Runtime

Time bar (total: 8.6s)Debug logProfile

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