
(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 13 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 (<= z -360000.0)
(+ x (/ -1.0 x))
(if (<= z 75.0)
(+
x
(/
y
(-
(+
1.1283791670955126
(* z (+ 1.1283791670955126 (* z 0.5641895835477563))))
(* x y))))
x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -360000.0) {
tmp = x + (-1.0 / x);
} else if (z <= 75.0) {
tmp = x + (y / ((1.1283791670955126 + (z * (1.1283791670955126 + (z * 0.5641895835477563)))) - (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 <= (-360000.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 75.0d0) then
tmp = x + (y / ((1.1283791670955126d0 + (z * (1.1283791670955126d0 + (z * 0.5641895835477563d0)))) - (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 <= -360000.0) {
tmp = x + (-1.0 / x);
} else if (z <= 75.0) {
tmp = x + (y / ((1.1283791670955126 + (z * (1.1283791670955126 + (z * 0.5641895835477563)))) - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -360000.0: tmp = x + (-1.0 / x) elif z <= 75.0: tmp = x + (y / ((1.1283791670955126 + (z * (1.1283791670955126 + (z * 0.5641895835477563)))) - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -360000.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 75.0) tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 + Float64(z * Float64(1.1283791670955126 + Float64(z * 0.5641895835477563)))) - Float64(x * y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -360000.0) tmp = x + (-1.0 / x); elseif (z <= 75.0) tmp = x + (y / ((1.1283791670955126 + (z * (1.1283791670955126 + (z * 0.5641895835477563)))) - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -360000.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 75.0], N[(x + N[(y / N[(N[(1.1283791670955126 + N[(z * N[(1.1283791670955126 + N[(z * 0.5641895835477563), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -360000:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 75:\\
\;\;\;\;x + \frac{y}{\left(1.1283791670955126 + z \cdot \left(1.1283791670955126 + z \cdot 0.5641895835477563\right)\right) - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.6e5Initial program 83.7%
remove-double-neg83.7%
distribute-frac-neg83.7%
unsub-neg83.7%
distribute-frac-neg83.7%
distribute-neg-frac283.7%
neg-sub083.4%
associate--r-83.4%
neg-sub084.1%
+-commutative84.1%
fma-define84.1%
*-commutative84.1%
distribute-rgt-neg-in84.1%
metadata-eval84.1%
Simplified84.1%
Taylor expanded in y around inf 100.0%
if -3.6e5 < z < 75Initial program 99.8%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
if 75 < z Initial program 91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
unsub-neg91.7%
distribute-frac-neg91.7%
distribute-neg-frac291.7%
neg-sub091.7%
associate--r-91.7%
neg-sub091.7%
+-commutative91.7%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 47.5%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(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 84.0%
remove-double-neg84.0%
distribute-frac-neg84.0%
unsub-neg84.0%
distribute-frac-neg84.0%
distribute-neg-frac284.0%
neg-sub083.7%
associate--r-83.7%
neg-sub084.3%
+-commutative84.3%
fma-define84.3%
*-commutative84.3%
distribute-rgt-neg-in84.3%
metadata-eval84.3%
Simplified84.3%
Taylor expanded in y around inf 100.0%
if 0.0 < (exp.f64 z) Initial program 97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
unsub-neg97.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
neg-sub097.4%
associate--r-97.4%
neg-sub097.4%
+-commutative97.4%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (/ y (- (* (exp z) 1.1283791670955126) (* x y)))))) (if (<= t_0 2e+221) 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 <= 2e+221) {
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 <= 2d+221) 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 <= 2e+221) {
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 <= 2e+221: 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 <= 2e+221) 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 <= 2e+221) 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, 2e+221], 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 2 \cdot 10^{+221}:\\
\;\;\;\;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)))) < 2.0000000000000001e221Initial program 99.0%
if 2.0000000000000001e221 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) Initial program 62.4%
remove-double-neg62.4%
distribute-frac-neg62.4%
unsub-neg62.4%
distribute-frac-neg62.4%
distribute-neg-frac262.4%
neg-sub062.0%
associate--r-62.0%
neg-sub062.9%
+-commutative62.9%
fma-define78.5%
*-commutative78.5%
distribute-rgt-neg-in78.5%
metadata-eval78.5%
Simplified78.5%
Taylor expanded in y around inf 100.0%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ x (/ -1.0 x))
(+
x
(/
y
(-
1.1283791670955126
(+
(* x y)
(*
z
(-
(* z (- (* z -0.18806319451591877) 0.5641895835477563))
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 / (1.1283791670955126 - ((x * y) + (z * ((z * ((z * -0.18806319451591877) - 0.5641895835477563)) - 1.1283791670955126)))));
}
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
tmp = x + (y / (1.1283791670955126d0 - ((x * y) + (z * ((z * ((z * (-0.18806319451591877d0)) - 0.5641895835477563d0)) - 1.1283791670955126d0)))))
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 {
tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * ((z * ((z * -0.18806319451591877) - 0.5641895835477563)) - 1.1283791670955126)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if math.exp(z) <= 0.0: tmp = x + (-1.0 / x) else: tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * ((z * ((z * -0.18806319451591877) - 0.5641895835477563)) - 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 / Float64(1.1283791670955126 - Float64(Float64(x * y) + Float64(z * Float64(Float64(z * Float64(Float64(z * -0.18806319451591877) - 0.5641895835477563)) - 1.1283791670955126)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (exp(z) <= 0.0) tmp = x + (-1.0 / x); else tmp = x + (y / (1.1283791670955126 - ((x * y) + (z * ((z * ((z * -0.18806319451591877) - 0.5641895835477563)) - 1.1283791670955126))))); 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], N[(x + N[(y / N[(1.1283791670955126 - N[(N[(x * y), $MachinePrecision] + N[(z * N[(N[(z * N[(N[(z * -0.18806319451591877), $MachinePrecision] - 0.5641895835477563), $MachinePrecision]), $MachinePrecision] - 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $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}{1.1283791670955126 - \left(x \cdot y + z \cdot \left(z \cdot \left(z \cdot -0.18806319451591877 - 0.5641895835477563\right) - 1.1283791670955126\right)\right)}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 84.0%
remove-double-neg84.0%
distribute-frac-neg84.0%
unsub-neg84.0%
distribute-frac-neg84.0%
distribute-neg-frac284.0%
neg-sub083.7%
associate--r-83.7%
neg-sub084.3%
+-commutative84.3%
fma-define84.3%
*-commutative84.3%
distribute-rgt-neg-in84.3%
metadata-eval84.3%
Simplified84.3%
Taylor expanded in y around inf 100.0%
if 0.0 < (exp.f64 z) Initial program 97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
unsub-neg97.4%
distribute-frac-neg97.4%
distribute-neg-frac297.4%
neg-sub097.4%
associate--r-97.4%
neg-sub097.4%
+-commutative97.4%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 97.9%
Final simplification98.4%
(FPCore (x y z)
:precision binary64
(if (<= z -360000.0)
(+ x (/ -1.0 x))
(if (<= z 140.0)
(- x (/ y (- (+ (* x y) (* z -1.1283791670955126)) 1.1283791670955126)))
x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -360000.0) {
tmp = x + (-1.0 / x);
} else if (z <= 140.0) {
tmp = x - (y / (((x * y) + (z * -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 (z <= (-360000.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 140.0d0) then
tmp = x - (y / (((x * y) + (z * (-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 (z <= -360000.0) {
tmp = x + (-1.0 / x);
} else if (z <= 140.0) {
tmp = x - (y / (((x * y) + (z * -1.1283791670955126)) - 1.1283791670955126));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -360000.0: tmp = x + (-1.0 / x) elif z <= 140.0: tmp = x - (y / (((x * y) + (z * -1.1283791670955126)) - 1.1283791670955126)) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -360000.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 140.0) tmp = Float64(x - Float64(y / Float64(Float64(Float64(x * y) + Float64(z * -1.1283791670955126)) - 1.1283791670955126))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -360000.0) tmp = x + (-1.0 / x); elseif (z <= 140.0) tmp = x - (y / (((x * y) + (z * -1.1283791670955126)) - 1.1283791670955126)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -360000.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 140.0], N[(x - N[(y / N[(N[(N[(x * y), $MachinePrecision] + N[(z * -1.1283791670955126), $MachinePrecision]), $MachinePrecision] - 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -360000:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 140:\\
\;\;\;\;x - \frac{y}{\left(x \cdot y + z \cdot -1.1283791670955126\right) - 1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.6e5Initial program 83.7%
remove-double-neg83.7%
distribute-frac-neg83.7%
unsub-neg83.7%
distribute-frac-neg83.7%
distribute-neg-frac283.7%
neg-sub083.4%
associate--r-83.4%
neg-sub084.1%
+-commutative84.1%
fma-define84.1%
*-commutative84.1%
distribute-rgt-neg-in84.1%
metadata-eval84.1%
Simplified84.1%
Taylor expanded in y around inf 100.0%
if -3.6e5 < z < 140Initial 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.7%
if 140 < z Initial program 91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
unsub-neg91.7%
distribute-frac-neg91.7%
distribute-neg-frac291.7%
neg-sub091.7%
associate--r-91.7%
neg-sub091.7%
+-commutative91.7%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 47.5%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -4.2e-14) (and (not (<= z 2.8e-88)) (<= z 0.155))) (+ x (/ -1.0 x)) x))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.2e-14) || (!(z <= 2.8e-88) && (z <= 0.155))) {
tmp = x + (-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 ((z <= (-4.2d-14)) .or. (.not. (z <= 2.8d-88)) .and. (z <= 0.155d0)) then
tmp = x + ((-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 ((z <= -4.2e-14) || (!(z <= 2.8e-88) && (z <= 0.155))) {
tmp = x + (-1.0 / x);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.2e-14) or (not (z <= 2.8e-88) and (z <= 0.155)): tmp = x + (-1.0 / x) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.2e-14) || (!(z <= 2.8e-88) && (z <= 0.155))) tmp = Float64(x + Float64(-1.0 / x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.2e-14) || (~((z <= 2.8e-88)) && (z <= 0.155))) tmp = x + (-1.0 / x); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.2e-14], And[N[Not[LessEqual[z, 2.8e-88]], $MachinePrecision], LessEqual[z, 0.155]]], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-14} \lor \neg \left(z \leq 2.8 \cdot 10^{-88}\right) \land z \leq 0.155:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.1999999999999998e-14 or 2.79999999999999976e-88 < z < 0.154999999999999999Initial program 88.7%
remove-double-neg88.7%
distribute-frac-neg88.7%
unsub-neg88.7%
distribute-frac-neg88.7%
distribute-neg-frac288.7%
neg-sub088.5%
associate--r-88.5%
neg-sub089.0%
+-commutative89.0%
fma-define89.0%
*-commutative89.0%
distribute-rgt-neg-in89.0%
metadata-eval89.0%
Simplified89.0%
Taylor expanded in y around inf 89.7%
if -4.1999999999999998e-14 < z < 2.79999999999999976e-88 or 0.154999999999999999 < z Initial program 97.0%
remove-double-neg97.0%
distribute-frac-neg97.0%
unsub-neg97.0%
distribute-frac-neg97.0%
distribute-neg-frac297.0%
neg-sub097.0%
associate--r-97.0%
neg-sub097.0%
+-commutative97.0%
fma-define99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 52.3%
Taylor expanded in x around inf 76.5%
Final simplification80.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.000135) (+ x (/ -1.0 x)) (if (<= z 9e-14) (+ x (* -0.8862269254527579 (- (* z y) y))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.000135) {
tmp = x + (-1.0 / x);
} else if (z <= 9e-14) {
tmp = x + (-0.8862269254527579 * ((z * y) - 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 <= (-0.000135d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 9d-14) then
tmp = x + ((-0.8862269254527579d0) * ((z * y) - y))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.000135) {
tmp = x + (-1.0 / x);
} else if (z <= 9e-14) {
tmp = x + (-0.8862269254527579 * ((z * y) - y));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.000135: tmp = x + (-1.0 / x) elif z <= 9e-14: tmp = x + (-0.8862269254527579 * ((z * y) - y)) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.000135) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 9e-14) tmp = Float64(x + Float64(-0.8862269254527579 * Float64(Float64(z * y) - y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.000135) tmp = x + (-1.0 / x); elseif (z <= 9e-14) tmp = x + (-0.8862269254527579 * ((z * y) - y)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.000135], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-14], N[(x + N[(-0.8862269254527579 * N[(N[(z * y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000135:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-14}:\\
\;\;\;\;x + -0.8862269254527579 \cdot \left(z \cdot y - y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.35000000000000002e-4Initial program 84.5%
remove-double-neg84.5%
distribute-frac-neg84.5%
unsub-neg84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
neg-sub084.2%
associate--r-84.2%
neg-sub084.9%
+-commutative84.9%
fma-define84.9%
*-commutative84.9%
distribute-rgt-neg-in84.9%
metadata-eval84.9%
Simplified84.9%
Taylor expanded in y around inf 100.0%
if -1.35000000000000002e-4 < z < 8.9999999999999995e-14Initial 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 y around 0 78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in z around 0 78.9%
mul-1-neg78.9%
unsub-neg78.9%
Simplified78.9%
if 8.9999999999999995e-14 < z Initial program 92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
unsub-neg92.1%
distribute-frac-neg92.1%
distribute-neg-frac292.1%
neg-sub092.1%
associate--r-92.1%
neg-sub092.1%
+-commutative92.1%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 49.2%
Taylor expanded in x around inf 98.4%
Final simplification88.5%
(FPCore (x y z)
:precision binary64
(if (<= z -0.000182)
(+ x (/ -1.0 x))
(if (<= z 3.8e-14)
(- x (/ y (- (* z -1.1283791670955126) 1.1283791670955126)))
x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.000182) {
tmp = x + (-1.0 / x);
} else if (z <= 3.8e-14) {
tmp = x - (y / ((z * -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 (z <= (-0.000182d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 3.8d-14) then
tmp = x - (y / ((z * (-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 (z <= -0.000182) {
tmp = x + (-1.0 / x);
} else if (z <= 3.8e-14) {
tmp = x - (y / ((z * -1.1283791670955126) - 1.1283791670955126));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.000182: tmp = x + (-1.0 / x) elif z <= 3.8e-14: tmp = x - (y / ((z * -1.1283791670955126) - 1.1283791670955126)) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.000182) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 3.8e-14) tmp = Float64(x - Float64(y / Float64(Float64(z * -1.1283791670955126) - 1.1283791670955126))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.000182) tmp = x + (-1.0 / x); elseif (z <= 3.8e-14) tmp = x - (y / ((z * -1.1283791670955126) - 1.1283791670955126)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.000182], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-14], N[(x - N[(y / N[(N[(z * -1.1283791670955126), $MachinePrecision] - 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.000182:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-14}:\\
\;\;\;\;x - \frac{y}{z \cdot -1.1283791670955126 - 1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.82000000000000006e-4Initial program 84.5%
remove-double-neg84.5%
distribute-frac-neg84.5%
unsub-neg84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
neg-sub084.2%
associate--r-84.2%
neg-sub084.9%
+-commutative84.9%
fma-define84.9%
*-commutative84.9%
distribute-rgt-neg-in84.9%
metadata-eval84.9%
Simplified84.9%
Taylor expanded in y around inf 100.0%
if -1.82000000000000006e-4 < z < 3.8000000000000002e-14Initial 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.8%
Taylor expanded in y around 0 79.0%
if 3.8000000000000002e-14 < z Initial program 92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
unsub-neg92.1%
distribute-frac-neg92.1%
distribute-neg-frac292.1%
neg-sub092.1%
associate--r-92.1%
neg-sub092.1%
+-commutative92.1%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 49.2%
Taylor expanded in x around inf 98.4%
Final simplification88.5%
(FPCore (x y z) :precision binary64 (if (<= z -360000.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 <= -360000.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 <= (-360000.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 <= -360000.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 <= -360000.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 <= -360000.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 <= -360000.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, -360000.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 -360000:\\
\;\;\;\;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 < -3.6e5Initial program 83.7%
remove-double-neg83.7%
distribute-frac-neg83.7%
unsub-neg83.7%
distribute-frac-neg83.7%
distribute-neg-frac283.7%
neg-sub083.4%
associate--r-83.4%
neg-sub084.1%
+-commutative84.1%
fma-define84.1%
*-commutative84.1%
distribute-rgt-neg-in84.1%
metadata-eval84.1%
Simplified84.1%
Taylor expanded in y around inf 100.0%
if -3.6e5 < 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.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 98.7%
if 200 < z Initial program 91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
unsub-neg91.7%
distribute-frac-neg91.7%
distribute-neg-frac291.7%
neg-sub091.7%
associate--r-91.7%
neg-sub091.7%
+-commutative91.7%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 47.5%
Taylor expanded in x around inf 100.0%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (<= z -0.00065) (+ x (/ -1.0 x)) (if (<= z 9.2e-14) (- x (/ y -1.1283791670955126)) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.00065) {
tmp = x + (-1.0 / x);
} else if (z <= 9.2e-14) {
tmp = x - (y / -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 (z <= (-0.00065d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 9.2d-14) then
tmp = x - (y / (-1.1283791670955126d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.00065) {
tmp = x + (-1.0 / x);
} else if (z <= 9.2e-14) {
tmp = x - (y / -1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.00065: tmp = x + (-1.0 / x) elif z <= 9.2e-14: tmp = x - (y / -1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.00065) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 9.2e-14) tmp = Float64(x - Float64(y / -1.1283791670955126)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.00065) tmp = x + (-1.0 / x); elseif (z <= 9.2e-14) tmp = x - (y / -1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.00065], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e-14], N[(x - N[(y / -1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00065:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-14}:\\
\;\;\;\;x - \frac{y}{-1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.4999999999999997e-4Initial program 84.5%
remove-double-neg84.5%
distribute-frac-neg84.5%
unsub-neg84.5%
distribute-frac-neg84.5%
distribute-neg-frac284.5%
neg-sub084.2%
associate--r-84.2%
neg-sub084.9%
+-commutative84.9%
fma-define84.9%
*-commutative84.9%
distribute-rgt-neg-in84.9%
metadata-eval84.9%
Simplified84.9%
Taylor expanded in y around inf 100.0%
if -6.4999999999999997e-4 < z < 9.19999999999999993e-14Initial 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 98.9%
Taylor expanded in x around 0 78.1%
if 9.19999999999999993e-14 < z Initial program 92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
unsub-neg92.1%
distribute-frac-neg92.1%
distribute-neg-frac292.1%
neg-sub092.1%
associate--r-92.1%
neg-sub092.1%
+-commutative92.1%
fma-define100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 49.2%
Taylor expanded in x around inf 98.4%
Final simplification88.1%
(FPCore (x y z) :precision binary64 (if (<= x -1.95e-263) x (if (<= x 1.35e-161) (* y 0.8862269254527579) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.95e-263) {
tmp = x;
} else if (x <= 1.35e-161) {
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 <= (-1.95d-263)) then
tmp = x
else if (x <= 1.35d-161) 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 <= -1.95e-263) {
tmp = x;
} else if (x <= 1.35e-161) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.95e-263: tmp = x elif x <= 1.35e-161: tmp = y * 0.8862269254527579 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.95e-263) tmp = x; elseif (x <= 1.35e-161) tmp = Float64(y * 0.8862269254527579); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.95e-263) tmp = x; elseif (x <= 1.35e-161) tmp = y * 0.8862269254527579; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.95e-263], x, If[LessEqual[x, 1.35e-161], N[(y * 0.8862269254527579), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{-263}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-161}:\\
\;\;\;\;y \cdot 0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.94999999999999985e-263 or 1.35e-161 < x Initial program 95.6%
remove-double-neg95.6%
distribute-frac-neg95.6%
unsub-neg95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
neg-sub095.5%
associate--r-95.5%
neg-sub095.6%
+-commutative95.6%
fma-define98.0%
*-commutative98.0%
distribute-rgt-neg-in98.0%
metadata-eval98.0%
Simplified98.0%
Taylor expanded in y around inf 71.5%
Taylor expanded in x around inf 74.7%
if -1.94999999999999985e-263 < x < 1.35e-161Initial program 89.2%
remove-double-neg89.2%
distribute-frac-neg89.2%
unsub-neg89.2%
distribute-frac-neg89.2%
distribute-neg-frac289.2%
neg-sub088.9%
associate--r-88.9%
neg-sub089.5%
+-commutative89.5%
fma-define89.5%
*-commutative89.5%
distribute-rgt-neg-in89.5%
metadata-eval89.5%
Simplified89.5%
Taylor expanded in z around 0 59.2%
Taylor expanded in x around 0 51.3%
*-commutative51.3%
Simplified51.3%
Final simplification70.6%
(FPCore (x y z) :precision binary64 (if (<= x -1.36e-263) x (if (<= x 4.2e-189) (/ y 1.1283791670955126) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.36e-263) {
tmp = x;
} else if (x <= 4.2e-189) {
tmp = y / 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 (x <= (-1.36d-263)) then
tmp = x
else if (x <= 4.2d-189) then
tmp = y / 1.1283791670955126d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.36e-263) {
tmp = x;
} else if (x <= 4.2e-189) {
tmp = y / 1.1283791670955126;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.36e-263: tmp = x elif x <= 4.2e-189: tmp = y / 1.1283791670955126 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.36e-263) tmp = x; elseif (x <= 4.2e-189) tmp = Float64(y / 1.1283791670955126); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.36e-263) tmp = x; elseif (x <= 4.2e-189) tmp = y / 1.1283791670955126; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.36e-263], x, If[LessEqual[x, 4.2e-189], N[(y / 1.1283791670955126), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.36 \cdot 10^{-263}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-189}:\\
\;\;\;\;\frac{y}{1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.3599999999999999e-263 or 4.20000000000000033e-189 < x Initial program 95.6%
remove-double-neg95.6%
distribute-frac-neg95.6%
unsub-neg95.6%
distribute-frac-neg95.6%
distribute-neg-frac295.6%
neg-sub095.6%
associate--r-95.6%
neg-sub095.7%
+-commutative95.7%
fma-define98.0%
*-commutative98.0%
distribute-rgt-neg-in98.0%
metadata-eval98.0%
Simplified98.0%
Taylor expanded in y around inf 70.2%
Taylor expanded in x around inf 74.3%
if -1.3599999999999999e-263 < x < 4.20000000000000033e-189Initial program 88.2%
remove-double-neg88.2%
distribute-frac-neg88.2%
unsub-neg88.2%
distribute-frac-neg88.2%
distribute-neg-frac288.2%
neg-sub087.9%
associate--r-87.9%
neg-sub088.5%
+-commutative88.5%
fma-define88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
metadata-eval88.5%
Simplified88.5%
Taylor expanded in z around 0 60.0%
Taylor expanded in x around 0 51.3%
*-commutative51.3%
Simplified51.3%
metadata-eval51.3%
distribute-rgt-neg-in51.3%
metadata-eval51.3%
div-inv51.4%
distribute-neg-frac251.4%
metadata-eval51.4%
Applied egg-rr51.4%
Final simplification70.6%
(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.4%
remove-double-neg94.4%
distribute-frac-neg94.4%
unsub-neg94.4%
distribute-frac-neg94.4%
distribute-neg-frac294.4%
neg-sub094.4%
associate--r-94.4%
neg-sub094.5%
+-commutative94.5%
fma-define96.5%
*-commutative96.5%
distribute-rgt-neg-in96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in y around inf 64.0%
Taylor expanded in x around inf 65.8%
Final simplification65.8%
(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 2024076
(FPCore (x y z)
:name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
:precision binary64
:alt
(+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))
(+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))