
(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 12 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 (+ x (/ -1.0 (fma (exp z) (/ -1.1283791670955126 y) x))))
double code(double x, double y, double z) {
return x + (-1.0 / fma(exp(z), (-1.1283791670955126 / y), x));
}
function code(x, y, z) return Float64(x + Float64(-1.0 / fma(exp(z), Float64(-1.1283791670955126 / y), x))) end
code[x_, y_, z_] := N[(x + N[(-1.0 / N[(N[Exp[z], $MachinePrecision] * N[(-1.1283791670955126 / y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}
\end{array}
Initial program 95.7%
*-lft-identity95.7%
metadata-eval95.7%
times-frac95.7%
neg-mul-195.7%
sub0-neg95.6%
associate-+l-95.6%
neg-sub095.7%
+-commutative95.7%
sub-neg95.7%
associate-/l*95.8%
div-sub95.8%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.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.2)
(+
x
(/
-1.0
(+
(+ x (* -1.1283791670955126 (/ z y)))
(* 1.1283791670955126 (/ -1.0 y)))))
(+ x (* 0.8862269254527579 (/ y (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.2) {
tmp = x + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y))));
} else {
tmp = x + (0.8862269254527579 * (y / exp(z)));
}
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) <= 1.2d0) then
tmp = x + ((-1.0d0) / ((x + ((-1.1283791670955126d0) * (z / y))) + (1.1283791670955126d0 * ((-1.0d0) / y))))
else
tmp = x + (0.8862269254527579d0 * (y / exp(z)))
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) <= 1.2) {
tmp = x + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y))));
} else {
tmp = x + (0.8862269254527579 * (y / Math.exp(z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if math.exp(z) <= 0.0: tmp = x + (-1.0 / x) elif math.exp(z) <= 1.2: tmp = x + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y)))) else: tmp = x + (0.8862269254527579 * (y / math.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.2) tmp = Float64(x + Float64(-1.0 / Float64(Float64(x + Float64(-1.1283791670955126 * Float64(z / y))) + Float64(1.1283791670955126 * Float64(-1.0 / y))))); else tmp = Float64(x + Float64(0.8862269254527579 * Float64(y / exp(z)))); 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) <= 1.2) tmp = x + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y)))); else tmp = x + (0.8862269254527579 * (y / exp(z))); 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], 1.2], N[(x + N[(-1.0 / N[(N[(x + N[(-1.1283791670955126 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.1283791670955126 * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.8862269254527579 * N[(y / N[Exp[z], $MachinePrecision]), $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.2:\\
\;\;\;\;x + \frac{-1}{\left(x + -1.1283791670955126 \cdot \frac{z}{y}\right) + 1.1283791670955126 \cdot \frac{-1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + 0.8862269254527579 \cdot \frac{y}{e^{z}}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.0%
*-lft-identity89.0%
metadata-eval89.0%
times-frac89.0%
neg-mul-189.0%
sub0-neg88.5%
associate-+l-88.5%
neg-sub089.0%
+-commutative89.0%
sub-neg89.0%
associate-/l*89.1%
div-sub89.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 0.0 < (exp.f64 z) < 1.19999999999999996Initial program 99.8%
*-lft-identity99.8%
metadata-eval99.8%
times-frac99.8%
neg-mul-199.8%
sub0-neg99.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
sub-neg99.8%
associate-/l*99.9%
div-sub99.9%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
if 1.19999999999999996 < (exp.f64 z) Initial program 94.2%
*-lft-identity94.2%
metadata-eval94.2%
times-frac94.2%
neg-mul-194.2%
sub0-neg94.2%
associate-+l-94.2%
neg-sub094.2%
+-commutative94.2%
sub-neg94.2%
associate-/l*94.2%
div-sub94.2%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in y around 0 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 2e+163) 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+163) {
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+163) 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+163) {
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+163: 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+163) 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+163) 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+163], 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^{+163}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{x}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 y (-.f64 (*.f64 5641895835477563/5000000000000000 (exp.f64 z)) (*.f64 x y)))) < 1.9999999999999999e163Initial program 99.0%
if 1.9999999999999999e163 < (+.f64 x (/.f64 y (-.f64 (*.f64 5641895835477563/5000000000000000 (exp.f64 z)) (*.f64 x y)))) Initial program 80.0%
*-lft-identity80.0%
metadata-eval80.0%
times-frac80.0%
neg-mul-180.0%
sub0-neg79.6%
associate-+l-79.6%
neg-sub080.1%
+-commutative80.1%
sub-neg80.1%
associate-/l*80.1%
div-sub80.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ x (/ -1.0 x))
(if (<= (exp z) 2.0)
(+
x
(/
-1.0
(+
(+ x (* -1.1283791670955126 (/ z y)))
(* 1.1283791670955126 (/ -1.0 y)))))
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 + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / 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 (exp(z) <= 0.0d0) then
tmp = x + ((-1.0d0) / x)
else if (exp(z) <= 2.0d0) then
tmp = x + ((-1.0d0) / ((x + ((-1.1283791670955126d0) * (z / y))) + (1.1283791670955126d0 * ((-1.0d0) / y))))
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 + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y))));
} 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 + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y)))) 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(-1.0 / Float64(Float64(x + Float64(-1.1283791670955126 * Float64(z / y))) + Float64(1.1283791670955126 * Float64(-1.0 / y))))); 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 + (-1.0 / ((x + (-1.1283791670955126 * (z / y))) + (1.1283791670955126 * (-1.0 / y)))); 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[(-1.0 / N[(N[(x + N[(-1.1283791670955126 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.1283791670955126 * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $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{-1}{\left(x + -1.1283791670955126 \cdot \frac{z}{y}\right) + 1.1283791670955126 \cdot \frac{-1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.0%
*-lft-identity89.0%
metadata-eval89.0%
times-frac89.0%
neg-mul-189.0%
sub0-neg88.5%
associate-+l-88.5%
neg-sub089.0%
+-commutative89.0%
sub-neg89.0%
associate-/l*89.1%
div-sub89.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 0.0 < (exp.f64 z) < 2Initial program 99.8%
*-lft-identity99.8%
metadata-eval99.8%
times-frac99.8%
neg-mul-199.8%
sub0-neg99.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
sub-neg99.8%
associate-/l*99.9%
div-sub99.9%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 99.2%
if 2 < (exp.f64 z) Initial program 94.1%
*-lft-identity94.1%
metadata-eval94.1%
times-frac94.1%
neg-mul-194.1%
sub0-neg94.1%
associate-+l-94.1%
neg-sub094.1%
+-commutative94.1%
sub-neg94.1%
associate-/l*94.1%
div-sub94.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 77.0%
Taylor expanded in x around inf 100.0%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -1.25e+26)
(+ x (/ -1.0 x))
(if (<= z 5.4)
(+ x (/ y (- (+ 1.1283791670955126 (* z 1.1283791670955126)) (* x y))))
x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+26) {
tmp = x + (-1.0 / x);
} else if (z <= 5.4) {
tmp = x + (y / ((1.1283791670955126 + (z * 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 <= (-1.25d+26)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 5.4d0) then
tmp = x + (y / ((1.1283791670955126d0 + (z * 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 <= -1.25e+26) {
tmp = x + (-1.0 / x);
} else if (z <= 5.4) {
tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.25e+26: tmp = x + (-1.0 / x) elif z <= 5.4: tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.25e+26) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 5.4) tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 + Float64(z * 1.1283791670955126)) - Float64(x * y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.25e+26) tmp = x + (-1.0 / x); elseif (z <= 5.4) tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.25e+26], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4], N[(x + N[(y / N[(N[(1.1283791670955126 + N[(z * 1.1283791670955126), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 5.4:\\
\;\;\;\;x + \frac{y}{\left(1.1283791670955126 + z \cdot 1.1283791670955126\right) - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.25e26Initial program 88.0%
*-lft-identity88.0%
metadata-eval88.0%
times-frac88.0%
neg-mul-188.0%
sub0-neg87.5%
associate-+l-87.5%
neg-sub088.1%
+-commutative88.1%
sub-neg88.1%
associate-/l*88.2%
div-sub88.2%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -1.25e26 < z < 5.4000000000000004Initial program 99.8%
Taylor expanded in z around 0 99.2%
if 5.4000000000000004 < z Initial program 94.1%
*-lft-identity94.1%
metadata-eval94.1%
times-frac94.1%
neg-mul-194.1%
sub0-neg94.1%
associate-+l-94.1%
neg-sub094.1%
+-commutative94.1%
sub-neg94.1%
associate-/l*94.1%
div-sub94.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 77.0%
Taylor expanded in x around inf 100.0%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ -1.0 x))))
(if (<= z -20.5)
t_0
(if (<= z 3.1e-109)
(- x (* y -0.8862269254527579))
(if (<= z 5.2e-45)
t_0
(if (<= z 3.9e-23) (+ x (/ y 1.1283791670955126)) x))))))
double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double tmp;
if (z <= -20.5) {
tmp = t_0;
} else if (z <= 3.1e-109) {
tmp = x - (y * -0.8862269254527579);
} else if (z <= 5.2e-45) {
tmp = t_0;
} else if (z <= 3.9e-23) {
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) :: t_0
real(8) :: tmp
t_0 = x + ((-1.0d0) / x)
if (z <= (-20.5d0)) then
tmp = t_0
else if (z <= 3.1d-109) then
tmp = x - (y * (-0.8862269254527579d0))
else if (z <= 5.2d-45) then
tmp = t_0
else if (z <= 3.9d-23) 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 t_0 = x + (-1.0 / x);
double tmp;
if (z <= -20.5) {
tmp = t_0;
} else if (z <= 3.1e-109) {
tmp = x - (y * -0.8862269254527579);
} else if (z <= 5.2e-45) {
tmp = t_0;
} else if (z <= 3.9e-23) {
tmp = x + (y / 1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): t_0 = x + (-1.0 / x) tmp = 0 if z <= -20.5: tmp = t_0 elif z <= 3.1e-109: tmp = x - (y * -0.8862269254527579) elif z <= 5.2e-45: tmp = t_0 elif z <= 3.9e-23: tmp = x + (y / 1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) t_0 = Float64(x + Float64(-1.0 / x)) tmp = 0.0 if (z <= -20.5) tmp = t_0; elseif (z <= 3.1e-109) tmp = Float64(x - Float64(y * -0.8862269254527579)); elseif (z <= 5.2e-45) tmp = t_0; elseif (z <= 3.9e-23) tmp = Float64(x + Float64(y / 1.1283791670955126)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (-1.0 / x); tmp = 0.0; if (z <= -20.5) tmp = t_0; elseif (z <= 3.1e-109) tmp = x - (y * -0.8862269254527579); elseif (z <= 5.2e-45) tmp = t_0; elseif (z <= 3.9e-23) tmp = x + (y / 1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -20.5], t$95$0, If[LessEqual[z, 3.1e-109], N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-45], t$95$0, If[LessEqual[z, 3.9e-23], N[(x + N[(y / 1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
\mathbf{if}\;z \leq -20.5:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-109}:\\
\;\;\;\;x - y \cdot -0.8862269254527579\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{y}{1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -20.5 or 3.1e-109 < z < 5.19999999999999973e-45Initial program 91.6%
*-lft-identity91.6%
metadata-eval91.6%
times-frac91.6%
neg-mul-191.6%
sub0-neg91.2%
associate-+l-91.2%
neg-sub091.6%
+-commutative91.6%
sub-neg91.6%
associate-/l*91.7%
div-sub91.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 96.3%
if -20.5 < z < 3.1e-109Initial program 99.7%
*-lft-identity99.7%
metadata-eval99.7%
times-frac99.7%
neg-mul-199.7%
sub0-neg99.7%
associate-+l-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
associate-/l*99.9%
div-sub99.9%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 80.1%
*-commutative80.1%
Simplified80.1%
if 5.19999999999999973e-45 < z < 3.9e-23Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in y around 0 92.7%
if 3.9e-23 < z Initial program 94.7%
*-lft-identity94.7%
metadata-eval94.7%
times-frac94.7%
neg-mul-194.7%
sub0-neg94.7%
associate-+l-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
associate-/l*94.7%
div-sub94.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 78.4%
Taylor expanded in x around inf 97.2%
Final simplification90.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ -1.0 x))))
(if (<= z -2.3e-6)
t_0
(if (<= z 1.46e-108)
(+ x (/ -1.0 (/ -1.1283791670955126 y)))
(if (<= z 5.3e-45)
t_0
(if (<= z 3.5e-22) (+ x (/ y 1.1283791670955126)) x))))))
double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double tmp;
if (z <= -2.3e-6) {
tmp = t_0;
} else if (z <= 1.46e-108) {
tmp = x + (-1.0 / (-1.1283791670955126 / y));
} else if (z <= 5.3e-45) {
tmp = t_0;
} else if (z <= 3.5e-22) {
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) :: t_0
real(8) :: tmp
t_0 = x + ((-1.0d0) / x)
if (z <= (-2.3d-6)) then
tmp = t_0
else if (z <= 1.46d-108) then
tmp = x + ((-1.0d0) / ((-1.1283791670955126d0) / y))
else if (z <= 5.3d-45) then
tmp = t_0
else if (z <= 3.5d-22) 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 t_0 = x + (-1.0 / x);
double tmp;
if (z <= -2.3e-6) {
tmp = t_0;
} else if (z <= 1.46e-108) {
tmp = x + (-1.0 / (-1.1283791670955126 / y));
} else if (z <= 5.3e-45) {
tmp = t_0;
} else if (z <= 3.5e-22) {
tmp = x + (y / 1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): t_0 = x + (-1.0 / x) tmp = 0 if z <= -2.3e-6: tmp = t_0 elif z <= 1.46e-108: tmp = x + (-1.0 / (-1.1283791670955126 / y)) elif z <= 5.3e-45: tmp = t_0 elif z <= 3.5e-22: tmp = x + (y / 1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) t_0 = Float64(x + Float64(-1.0 / x)) tmp = 0.0 if (z <= -2.3e-6) tmp = t_0; elseif (z <= 1.46e-108) tmp = Float64(x + Float64(-1.0 / Float64(-1.1283791670955126 / y))); elseif (z <= 5.3e-45) tmp = t_0; elseif (z <= 3.5e-22) tmp = Float64(x + Float64(y / 1.1283791670955126)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (-1.0 / x); tmp = 0.0; if (z <= -2.3e-6) tmp = t_0; elseif (z <= 1.46e-108) tmp = x + (-1.0 / (-1.1283791670955126 / y)); elseif (z <= 5.3e-45) tmp = t_0; elseif (z <= 3.5e-22) tmp = x + (y / 1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e-6], t$95$0, If[LessEqual[z, 1.46e-108], N[(x + N[(-1.0 / N[(-1.1283791670955126 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e-45], t$95$0, If[LessEqual[z, 3.5e-22], N[(x + N[(y / 1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.46 \cdot 10^{-108}:\\
\;\;\;\;x + \frac{-1}{\frac{-1.1283791670955126}{y}}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-45}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-22}:\\
\;\;\;\;x + \frac{y}{1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.3e-6 or 1.4600000000000001e-108 < z < 5.2999999999999997e-45Initial program 91.6%
*-lft-identity91.6%
metadata-eval91.6%
times-frac91.6%
neg-mul-191.6%
sub0-neg91.2%
associate-+l-91.2%
neg-sub091.6%
+-commutative91.6%
sub-neg91.6%
associate-/l*91.7%
div-sub91.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 96.3%
if -2.3e-6 < z < 1.4600000000000001e-108Initial program 99.7%
*-lft-identity99.7%
metadata-eval99.7%
times-frac99.7%
neg-mul-199.7%
sub0-neg99.7%
associate-+l-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
associate-/l*99.9%
div-sub99.9%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 80.1%
if 5.2999999999999997e-45 < z < 3.50000000000000005e-22Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in y around 0 92.7%
if 3.50000000000000005e-22 < z Initial program 94.7%
*-lft-identity94.7%
metadata-eval94.7%
times-frac94.7%
neg-mul-194.7%
sub0-neg94.7%
associate-+l-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
associate-/l*94.7%
div-sub94.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 78.4%
Taylor expanded in x around inf 97.2%
Final simplification90.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ -1.0 x))))
(if (<= z -0.00036)
t_0
(if (<= z 5.1e-109)
(+ x (* 0.8862269254527579 (- y (* z y))))
(if (<= z 5.2e-45)
t_0
(if (<= z 1.15e-24) (+ x (/ y 1.1283791670955126)) x))))))
double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double tmp;
if (z <= -0.00036) {
tmp = t_0;
} else if (z <= 5.1e-109) {
tmp = x + (0.8862269254527579 * (y - (z * y)));
} else if (z <= 5.2e-45) {
tmp = t_0;
} else if (z <= 1.15e-24) {
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) :: t_0
real(8) :: tmp
t_0 = x + ((-1.0d0) / x)
if (z <= (-0.00036d0)) then
tmp = t_0
else if (z <= 5.1d-109) then
tmp = x + (0.8862269254527579d0 * (y - (z * y)))
else if (z <= 5.2d-45) then
tmp = t_0
else if (z <= 1.15d-24) 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 t_0 = x + (-1.0 / x);
double tmp;
if (z <= -0.00036) {
tmp = t_0;
} else if (z <= 5.1e-109) {
tmp = x + (0.8862269254527579 * (y - (z * y)));
} else if (z <= 5.2e-45) {
tmp = t_0;
} else if (z <= 1.15e-24) {
tmp = x + (y / 1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): t_0 = x + (-1.0 / x) tmp = 0 if z <= -0.00036: tmp = t_0 elif z <= 5.1e-109: tmp = x + (0.8862269254527579 * (y - (z * y))) elif z <= 5.2e-45: tmp = t_0 elif z <= 1.15e-24: tmp = x + (y / 1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) t_0 = Float64(x + Float64(-1.0 / x)) tmp = 0.0 if (z <= -0.00036) tmp = t_0; elseif (z <= 5.1e-109) tmp = Float64(x + Float64(0.8862269254527579 * Float64(y - Float64(z * y)))); elseif (z <= 5.2e-45) tmp = t_0; elseif (z <= 1.15e-24) tmp = Float64(x + Float64(y / 1.1283791670955126)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (-1.0 / x); tmp = 0.0; if (z <= -0.00036) tmp = t_0; elseif (z <= 5.1e-109) tmp = x + (0.8862269254527579 * (y - (z * y))); elseif (z <= 5.2e-45) tmp = t_0; elseif (z <= 1.15e-24) tmp = x + (y / 1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.00036], t$95$0, If[LessEqual[z, 5.1e-109], N[(x + N[(0.8862269254527579 * N[(y - N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-45], t$95$0, If[LessEqual[z, 1.15e-24], N[(x + N[(y / 1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
\mathbf{if}\;z \leq -0.00036:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-109}:\\
\;\;\;\;x + 0.8862269254527579 \cdot \left(y - z \cdot y\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-45}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-24}:\\
\;\;\;\;x + \frac{y}{1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.60000000000000023e-4 or 5.10000000000000041e-109 < z < 5.19999999999999973e-45Initial program 91.6%
*-lft-identity91.6%
metadata-eval91.6%
times-frac91.6%
neg-mul-191.6%
sub0-neg91.2%
associate-+l-91.2%
neg-sub091.6%
+-commutative91.6%
sub-neg91.6%
associate-/l*91.7%
div-sub91.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 96.3%
if -3.60000000000000023e-4 < z < 5.10000000000000041e-109Initial program 99.7%
*-lft-identity99.7%
metadata-eval99.7%
times-frac99.7%
neg-mul-199.7%
sub0-neg99.7%
associate-+l-99.7%
neg-sub099.7%
+-commutative99.7%
sub-neg99.7%
associate-/l*99.9%
div-sub99.9%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in y around 0 80.3%
Taylor expanded in z around 0 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
Simplified80.3%
if 5.19999999999999973e-45 < z < 1.1500000000000001e-24Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in y around 0 92.7%
if 1.1500000000000001e-24 < z Initial program 94.7%
*-lft-identity94.7%
metadata-eval94.7%
times-frac94.7%
neg-mul-194.7%
sub0-neg94.7%
associate-+l-94.7%
neg-sub094.7%
+-commutative94.7%
sub-neg94.7%
associate-/l*94.7%
div-sub94.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 78.4%
Taylor expanded in x around inf 97.2%
Final simplification90.5%
(FPCore (x y z) :precision binary64 (if (<= z -1.25e+26) (+ x (/ -1.0 x)) (if (<= z 5.4) (+ x (/ y (- 1.1283791670955126 (* x y)))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+26) {
tmp = x + (-1.0 / x);
} else if (z <= 5.4) {
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 <= (-1.25d+26)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 5.4d0) 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 <= -1.25e+26) {
tmp = x + (-1.0 / x);
} else if (z <= 5.4) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.25e+26: tmp = x + (-1.0 / x) elif z <= 5.4: tmp = x + (y / (1.1283791670955126 - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.25e+26) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 5.4) 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 <= -1.25e+26) tmp = x + (-1.0 / x); elseif (z <= 5.4) tmp = x + (y / (1.1283791670955126 - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.25e+26], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4], 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 -1.25 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 5.4:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.25e26Initial program 88.0%
*-lft-identity88.0%
metadata-eval88.0%
times-frac88.0%
neg-mul-188.0%
sub0-neg87.5%
associate-+l-87.5%
neg-sub088.1%
+-commutative88.1%
sub-neg88.1%
associate-/l*88.2%
div-sub88.2%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -1.25e26 < z < 5.4000000000000004Initial program 99.8%
Taylor expanded in z around 0 99.0%
if 5.4000000000000004 < z Initial program 94.1%
*-lft-identity94.1%
metadata-eval94.1%
times-frac94.1%
neg-mul-194.1%
sub0-neg94.1%
associate-+l-94.1%
neg-sub094.1%
+-commutative94.1%
sub-neg94.1%
associate-/l*94.1%
div-sub94.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 77.0%
Taylor expanded in x around inf 100.0%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (<= z -1.25e+26) (+ x (/ -1.0 x)) (if (<= z 5.4) (+ x (/ -1.0 (+ x (/ -1.1283791670955126 y)))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+26) {
tmp = x + (-1.0 / x);
} else if (z <= 5.4) {
tmp = x + (-1.0 / (x + (-1.1283791670955126 / 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 <= (-1.25d+26)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 5.4d0) then
tmp = x + ((-1.0d0) / (x + ((-1.1283791670955126d0) / y)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+26) {
tmp = x + (-1.0 / x);
} else if (z <= 5.4) {
tmp = x + (-1.0 / (x + (-1.1283791670955126 / y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.25e+26: tmp = x + (-1.0 / x) elif z <= 5.4: tmp = x + (-1.0 / (x + (-1.1283791670955126 / y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.25e+26) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 5.4) tmp = Float64(x + Float64(-1.0 / Float64(x + Float64(-1.1283791670955126 / y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.25e+26) tmp = x + (-1.0 / x); elseif (z <= 5.4) tmp = x + (-1.0 / (x + (-1.1283791670955126 / y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.25e+26], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4], N[(x + N[(-1.0 / N[(x + N[(-1.1283791670955126 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 5.4:\\
\;\;\;\;x + \frac{-1}{x + \frac{-1.1283791670955126}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.25e26Initial program 88.0%
*-lft-identity88.0%
metadata-eval88.0%
times-frac88.0%
neg-mul-188.0%
sub0-neg87.5%
associate-+l-87.5%
neg-sub088.1%
+-commutative88.1%
sub-neg88.1%
associate-/l*88.2%
div-sub88.2%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -1.25e26 < z < 5.4000000000000004Initial program 99.8%
*-lft-identity99.8%
metadata-eval99.8%
times-frac99.8%
neg-mul-199.8%
sub0-neg99.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
sub-neg99.8%
associate-/l*99.9%
div-sub99.9%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 99.0%
cancel-sign-sub-inv99.0%
metadata-eval99.0%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if 5.4000000000000004 < z Initial program 94.1%
*-lft-identity94.1%
metadata-eval94.1%
times-frac94.1%
neg-mul-194.1%
sub0-neg94.1%
associate-+l-94.1%
neg-sub094.1%
+-commutative94.1%
sub-neg94.1%
associate-/l*94.1%
div-sub94.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 77.0%
Taylor expanded in x around inf 100.0%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (<= z -1.05e-164) x (if (<= z 1.02e-22) (+ x (/ y 1.1283791670955126)) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.05e-164) {
tmp = x;
} else if (z <= 1.02e-22) {
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 <= (-1.05d-164)) then
tmp = x
else if (z <= 1.02d-22) 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 <= -1.05e-164) {
tmp = x;
} else if (z <= 1.02e-22) {
tmp = x + (y / 1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.05e-164: tmp = x elif z <= 1.02e-22: tmp = x + (y / 1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.05e-164) tmp = x; elseif (z <= 1.02e-22) 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 <= -1.05e-164) tmp = x; elseif (z <= 1.02e-22) tmp = x + (y / 1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.05e-164], x, If[LessEqual[z, 1.02e-22], N[(x + N[(y / 1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-164}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-22}:\\
\;\;\;\;x + \frac{y}{1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.04999999999999995e-164 or 1.02000000000000002e-22 < z Initial program 93.6%
*-lft-identity93.6%
metadata-eval93.6%
times-frac93.6%
neg-mul-193.6%
sub0-neg93.5%
associate-+l-93.5%
neg-sub093.7%
+-commutative93.7%
sub-neg93.7%
associate-/l*93.7%
div-sub93.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in z around 0 77.2%
Taylor expanded in x around inf 80.6%
if -1.04999999999999995e-164 < z < 1.02000000000000002e-22Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around 0 75.6%
Final simplification78.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 95.7%
*-lft-identity95.7%
metadata-eval95.7%
times-frac95.7%
neg-mul-195.7%
sub0-neg95.6%
associate-+l-95.6%
neg-sub095.7%
+-commutative95.7%
sub-neg95.7%
associate-/l*95.8%
div-sub95.8%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 84.8%
Taylor expanded in x around inf 74.3%
Final simplification74.3%
(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 2023185
(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)))))