
(FPCore (x y z) :precision binary64 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * exp(z)) - (x * 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
public static double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
def code(x, y, z): return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
function code(x, y, z) return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y)))) end
function tmp = code(x, y, z) tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * 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]
\begin{array}{l}
\\
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * exp(z)) - (x * 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
public static double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
def code(x, y, z): return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
function code(x, y, z) return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y)))) end
function tmp = code(x, y, z) tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * 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]
\begin{array}{l}
\\
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
\end{array}
(FPCore (x y z) :precision binary64 (if (<= (exp z) 0.0) (+ x (/ -1.0 x)) (- x (/ y (fma x y (* (exp z) -1.1283791670955126))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = x + (-1.0 / x);
} else {
tmp = x - (y / fma(x, y, (exp(z) * -1.1283791670955126)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(x + Float64(-1.0 / x)); else tmp = Float64(x - Float64(y / fma(x, y, Float64(exp(z) * -1.1283791670955126)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(x * y + N[(N[Exp[z], $MachinePrecision] * -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(x, y, e^{z} \cdot -1.1283791670955126\right)}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 88.9%
Taylor expanded in y around inf 100.0%
if 0.0 < (exp.f64 z) Initial program 96.7%
remove-double-neg96.7%
distribute-frac-neg96.7%
unsub-neg96.7%
distribute-frac-neg96.7%
distribute-neg-frac296.7%
neg-sub096.7%
associate--r-96.7%
neg-sub096.7%
+-commutative96.7%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ x (/ -1.0 x))
(if (<= (exp z) 1.0)
(- x (/ y (fma y x -1.1283791670955126)))
(- x (/ (* y -0.8862269254527579) (exp z))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = x + (-1.0 / x);
} else if (exp(z) <= 1.0) {
tmp = x - (y / fma(y, x, -1.1283791670955126));
} else {
tmp = x - ((y * -0.8862269254527579) / exp(z));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (exp(z) <= 1.0) tmp = Float64(x - Float64(y / fma(y, x, -1.1283791670955126))); else tmp = Float64(x - Float64(Float64(y * -0.8862269254527579) / exp(z))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 1.0], N[(x - N[(y / N[(y * x + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * -0.8862269254527579), $MachinePrecision] / N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;e^{z} \leq 1:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(y, x, -1.1283791670955126\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot -0.8862269254527579}{e^{z}}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 88.9%
Taylor expanded in y around inf 100.0%
if 0.0 < (exp.f64 z) < 1Initial program 99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
unsub-neg99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
neg-sub099.9%
associate--r-99.9%
neg-sub099.9%
+-commutative99.9%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
*-commutative99.9%
fmm-def99.9%
metadata-eval99.9%
Simplified99.9%
if 1 < (exp.f64 z) Initial program 91.0%
remove-double-neg91.0%
distribute-frac-neg91.0%
unsub-neg91.0%
distribute-frac-neg91.0%
distribute-neg-frac291.0%
neg-sub091.0%
associate--r-91.0%
neg-sub091.0%
+-commutative91.0%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
associate-*r/100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ x (/ -1.0 x))
(if (<= (exp z) 2.0)
(-
x
(/
y
(-
(+ (* x y) (* z (- (* z -0.5641895835477563) 1.1283791670955126)))
1.1283791670955126)))
x)))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = x + (-1.0 / x);
} else if (exp(z) <= 2.0) {
tmp = x - (y / (((x * y) + (z * ((z * -0.5641895835477563) - 1.1283791670955126))) - 1.1283791670955126));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (exp(z) <= 0.0d0) then
tmp = x + ((-1.0d0) / x)
else if (exp(z) <= 2.0d0) then
tmp = x - (y / (((x * y) + (z * ((z * (-0.5641895835477563d0)) - 1.1283791670955126d0))) - 1.1283791670955126d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (Math.exp(z) <= 0.0) {
tmp = x + (-1.0 / x);
} else if (Math.exp(z) <= 2.0) {
tmp = x - (y / (((x * y) + (z * ((z * -0.5641895835477563) - 1.1283791670955126))) - 1.1283791670955126));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if math.exp(z) <= 0.0: tmp = x + (-1.0 / x) elif math.exp(z) <= 2.0: tmp = x - (y / (((x * y) + (z * ((z * -0.5641895835477563) - 1.1283791670955126))) - 1.1283791670955126)) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (exp(z) <= 2.0) tmp = Float64(x - Float64(y / Float64(Float64(Float64(x * y) + Float64(z * Float64(Float64(z * -0.5641895835477563) - 1.1283791670955126))) - 1.1283791670955126))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (exp(z) <= 0.0) tmp = x + (-1.0 / x); elseif (exp(z) <= 2.0) tmp = x - (y / (((x * y) + (z * ((z * -0.5641895835477563) - 1.1283791670955126))) - 1.1283791670955126)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 2.0], N[(x - N[(y / N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(N[(z * -0.5641895835477563), $MachinePrecision] - 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;e^{z} \leq 2:\\
\;\;\;\;x - \frac{y}{\left(x \cdot y + z \cdot \left(z \cdot -0.5641895835477563 - 1.1283791670955126\right)\right) - 1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 88.9%
Taylor expanded in y around inf 100.0%
if 0.0 < (exp.f64 z) < 2Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
if 2 < (exp.f64 z) Initial program 90.5%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (/ y (- (* (exp z) 1.1283791670955126) (* x y)))))) (if (<= t_0 5e+168) t_0 (+ x (/ -1.0 x)))))
double code(double x, double y, double z) {
double t_0 = x + (y / ((exp(z) * 1.1283791670955126) - (x * y)));
double tmp;
if (t_0 <= 5e+168) {
tmp = t_0;
} else {
tmp = x + (-1.0 / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x + (y / ((exp(z) * 1.1283791670955126d0) - (x * y)))
if (t_0 <= 5d+168) then
tmp = t_0
else
tmp = x + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y / ((Math.exp(z) * 1.1283791670955126) - (x * y)));
double tmp;
if (t_0 <= 5e+168) {
tmp = t_0;
} else {
tmp = x + (-1.0 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x + (y / ((math.exp(z) * 1.1283791670955126) - (x * y))) tmp = 0 if t_0 <= 5e+168: tmp = t_0 else: tmp = x + (-1.0 / x) return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y / Float64(Float64(exp(z) * 1.1283791670955126) - Float64(x * y)))) tmp = 0.0 if (t_0 <= 5e+168) tmp = t_0; else tmp = Float64(x + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y / ((exp(z) * 1.1283791670955126) - (x * y))); tmp = 0.0; if (t_0 <= 5e+168) tmp = t_0; else tmp = x + (-1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y / N[(N[(N[Exp[z], $MachinePrecision] * 1.1283791670955126), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e+168], t$95$0, N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{+168}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{x}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < 4.99999999999999967e168Initial program 98.5%
if 4.99999999999999967e168 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) Initial program 78.5%
Taylor expanded in y around inf 100.0%
Final simplification98.7%
(FPCore (x y z)
:precision binary64
(if (<= z -360.0)
(+ x (/ -1.0 x))
(if (<= z 130.0)
(+ x (/ y (- (* 1.1283791670955126 (+ z 1.0)) (* x y))))
x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -360.0) {
tmp = x + (-1.0 / x);
} else if (z <= 130.0) {
tmp = x + (y / ((1.1283791670955126 * (z + 1.0)) - (x * y)));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-360.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 130.0d0) then
tmp = x + (y / ((1.1283791670955126d0 * (z + 1.0d0)) - (x * y)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -360.0) {
tmp = x + (-1.0 / x);
} else if (z <= 130.0) {
tmp = x + (y / ((1.1283791670955126 * (z + 1.0)) - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -360.0: tmp = x + (-1.0 / x) elif z <= 130.0: tmp = x + (y / ((1.1283791670955126 * (z + 1.0)) - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -360.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 130.0) tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * Float64(z + 1.0)) - Float64(x * y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -360.0) tmp = x + (-1.0 / x); elseif (z <= 130.0) tmp = x + (y / ((1.1283791670955126 * (z + 1.0)) - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -360.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 130.0], N[(x + N[(y / N[(N[(1.1283791670955126 * N[(z + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -360:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 130:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(z + 1\right) - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -360Initial program 88.9%
Taylor expanded in y around inf 100.0%
if -360 < z < 130Initial program 99.8%
Taylor expanded in z around 0 99.8%
+-commutative99.8%
Simplified99.8%
if 130 < z Initial program 90.5%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (<= z -85.0) (+ x (/ -1.0 x)) (if (<= z 300.0) (+ x (/ y (* y (- (/ 1.1283791670955126 y) x)))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -85.0) {
tmp = x + (-1.0 / x);
} else if (z <= 300.0) {
tmp = x + (y / (y * ((1.1283791670955126 / y) - x)));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-85.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 300.0d0) then
tmp = x + (y / (y * ((1.1283791670955126d0 / y) - x)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -85.0) {
tmp = x + (-1.0 / x);
} else if (z <= 300.0) {
tmp = x + (y / (y * ((1.1283791670955126 / y) - x)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -85.0: tmp = x + (-1.0 / x) elif z <= 300.0: tmp = x + (y / (y * ((1.1283791670955126 / y) - x))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -85.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 300.0) tmp = Float64(x + Float64(y / Float64(y * Float64(Float64(1.1283791670955126 / y) - x)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -85.0) tmp = x + (-1.0 / x); elseif (z <= 300.0) tmp = x + (y / (y * ((1.1283791670955126 / y) - x))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -85.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 300.0], N[(x + N[(y / N[(y * N[(N[(1.1283791670955126 / y), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -85:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 300:\\
\;\;\;\;x + \frac{y}{y \cdot \left(\frac{1.1283791670955126}{y} - x\right)}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -85Initial program 88.9%
Taylor expanded in y around inf 100.0%
if -85 < z < 300Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.1%
*-commutative99.1%
fmm-def99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around inf 99.0%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if 300 < z Initial program 90.5%
Taylor expanded in x around inf 100.0%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= z -2.1e+186)
x
(if (<= z -2.1e+31)
(/ -1.0 x)
(if (<= z 0.044) (- x (* y -0.8862269254527579)) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.1e+186) {
tmp = x;
} else if (z <= -2.1e+31) {
tmp = -1.0 / x;
} else if (z <= 0.044) {
tmp = x - (y * -0.8862269254527579);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-2.1d+186)) then
tmp = x
else if (z <= (-2.1d+31)) then
tmp = (-1.0d0) / x
else if (z <= 0.044d0) then
tmp = x - (y * (-0.8862269254527579d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.1e+186) {
tmp = x;
} else if (z <= -2.1e+31) {
tmp = -1.0 / x;
} else if (z <= 0.044) {
tmp = x - (y * -0.8862269254527579);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.1e+186: tmp = x elif z <= -2.1e+31: tmp = -1.0 / x elif z <= 0.044: tmp = x - (y * -0.8862269254527579) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.1e+186) tmp = x; elseif (z <= -2.1e+31) tmp = Float64(-1.0 / x); elseif (z <= 0.044) tmp = Float64(x - Float64(y * -0.8862269254527579)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.1e+186) tmp = x; elseif (z <= -2.1e+31) tmp = -1.0 / x; elseif (z <= 0.044) tmp = x - (y * -0.8862269254527579); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.1e+186], x, If[LessEqual[z, -2.1e+31], N[(-1.0 / x), $MachinePrecision], If[LessEqual[z, 0.044], N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+186}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{elif}\;z \leq 0.044:\\
\;\;\;\;x - y \cdot -0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.1e186 or 0.043999999999999997 < z Initial program 93.3%
Taylor expanded in x around inf 89.1%
if -2.1e186 < z < -2.09999999999999979e31Initial program 83.6%
remove-double-neg83.6%
distribute-frac-neg83.6%
unsub-neg83.6%
distribute-frac-neg83.6%
distribute-neg-frac283.6%
neg-sub084.1%
associate--r-84.1%
neg-sub084.4%
+-commutative84.4%
fma-define84.4%
*-commutative84.4%
distribute-rgt-neg-in84.4%
metadata-eval84.4%
Simplified84.4%
Taylor expanded in x around inf 84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around 0 64.2%
if -2.09999999999999979e31 < z < 0.043999999999999997Initial program 98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
unsub-neg98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
neg-sub098.3%
associate--r-98.3%
neg-sub098.5%
+-commutative98.5%
fma-define98.5%
*-commutative98.5%
distribute-rgt-neg-in98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in z around 0 96.9%
*-commutative96.9%
fmm-def96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in y around 0 75.6%
*-commutative75.6%
Simplified75.6%
(FPCore (x y z) :precision binary64 (if (<= z -220.0) (+ x (/ -1.0 x)) (if (<= z 200.0) (+ x (/ y (- 1.1283791670955126 (* x y)))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -220.0) {
tmp = x + (-1.0 / x);
} else if (z <= 200.0) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-220.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 200.0d0) then
tmp = x + (y / (1.1283791670955126d0 - (x * y)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -220.0) {
tmp = x + (-1.0 / x);
} else if (z <= 200.0) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -220.0: tmp = x + (-1.0 / x) elif z <= 200.0: tmp = x + (y / (1.1283791670955126 - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -220.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 200.0) tmp = Float64(x + Float64(y / Float64(1.1283791670955126 - Float64(x * y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -220.0) tmp = x + (-1.0 / x); elseif (z <= 200.0) tmp = x + (y / (1.1283791670955126 - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -220.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 200.0], N[(x + N[(y / N[(1.1283791670955126 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -220:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 200:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -220Initial program 88.9%
Taylor expanded in y around inf 100.0%
if -220 < z < 200Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.1%
if 200 < z Initial program 90.5%
Taylor expanded in x around inf 100.0%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (<= z -1.15e-33) (+ x (/ -1.0 x)) (if (<= z 0.00082) (+ x (/ y (* 1.1283791670955126 (+ z 1.0)))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.15e-33) {
tmp = x + (-1.0 / x);
} else if (z <= 0.00082) {
tmp = x + (y / (1.1283791670955126 * (z + 1.0)));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.15d-33)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 0.00082d0) then
tmp = x + (y / (1.1283791670955126d0 * (z + 1.0d0)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.15e-33) {
tmp = x + (-1.0 / x);
} else if (z <= 0.00082) {
tmp = x + (y / (1.1283791670955126 * (z + 1.0)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.15e-33: tmp = x + (-1.0 / x) elif z <= 0.00082: tmp = x + (y / (1.1283791670955126 * (z + 1.0))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.15e-33) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 0.00082) tmp = Float64(x + Float64(y / Float64(1.1283791670955126 * Float64(z + 1.0)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.15e-33) tmp = x + (-1.0 / x); elseif (z <= 0.00082) tmp = x + (y / (1.1283791670955126 * (z + 1.0))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.15e-33], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00082], N[(x + N[(y / N[(1.1283791670955126 * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-33}:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 0.00082:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 \cdot \left(z + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.14999999999999993e-33Initial program 90.2%
Taylor expanded in y around inf 97.4%
if -1.14999999999999993e-33 < z < 8.1999999999999998e-4Initial program 99.8%
Taylor expanded in z around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 78.3%
if 8.1999999999999998e-4 < z Initial program 90.5%
Taylor expanded in x around inf 100.0%
Final simplification89.2%
(FPCore (x y z)
:precision binary64
(if (<= x -2.3e-254)
x
(if (<= x 2e-279)
(/ y 1.1283791670955126)
(if (<= x 1.16e-6) (/ -1.0 x) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.3e-254) {
tmp = x;
} else if (x <= 2e-279) {
tmp = y / 1.1283791670955126;
} else if (x <= 1.16e-6) {
tmp = -1.0 / x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.3d-254)) then
tmp = x
else if (x <= 2d-279) then
tmp = y / 1.1283791670955126d0
else if (x <= 1.16d-6) then
tmp = (-1.0d0) / x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.3e-254) {
tmp = x;
} else if (x <= 2e-279) {
tmp = y / 1.1283791670955126;
} else if (x <= 1.16e-6) {
tmp = -1.0 / x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.3e-254: tmp = x elif x <= 2e-279: tmp = y / 1.1283791670955126 elif x <= 1.16e-6: tmp = -1.0 / x else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.3e-254) tmp = x; elseif (x <= 2e-279) tmp = Float64(y / 1.1283791670955126); elseif (x <= 1.16e-6) tmp = Float64(-1.0 / x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.3e-254) tmp = x; elseif (x <= 2e-279) tmp = y / 1.1283791670955126; elseif (x <= 1.16e-6) tmp = -1.0 / x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.3e-254], x, If[LessEqual[x, 2e-279], N[(y / 1.1283791670955126), $MachinePrecision], If[LessEqual[x, 1.16e-6], N[(-1.0 / x), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-254}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-279}:\\
\;\;\;\;\frac{y}{1.1283791670955126}\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.2999999999999999e-254 or 1.1599999999999999e-6 < x Initial program 95.5%
Taylor expanded in x around inf 84.0%
if -2.2999999999999999e-254 < x < 2.00000000000000011e-279Initial program 87.5%
remove-double-neg87.5%
distribute-frac-neg87.5%
unsub-neg87.5%
distribute-frac-neg87.5%
distribute-neg-frac287.5%
neg-sub087.8%
associate--r-87.8%
neg-sub088.2%
+-commutative88.2%
fma-define88.2%
*-commutative88.2%
distribute-rgt-neg-in88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in z around 0 78.6%
*-commutative78.6%
fmm-def78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in x around 0 73.6%
*-commutative73.6%
Simplified73.6%
metadata-eval73.5%
div-inv73.9%
Applied egg-rr73.9%
if 2.00000000000000011e-279 < x < 1.1599999999999999e-6Initial program 94.7%
remove-double-neg94.7%
distribute-frac-neg94.7%
unsub-neg94.7%
distribute-frac-neg94.7%
distribute-neg-frac294.7%
neg-sub094.6%
associate--r-94.6%
neg-sub094.8%
+-commutative94.8%
fma-define94.9%
*-commutative94.9%
distribute-rgt-neg-in94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in x around inf 45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in x around 0 50.6%
(FPCore (x y z)
:precision binary64
(if (<= x -4.8e-254)
x
(if (<= x 8.5e-278)
(* y 0.8862269254527579)
(if (<= x 1.75e-6) (/ -1.0 x) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.8e-254) {
tmp = x;
} else if (x <= 8.5e-278) {
tmp = y * 0.8862269254527579;
} else if (x <= 1.75e-6) {
tmp = -1.0 / x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-4.8d-254)) then
tmp = x
else if (x <= 8.5d-278) then
tmp = y * 0.8862269254527579d0
else if (x <= 1.75d-6) then
tmp = (-1.0d0) / x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4.8e-254) {
tmp = x;
} else if (x <= 8.5e-278) {
tmp = y * 0.8862269254527579;
} else if (x <= 1.75e-6) {
tmp = -1.0 / x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.8e-254: tmp = x elif x <= 8.5e-278: tmp = y * 0.8862269254527579 elif x <= 1.75e-6: tmp = -1.0 / x else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.8e-254) tmp = x; elseif (x <= 8.5e-278) tmp = Float64(y * 0.8862269254527579); elseif (x <= 1.75e-6) tmp = Float64(-1.0 / x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4.8e-254) tmp = x; elseif (x <= 8.5e-278) tmp = y * 0.8862269254527579; elseif (x <= 1.75e-6) tmp = -1.0 / x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.8e-254], x, If[LessEqual[x, 8.5e-278], N[(y * 0.8862269254527579), $MachinePrecision], If[LessEqual[x, 1.75e-6], N[(-1.0 / x), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-254}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-278}:\\
\;\;\;\;y \cdot 0.8862269254527579\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.80000000000000003e-254 or 1.74999999999999997e-6 < x Initial program 95.5%
Taylor expanded in x around inf 84.0%
if -4.80000000000000003e-254 < x < 8.49999999999999955e-278Initial program 87.5%
remove-double-neg87.5%
distribute-frac-neg87.5%
unsub-neg87.5%
distribute-frac-neg87.5%
distribute-neg-frac287.5%
neg-sub087.8%
associate--r-87.8%
neg-sub088.2%
+-commutative88.2%
fma-define88.2%
*-commutative88.2%
distribute-rgt-neg-in88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in z around 0 78.6%
*-commutative78.6%
fmm-def78.6%
metadata-eval78.6%
Simplified78.6%
Taylor expanded in x around 0 73.6%
*-commutative73.6%
Simplified73.6%
if 8.49999999999999955e-278 < x < 1.74999999999999997e-6Initial program 94.7%
remove-double-neg94.7%
distribute-frac-neg94.7%
unsub-neg94.7%
distribute-frac-neg94.7%
distribute-neg-frac294.7%
neg-sub094.6%
associate--r-94.6%
neg-sub094.8%
+-commutative94.8%
fma-define94.9%
*-commutative94.9%
distribute-rgt-neg-in94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in x around inf 45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in x around 0 50.6%
(FPCore (x y z) :precision binary64 (if (<= z -1.6e-39) (+ x (/ -1.0 x)) (if (<= z 3.5e-7) (- x (* y -0.8862269254527579)) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.6e-39) {
tmp = x + (-1.0 / x);
} else if (z <= 3.5e-7) {
tmp = x - (y * -0.8862269254527579);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.6d-39)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 3.5d-7) then
tmp = x - (y * (-0.8862269254527579d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.6e-39) {
tmp = x + (-1.0 / x);
} else if (z <= 3.5e-7) {
tmp = x - (y * -0.8862269254527579);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.6e-39: tmp = x + (-1.0 / x) elif z <= 3.5e-7: tmp = x - (y * -0.8862269254527579) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.6e-39) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 3.5e-7) tmp = Float64(x - Float64(y * -0.8862269254527579)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.6e-39) tmp = x + (-1.0 / x); elseif (z <= 3.5e-7) tmp = x - (y * -0.8862269254527579); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.6e-39], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-7], N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{-39}:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-7}:\\
\;\;\;\;x - y \cdot -0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.5999999999999999e-39Initial program 90.2%
Taylor expanded in y around inf 97.4%
if -1.5999999999999999e-39 < z < 3.49999999999999984e-7Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
distribute-frac-neg99.8%
distribute-neg-frac299.8%
neg-sub099.8%
associate--r-99.8%
neg-sub099.8%
+-commutative99.8%
fma-define99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.0%
*-commutative99.0%
fmm-def99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in y around 0 77.5%
*-commutative77.5%
Simplified77.5%
if 3.49999999999999984e-7 < z Initial program 90.5%
Taylor expanded in x around inf 100.0%
Final simplification88.9%
(FPCore (x y z) :precision binary64 (if (<= x -2.35e-253) x (if (<= x 1.38e-129) (* y 0.8862269254527579) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.35e-253) {
tmp = x;
} else if (x <= 1.38e-129) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.35d-253)) then
tmp = x
else if (x <= 1.38d-129) then
tmp = y * 0.8862269254527579d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.35e-253) {
tmp = x;
} else if (x <= 1.38e-129) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.35e-253: tmp = x elif x <= 1.38e-129: tmp = y * 0.8862269254527579 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.35e-253) tmp = x; elseif (x <= 1.38e-129) tmp = Float64(y * 0.8862269254527579); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.35e-253) tmp = x; elseif (x <= 1.38e-129) tmp = y * 0.8862269254527579; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.35e-253], x, If[LessEqual[x, 1.38e-129], N[(y * 0.8862269254527579), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{-253}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.38 \cdot 10^{-129}:\\
\;\;\;\;y \cdot 0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.34999999999999991e-253 or 1.38000000000000007e-129 < x Initial program 96.0%
Taylor expanded in x around inf 78.6%
if -2.34999999999999991e-253 < x < 1.38000000000000007e-129Initial program 89.9%
remove-double-neg89.9%
distribute-frac-neg89.9%
unsub-neg89.9%
distribute-frac-neg89.9%
distribute-neg-frac289.9%
neg-sub089.9%
associate--r-89.9%
neg-sub090.3%
+-commutative90.3%
fma-define90.3%
*-commutative90.3%
distribute-rgt-neg-in90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in z around 0 64.7%
*-commutative64.7%
fmm-def64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in x around 0 45.9%
*-commutative45.9%
Simplified45.9%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.7%
Taylor expanded in x around inf 65.9%
(FPCore (x y z) :precision binary64 (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x))))
double code(double x, double y, double z) {
return x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x));
}
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 / (((1.1283791670955126d0 / y) * exp(z)) - x))
end function
public static double code(double x, double y, double z) {
return x + (1.0 / (((1.1283791670955126 / y) * Math.exp(z)) - x));
}
def code(x, y, z): return x + (1.0 / (((1.1283791670955126 / y) * math.exp(z)) - x))
function code(x, y, z) return Float64(x + Float64(1.0 / Float64(Float64(Float64(1.1283791670955126 / y) * exp(z)) - x))) end
function tmp = code(x, y, z) tmp = x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x)); end
code[x_, y_, z_] := N[(x + N[(1.0 / N[(N[(N[(1.1283791670955126 / y), $MachinePrecision] * N[Exp[z], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x}
\end{array}
herbie shell --seed 2024181
(FPCore (x y z)
:name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ 1 (- (* (/ 5641895835477563/5000000000000000 y) (exp z)) x))))
(+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))