Average Error: 2.8 → 1.0
Time: 36.0s
Precision: 64
Internal precision: 128
\[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\]
\[\begin{array}{l} \mathbf{if}\;z \le -14827841.043240983:\\ \;\;\;\;x - \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\\ \end{array}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original2.8
Comparison0.0
Herbie1.0
\[ x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x} \]

Derivation

  1. Split input into 2 regimes.
  2. if z < -14827841.043240983

    1. Initial program 7.3

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\]
    2. Applied taylor 0.0

      \[\leadsto x - \frac{1}{x}\]
    3. Taylor expanded around inf 0.0

      \[\leadsto \color{blue}{x - \frac{1}{x}}\]

    if -14827841.043240983 < z

    1. Initial program 1.4

      \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\]
  3. Recombined 2 regimes into one program.
  4. Removed slow pow expressions

Runtime

Time bar (total: 36.0s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(951925295 2150211076 4255079799 1791679449 2381002406 745795736)'
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"

  :target
  (+ x (/ 1 (- (* (/ 1.1283791670955126 y) (exp z)) x)))

  (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))