Average Error: 3.0 → 0.1
Time: 3.0s
Precision: binary64
\[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
\[x - \frac{1}{x - 1.1283791670955126 \cdot \frac{e^{z}}{y}} \]
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
x - \frac{1}{x - 1.1283791670955126 \cdot \frac{e^{z}}{y}}
(FPCore (x y z)
 :precision binary64
 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
(FPCore (x y z)
 :precision binary64
 (- x (/ 1.0 (- x (* 1.1283791670955126 (/ (exp z) y))))))
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 / (x - (1.1283791670955126 * (exp(z) / y))));
}

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

Original3.0
Target0.1
Herbie0.1
\[x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x} \]

Derivation

  1. Initial program 3.0

    \[x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y} \]
  2. Simplified0.1

    \[\leadsto \color{blue}{x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
  3. Applied *-un-lft-identity_binary640.1

    \[\leadsto x + \color{blue}{1 \cdot \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}} \]
  4. Applied *-un-lft-identity_binary640.1

    \[\leadsto \color{blue}{1 \cdot x} + 1 \cdot \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)} \]
  5. Applied distribute-lft-out_binary640.1

    \[\leadsto \color{blue}{1 \cdot \left(x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}\right)} \]
  6. Simplified0.1

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

    \[\leadsto x - \frac{1}{x - 1.1283791670955126 \cdot \frac{e^{z}}{y}} \]

Reproduce

herbie shell --seed 2021313 
(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)))))