Average Error: 2.8 → 0.1
Time: 3.2s
Precision: 64
\[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{1.12837916709551256 \cdot \left(e^{z} \cdot \frac{1}{y}\right) - x}\]
x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}
x + \frac{1}{1.12837916709551256 \cdot \left(e^{z} \cdot \frac{1}{y}\right) - x}
double code(double x, double y, double z) {
	return (x + (y / ((1.1283791670955126 * exp(z)) - (x * y))));
}
double code(double x, double y, double z) {
	return (x + (1.0 / ((1.1283791670955126 * (exp(z) * (1.0 / y))) - x)));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original2.8
Target0.0
Herbie0.1
\[x + \frac{1}{\frac{1.12837916709551256}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program 2.8

    \[x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}\]
  2. Using strategy rm
  3. Applied clear-num2.8

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.12837916709551256 \cdot e^{z} - x \cdot y}{y}}}\]
  4. Taylor expanded around inf 0.1

    \[\leadsto x + \frac{1}{\color{blue}{1.12837916709551256 \cdot \frac{e^{z}}{y} - x}}\]
  5. Using strategy rm
  6. Applied div-inv0.1

    \[\leadsto x + \frac{1}{1.12837916709551256 \cdot \color{blue}{\left(e^{z} \cdot \frac{1}{y}\right)} - x}\]
  7. Final simplification0.1

    \[\leadsto x + \frac{1}{1.12837916709551256 \cdot \left(e^{z} \cdot \frac{1}{y}\right) - x}\]

Reproduce

herbie shell --seed 2020100 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
  :precision binary64

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

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