Average Error: 14.1 → 1.9
Time: 14.9s
Precision: 64
Internal Precision: 320
\[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.5618929019467045 \cdot 10^{-289}:\\ \;\;\;\;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 \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 2.3799066353748766 \cdot 10^{+209}:\\ \;\;\;\;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

    1. Initial program 60.7

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

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

    if -inf.0 < (* x (/ (* (/ y z) t) t)) < -2.5618929019467045e-289 or -0.0 < (* x (/ (* (/ y z) t) t)) < 2.3799066353748766e+209

    1. Initial program 0.8

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

    if -2.5618929019467045e-289 < (* x (/ (* (/ y z) t) t)) < -0.0 or 2.3799066353748766e+209 < (* x (/ (* (/ y z) t) t))

    1. Initial program 25.2

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

      \[\leadsto y \cdot \frac{x}{z}\]
    3. Using strategy rm
    4. Applied associate-*r/3.1

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

    \[\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.5618929019467045 \cdot 10^{-289}:\\ \;\;\;\;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 \cdot y}{z}\\ \mathbf{elif}\;x \cdot \frac{\frac{y}{z} \cdot t}{t} \le 2.3799066353748766 \cdot 10^{+209}:\\ \;\;\;\;x \cdot \frac{\frac{y}{z} \cdot t}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array}\]

Runtime

Time bar (total: 14.9s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes5.81.90.05.867.9%
herbie shell --seed 2018263 +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)))