Average Error: 3.7 → 0.8
Time: 12.6s
Precision: 64
Internal Precision: 320
\[\frac{x \cdot y}{a} + z\]
\[\begin{array}{l} \mathbf{if}\;\frac{x \cdot y}{a} = -\infty:\\ \;\;\;\;z + x \cdot \frac{y}{a}\\ \mathbf{elif}\;\frac{x \cdot y}{a} \le 2.3984251035498995 \cdot 10^{+284}:\\ \;\;\;\;\frac{x \cdot y}{a} + z\\ \mathbf{else}:\\ \;\;\;\;z + x \cdot \frac{y}{a}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus a

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (/ (* x y) a) < -inf.0 or 2.3984251035498995e+284 < (/ (* x y) a)

    1. Initial program 52.4

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

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

    if -inf.0 < (/ (* x y) a) < 2.3984251035498995e+284

    1. Initial program 0.7

      \[\frac{x \cdot y}{a} + z\]
    2. Initial simplification3.8

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

      \[\leadsto z + \color{blue}{\frac{x \cdot y}{a}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x \cdot y}{a} = -\infty:\\ \;\;\;\;z + x \cdot \frac{y}{a}\\ \mathbf{elif}\;\frac{x \cdot y}{a} \le 2.3984251035498995 \cdot 10^{+284}:\\ \;\;\;\;\frac{x \cdot y}{a} + z\\ \mathbf{else}:\\ \;\;\;\;z + x \cdot \frac{y}{a}\\ \end{array}\]

Runtime

Time bar (total: 12.6s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)' 
(FPCore (x y a z)
  :name "x*y/a+z"
  (+ (/ (* x y) a) z))