Average Error: 14.3 → 1.4
Time: 20.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} = -\infty:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.9354628429314136 \cdot 10^{-183}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.0758456651208999 \cdot 10^{-173}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.5928543586176112 \cdot 10^{+129}:\\ \;\;\;\;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 4 regimes
  2. if (/ (* (/ y z) t) t) < -inf.0

    1. Initial program 60.6

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Using strategy rm
    4. Applied div-inv2.6

      \[\leadsto y \cdot \color{blue}{\left(x \cdot \frac{1}{z}\right)}\]
    5. Applied associate-*r*3.6

      \[\leadsto \color{blue}{\left(y \cdot x\right) \cdot \frac{1}{z}}\]

    if -inf.0 < (/ (* (/ y z) t) t) < -2.9354628429314136e-183 or 1.0758456651208999e-173 < (/ (* (/ y z) t) t) < 2.5928543586176112e+129

    1. Initial program 0.6

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

    if -2.9354628429314136e-183 < (/ (* (/ y z) t) t) < 1.0758456651208999e-173

    1. Initial program 19.7

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

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

    if 2.5928543586176112e+129 < (/ (* (/ y z) t) t)

    1. Initial program 33.0

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{\frac{y}{z} \cdot t}{t} = -\infty:\\ \;\;\;\;\frac{1}{z} \cdot \left(y \cdot x\right)\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le -2.9354628429314136 \cdot 10^{-183}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 1.0758456651208999 \cdot 10^{-173}:\\ \;\;\;\;y \cdot \frac{x}{z}\\ \mathbf{elif}\;\frac{\frac{y}{z} \cdot t}{t} \le 2.5928543586176112 \cdot 10^{+129}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array}\]

Runtime

Time bar (total: 20.5s)Debug logProfile

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