(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)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (y / ((1.1283791670955126d0 * exp(z)) - (x * y)))
end function
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((-1.0d0) / (x + (((-1.1283791670955126d0) * exp(z)) / y)))
end function
public static double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
public static double code(double x, double y, double z) {
return x + (-1.0 / (x + ((-1.1283791670955126 * Math.exp(z)) / y)));
}
def code(x, y, z): return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
def code(x, y, z): return x + (-1.0 / (x + ((-1.1283791670955126 * math.exp(z)) / y)))
function code(x, y, z) return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y)))) end
function code(x, y, z) return Float64(x + Float64(-1.0 / Float64(x + Float64(Float64(-1.1283791670955126 * exp(z)) / y)))) end
function tmp = code(x, y, z) tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * y))); end
function tmp = code(x, y, z) tmp = x + (-1.0 / (x + ((-1.1283791670955126 * exp(z)) / y))); end
code[x_, y_, z_] := N[(x + N[(y / N[(N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(x + N[(-1.0 / N[(x + N[(N[(-1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
x + \frac{-1}{x + \frac{-1.1283791670955126 \cdot e^{z}}{y}}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 3.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 3.0
Simplified0.1
Applied egg-rr0.4
Taylor expanded in z around inf 0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2022162
(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)))))