Average Error: 14.0 → 2.0
Time: 18.8s
Precision: 64
Internal Precision: 576
\[x \cdot \frac{\frac{y}{z} \cdot t}{t}\]
\[\begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -2.5940564382865536 \cdot 10^{-194}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 1.574050981007463 \cdot 10^{+306}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \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 (* x (/ (* (/ y z) t) t)) < -inf.0 or -2.5940564382865536e-194 < (* x (/ (* (/ y z) t) t)) < 0.0

    1. Initial program 25.0

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

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

    if -inf.0 < (* x (/ (* (/ y z) t) t)) < -2.5940564382865536e-194 or 0.0 < (* x (/ (* (/ y z) t) t)) < 1.574050981007463e+306

    1. Initial program 0.9

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

    if 1.574050981007463e+306 < (* x (/ (* (/ y z) t) t))

    1. Initial program 59.5

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le -2.5940564382865536 \cdot 10^{-194}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 0.0:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 1.574050981007463 \cdot 10^{+306}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 18.8s)Debug logProfile

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