Average Error: 2.9 → 0.1
Time: 2.7s
Precision: binary64
\[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\]
\[x + \frac{1}{\sqrt{1.1283791670955126} \cdot \left(e^{z} \cdot \frac{\sqrt{1.1283791670955126}}{y}\right) - x}\]
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
x + \frac{1}{\sqrt{1.1283791670955126} \cdot \left(e^{z} \cdot \frac{\sqrt{1.1283791670955126}}{y}\right) - x}
double code(double x, double y, double z) {
	return ((double) (x + (y / ((double) (((double) (1.1283791670955126 * ((double) exp(z)))) - ((double) (x * y)))))));
}
double code(double x, double y, double z) {
	return ((double) (x + (1.0 / ((double) (((double) (((double) sqrt(1.1283791670955126)) * ((double) (((double) exp(z)) * (((double) sqrt(1.1283791670955126)) / 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.9
Target0.0
Herbie0.1
\[x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x}\]

Derivation

  1. Initial program Error: 2.9 bits

    \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}\]
  2. Using strategy rm
  3. Applied clear-numError: 2.9 bits

    \[\leadsto x + \color{blue}{\frac{1}{\frac{1.1283791670955126 \cdot e^{z} - x \cdot y}{y}}}\]
  4. SimplifiedError: 0.0 bits

    \[\leadsto x + \frac{1}{\color{blue}{\frac{1.1283791670955126}{y} \cdot e^{z} - x}}\]
  5. Using strategy rm
  6. Applied *-un-lft-identityError: 0.0 bits

    \[\leadsto x + \frac{1}{\frac{1.1283791670955126}{\color{blue}{1 \cdot y}} \cdot e^{z} - x}\]
  7. Applied add-sqr-sqrtError: 0.1 bits

    \[\leadsto x + \frac{1}{\frac{\color{blue}{\sqrt{1.1283791670955126} \cdot \sqrt{1.1283791670955126}}}{1 \cdot y} \cdot e^{z} - x}\]
  8. Applied times-fracError: 0.1 bits

    \[\leadsto x + \frac{1}{\color{blue}{\left(\frac{\sqrt{1.1283791670955126}}{1} \cdot \frac{\sqrt{1.1283791670955126}}{y}\right)} \cdot e^{z} - x}\]
  9. Applied associate-*l*Error: 0.1 bits

    \[\leadsto x + \frac{1}{\color{blue}{\frac{\sqrt{1.1283791670955126}}{1} \cdot \left(\frac{\sqrt{1.1283791670955126}}{y} \cdot e^{z}\right)} - x}\]
  10. SimplifiedError: 0.1 bits

    \[\leadsto x + \frac{1}{\frac{\sqrt{1.1283791670955126}}{1} \cdot \color{blue}{\left(e^{z} \cdot \frac{\sqrt{1.1283791670955126}}{y}\right)} - x}\]
  11. Final simplificationError: 0.1 bits

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

Reproduce

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

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

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