
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Initial program 100.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -2.35e+58) (not (<= x 7.2e+56))) (exp (- x z)) (exp (- (* y (log y)) z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2.35e+58) || !(x <= 7.2e+56)) {
tmp = exp((x - z));
} else {
tmp = exp(((y * log(y)) - 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 ((x <= (-2.35d+58)) .or. (.not. (x <= 7.2d+56))) then
tmp = exp((x - z))
else
tmp = exp(((y * log(y)) - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2.35e+58) || !(x <= 7.2e+56)) {
tmp = Math.exp((x - z));
} else {
tmp = Math.exp(((y * Math.log(y)) - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2.35e+58) or not (x <= 7.2e+56): tmp = math.exp((x - z)) else: tmp = math.exp(((y * math.log(y)) - z)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2.35e+58) || !(x <= 7.2e+56)) tmp = exp(Float64(x - z)); else tmp = exp(Float64(Float64(y * log(y)) - z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2.35e+58) || ~((x <= 7.2e+56))) tmp = exp((x - z)); else tmp = exp(((y * log(y)) - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2.35e+58], N[Not[LessEqual[x, 7.2e+56]], $MachinePrecision]], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{+58} \lor \neg \left(x \leq 7.2 \cdot 10^{+56}\right):\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;e^{y \cdot \log y - z}\\
\end{array}
\end{array}
if x < -2.34999999999999986e58 or 7.19999999999999996e56 < x Initial program 100.0%
Taylor expanded in x around inf 94.5%
if -2.34999999999999986e58 < x < 7.19999999999999996e56Initial program 100.0%
Taylor expanded in x around 0 97.7%
Final simplification96.6%
(FPCore (x y z) :precision binary64 (if (or (<= x -29000000000.0) (not (<= x 500.0))) (exp x) (exp (- z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -29000000000.0) || !(x <= 500.0)) {
tmp = exp(x);
} else {
tmp = 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 ((x <= (-29000000000.0d0)) .or. (.not. (x <= 500.0d0))) then
tmp = exp(x)
else
tmp = exp(-z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -29000000000.0) || !(x <= 500.0)) {
tmp = Math.exp(x);
} else {
tmp = Math.exp(-z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -29000000000.0) or not (x <= 500.0): tmp = math.exp(x) else: tmp = math.exp(-z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -29000000000.0) || !(x <= 500.0)) tmp = exp(x); else tmp = exp(Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -29000000000.0) || ~((x <= 500.0))) tmp = exp(x); else tmp = exp(-z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -29000000000.0], N[Not[LessEqual[x, 500.0]], $MachinePrecision]], N[Exp[x], $MachinePrecision], N[Exp[(-z)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -29000000000 \lor \neg \left(x \leq 500\right):\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;e^{-z}\\
\end{array}
\end{array}
if x < -2.9e10 or 500 < x Initial program 100.0%
Taylor expanded in x around inf 92.2%
Taylor expanded in z around 0 87.9%
if -2.9e10 < x < 500Initial program 100.0%
Taylor expanded in z around inf 66.6%
neg-mul-166.6%
Simplified66.6%
Final simplification76.1%
(FPCore (x y z) :precision binary64 (if (<= y 850.0) (exp (- x z)) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 850.0) {
tmp = exp((x - z));
} else {
tmp = pow(y, y);
}
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 (y <= 850.0d0) then
tmp = exp((x - z))
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 850.0) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 850.0: tmp = math.exp((x - z)) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 850.0) tmp = exp(Float64(x - z)); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 850.0) tmp = exp((x - z)); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 850.0], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 850:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 850Initial program 100.0%
Taylor expanded in x around inf 99.3%
if 850 < y Initial program 100.0%
Taylor expanded in x around 0 89.1%
Taylor expanded in z around 0 82.2%
(FPCore (x y z) :precision binary64 (if (<= y 3.4) (exp (- z)) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 3.4) {
tmp = exp(-z);
} else {
tmp = pow(y, y);
}
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 (y <= 3.4d0) then
tmp = exp(-z)
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 3.4) {
tmp = Math.exp(-z);
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 3.4: tmp = math.exp(-z) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 3.4) tmp = exp(Float64(-z)); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 3.4) tmp = exp(-z); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 3.4], N[Exp[(-z)], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.4:\\
\;\;\;\;e^{-z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 3.39999999999999991Initial program 100.0%
Taylor expanded in z around inf 74.8%
neg-mul-174.8%
Simplified74.8%
if 3.39999999999999991 < y Initial program 100.0%
Taylor expanded in x around 0 88.5%
Taylor expanded in z around 0 81.7%
(FPCore (x y z) :precision binary64 (if (<= z -1.8e+100) (+ 1.0 (* z (+ (* z (- 1.0 z)) -1.0))) (exp x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.8e+100) {
tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0));
} else {
tmp = exp(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.8d+100)) then
tmp = 1.0d0 + (z * ((z * (1.0d0 - z)) + (-1.0d0)))
else
tmp = exp(x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.8e+100) {
tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0));
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.8e+100: tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0)) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.8e+100) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(1.0 - z)) + -1.0))); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.8e+100) tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0)); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.8e+100], N[(1.0 + N[(z * N[(N[(z * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[x], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+100}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(1 - z\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if z < -1.8e100Initial program 100.0%
Taylor expanded in x around 0 94.4%
exp-diff94.4%
*-commutative94.4%
exp-to-pow94.4%
Simplified94.4%
Taylor expanded in z around 0 0.8%
+-commutative0.8%
Simplified0.8%
Taylor expanded in y around 0 1.4%
+-commutative1.4%
Simplified1.4%
Taylor expanded in z around 0 92.8%
if -1.8e100 < z Initial program 100.0%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 56.4%
Final simplification63.9%
(FPCore (x y z)
:precision binary64
(if (<= z -2.16e+50)
(+ 1.0 (* z (+ (* z (- 1.0 z)) -1.0)))
(if (or (<= z 8.2e-306) (not (<= z 9.5e-144)))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))
(/ (+ 1.0 (/ (+ (/ 1.0 z) -1.0) z)) z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0));
} else if ((z <= 8.2e-306) || !(z <= 9.5e-144)) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / 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 (z <= (-2.16d+50)) then
tmp = 1.0d0 + (z * ((z * (1.0d0 - z)) + (-1.0d0)))
else if ((z <= 8.2d-306) .or. (.not. (z <= 9.5d-144))) then
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
else
tmp = (1.0d0 + (((1.0d0 / z) + (-1.0d0)) / z)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0));
} else if ((z <= 8.2e-306) || !(z <= 9.5e-144)) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.16e+50: tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0)) elif (z <= 8.2e-306) or not (z <= 9.5e-144): tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) else: tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.16e+50) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(1.0 - z)) + -1.0))); elseif ((z <= 8.2e-306) || !(z <= 9.5e-144)) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); else tmp = Float64(Float64(1.0 + Float64(Float64(Float64(1.0 / z) + -1.0) / z)) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.16e+50) tmp = 1.0 + (z * ((z * (1.0 - z)) + -1.0)); elseif ((z <= 8.2e-306) || ~((z <= 9.5e-144))) tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); else tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.16e+50], N[(1.0 + N[(z * N[(N[(z * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 8.2e-306], N[Not[LessEqual[z, 9.5e-144]], $MachinePrecision]], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.16 \cdot 10^{+50}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(1 - z\right) + -1\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-306} \lor \neg \left(z \leq 9.5 \cdot 10^{-144}\right):\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{\frac{1}{z} + -1}{z}}{z}\\
\end{array}
\end{array}
if z < -2.16000000000000008e50Initial program 100.0%
Taylor expanded in x around 0 91.5%
exp-diff91.5%
*-commutative91.5%
exp-to-pow91.5%
Simplified91.5%
Taylor expanded in z around 0 0.8%
+-commutative0.8%
Simplified0.8%
Taylor expanded in y around 0 1.5%
+-commutative1.5%
Simplified1.5%
Taylor expanded in z around 0 85.1%
if -2.16000000000000008e50 < z < 8.19999999999999969e-306 or 9.49999999999999953e-144 < z Initial program 100.0%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 54.8%
Taylor expanded in x around 0 32.2%
if 8.19999999999999969e-306 < z < 9.49999999999999953e-144Initial program 100.0%
Taylor expanded in x around 0 70.7%
exp-diff70.7%
*-commutative70.7%
exp-to-pow70.7%
Simplified70.7%
Taylor expanded in z around 0 70.7%
+-commutative70.7%
Simplified70.7%
Taylor expanded in y around 0 12.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in z around inf 73.9%
associate--l+73.9%
unpow273.9%
associate-/r*73.9%
div-sub73.9%
sub-neg73.9%
metadata-eval73.9%
Simplified73.9%
Final simplification49.1%
(FPCore (x y z)
:precision binary64
(if (<= z -2.16e+50)
(+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0)))
(if (or (<= z 8.4e-305) (not (<= z 6e-150)))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))
(/ (+ 1.0 (/ (+ (/ 1.0 z) -1.0) z)) z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if ((z <= 8.4e-305) || !(z <= 6e-150)) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / 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 (z <= (-2.16d+50)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else if ((z <= 8.4d-305) .or. (.not. (z <= 6d-150))) then
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
else
tmp = (1.0d0 + (((1.0d0 / z) + (-1.0d0)) / z)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if ((z <= 8.4e-305) || !(z <= 6e-150)) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.16e+50: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) elif (z <= 8.4e-305) or not (z <= 6e-150): tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) else: tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.16e+50) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); elseif ((z <= 8.4e-305) || !(z <= 6e-150)) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); else tmp = Float64(Float64(1.0 + Float64(Float64(Float64(1.0 / z) + -1.0) / z)) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.16e+50) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); elseif ((z <= 8.4e-305) || ~((z <= 6e-150))) tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); else tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.16e+50], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 8.4e-305], N[Not[LessEqual[z, 6e-150]], $MachinePrecision]], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.16 \cdot 10^{+50}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-305} \lor \neg \left(z \leq 6 \cdot 10^{-150}\right):\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{\frac{1}{z} + -1}{z}}{z}\\
\end{array}
\end{array}
if z < -2.16000000000000008e50Initial program 100.0%
Taylor expanded in z around inf 91.5%
neg-mul-191.5%
Simplified91.5%
Taylor expanded in z around 0 85.1%
Taylor expanded in z around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -2.16000000000000008e50 < z < 8.3999999999999999e-305 or 6.0000000000000003e-150 < z Initial program 100.0%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 54.8%
Taylor expanded in x around 0 32.2%
if 8.3999999999999999e-305 < z < 6.0000000000000003e-150Initial program 100.0%
Taylor expanded in x around 0 70.7%
exp-diff70.7%
*-commutative70.7%
exp-to-pow70.7%
Simplified70.7%
Taylor expanded in z around 0 70.7%
+-commutative70.7%
Simplified70.7%
Taylor expanded in y around 0 12.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in z around inf 73.9%
associate--l+73.9%
unpow273.9%
associate-/r*73.9%
div-sub73.9%
sub-neg73.9%
metadata-eval73.9%
Simplified73.9%
Final simplification49.1%
(FPCore (x y z)
:precision binary64
(if (<= z -2.16e+50)
(+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0)))
(if (or (<= z 8.2e-305) (not (<= z 1.2e-147)))
(+ 1.0 (* x (+ 1.0 (* x 0.5))))
(/ (+ 1.0 (/ (+ (/ 1.0 z) -1.0) z)) z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if ((z <= 8.2e-305) || !(z <= 1.2e-147)) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / 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 (z <= (-2.16d+50)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else if ((z <= 8.2d-305) .or. (.not. (z <= 1.2d-147))) then
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
else
tmp = (1.0d0 + (((1.0d0 / z) + (-1.0d0)) / z)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if ((z <= 8.2e-305) || !(z <= 1.2e-147)) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.16e+50: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) elif (z <= 8.2e-305) or not (z <= 1.2e-147): tmp = 1.0 + (x * (1.0 + (x * 0.5))) else: tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.16e+50) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); elseif ((z <= 8.2e-305) || !(z <= 1.2e-147)) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); else tmp = Float64(Float64(1.0 + Float64(Float64(Float64(1.0 / z) + -1.0) / z)) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.16e+50) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); elseif ((z <= 8.2e-305) || ~((z <= 1.2e-147))) tmp = 1.0 + (x * (1.0 + (x * 0.5))); else tmp = (1.0 + (((1.0 / z) + -1.0) / z)) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.16e+50], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 8.2e-305], N[Not[LessEqual[z, 1.2e-147]], $MachinePrecision]], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.16 \cdot 10^{+50}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-305} \lor \neg \left(z \leq 1.2 \cdot 10^{-147}\right):\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{\frac{1}{z} + -1}{z}}{z}\\
\end{array}
\end{array}
if z < -2.16000000000000008e50Initial program 100.0%
Taylor expanded in z around inf 91.5%
neg-mul-191.5%
Simplified91.5%
Taylor expanded in z around 0 85.1%
Taylor expanded in z around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -2.16000000000000008e50 < z < 8.2000000000000005e-305 or 1.19999999999999999e-147 < z Initial program 100.0%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 54.8%
Taylor expanded in x around 0 29.6%
if 8.2000000000000005e-305 < z < 1.19999999999999999e-147Initial program 100.0%
Taylor expanded in x around 0 70.7%
exp-diff70.7%
*-commutative70.7%
exp-to-pow70.7%
Simplified70.7%
Taylor expanded in z around 0 70.7%
+-commutative70.7%
Simplified70.7%
Taylor expanded in y around 0 12.7%
+-commutative12.7%
Simplified12.7%
Taylor expanded in z around inf 73.9%
associate--l+73.9%
unpow273.9%
associate-/r*73.9%
div-sub73.9%
sub-neg73.9%
metadata-eval73.9%
Simplified73.9%
Final simplification47.3%
(FPCore (x y z) :precision binary64 (if (<= z -2.16e+50) (+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0))) (+ 1.0 (* x (+ 1.0 (* x 0.5))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
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.16d+50)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.16e+50) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.16e+50: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.16e+50) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.16e+50) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.16e+50], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.16 \cdot 10^{+50}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if z < -2.16000000000000008e50Initial program 100.0%
Taylor expanded in z around inf 91.5%
neg-mul-191.5%
Simplified91.5%
Taylor expanded in z around 0 85.1%
Taylor expanded in z around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -2.16000000000000008e50 < z Initial program 100.0%
Taylor expanded in x around inf 71.6%
Taylor expanded in z around 0 56.8%
Taylor expanded in x around 0 29.1%
Final simplification41.8%
(FPCore (x y z) :precision binary64 (if (<= z -3.2e+128) (+ 1.0 (* z (+ z -1.0))) (+ 1.0 (* x (+ 1.0 (* x 0.5))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+128) {
tmp = 1.0 + (z * (z + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
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 <= (-3.2d+128)) then
tmp = 1.0d0 + (z * (z + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e+128) {
tmp = 1.0 + (z * (z + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.2e+128: tmp = 1.0 + (z * (z + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.2e+128) tmp = Float64(1.0 + Float64(z * Float64(z + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.2e+128) tmp = 1.0 + (z * (z + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.2e+128], N[(1.0 + N[(z * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+128}:\\
\;\;\;\;1 + z \cdot \left(z + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if z < -3.19999999999999986e128Initial program 100.0%
Taylor expanded in x around 0 93.7%
exp-diff93.7%
*-commutative93.7%
exp-to-pow93.7%
Simplified93.7%
Taylor expanded in z around 0 0.8%
+-commutative0.8%
Simplified0.8%
Taylor expanded in y around 0 1.5%
+-commutative1.5%
Simplified1.5%
Taylor expanded in z around 0 86.3%
if -3.19999999999999986e128 < z Initial program 100.0%
Taylor expanded in x around inf 73.1%
Taylor expanded in z around 0 55.3%
Taylor expanded in x around 0 28.1%
Final simplification38.8%
(FPCore (x y z) :precision binary64 (if (<= z -1.1e+128) (+ 1.0 (* z (+ z -1.0))) (+ 1.0 (* x (* x 0.5)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+128) {
tmp = 1.0 + (z * (z + -1.0));
} else {
tmp = 1.0 + (x * (x * 0.5));
}
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.1d+128)) then
tmp = 1.0d0 + (z * (z + (-1.0d0)))
else
tmp = 1.0d0 + (x * (x * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.1e+128) {
tmp = 1.0 + (z * (z + -1.0));
} else {
tmp = 1.0 + (x * (x * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.1e+128: tmp = 1.0 + (z * (z + -1.0)) else: tmp = 1.0 + (x * (x * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.1e+128) tmp = Float64(1.0 + Float64(z * Float64(z + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(x * 0.5))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.1e+128) tmp = 1.0 + (z * (z + -1.0)); else tmp = 1.0 + (x * (x * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.1e+128], N[(1.0 + N[(z * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+128}:\\
\;\;\;\;1 + z \cdot \left(z + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if z < -1.10000000000000008e128Initial program 100.0%
Taylor expanded in x around 0 93.7%
exp-diff93.7%
*-commutative93.7%
exp-to-pow93.7%
Simplified93.7%
Taylor expanded in z around 0 0.8%
+-commutative0.8%
Simplified0.8%
Taylor expanded in y around 0 1.5%
+-commutative1.5%
Simplified1.5%
Taylor expanded in z around 0 86.3%
if -1.10000000000000008e128 < z Initial program 100.0%
Taylor expanded in x around inf 73.1%
Taylor expanded in z around 0 55.3%
Taylor expanded in x around 0 28.1%
Taylor expanded in x around inf 28.1%
Final simplification38.8%
(FPCore (x y z) :precision binary64 (if (<= z -2.8e+128) (+ 1.0 (* z (* z 0.5))) (+ 1.0 (* x (* x 0.5)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.8e+128) {
tmp = 1.0 + (z * (z * 0.5));
} else {
tmp = 1.0 + (x * (x * 0.5));
}
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.8d+128)) then
tmp = 1.0d0 + (z * (z * 0.5d0))
else
tmp = 1.0d0 + (x * (x * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.8e+128) {
tmp = 1.0 + (z * (z * 0.5));
} else {
tmp = 1.0 + (x * (x * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.8e+128: tmp = 1.0 + (z * (z * 0.5)) else: tmp = 1.0 + (x * (x * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.8e+128) tmp = Float64(1.0 + Float64(z * Float64(z * 0.5))); else tmp = Float64(1.0 + Float64(x * Float64(x * 0.5))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.8e+128) tmp = 1.0 + (z * (z * 0.5)); else tmp = 1.0 + (x * (x * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.8e+128], N[(1.0 + N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+128}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if z < -2.79999999999999983e128Initial program 100.0%
Taylor expanded in z around inf 93.7%
neg-mul-193.7%
Simplified93.7%
Taylor expanded in z around 0 86.2%
Taylor expanded in z around inf 86.2%
*-commutative86.2%
Simplified86.2%
if -2.79999999999999983e128 < z Initial program 100.0%
Taylor expanded in x around inf 73.1%
Taylor expanded in z around 0 55.3%
Taylor expanded in x around 0 28.1%
Taylor expanded in x around inf 28.1%
Final simplification38.8%
(FPCore (x y z) :precision binary64 (+ 1.0 (* x (* x 0.5))))
double code(double x, double y, double z) {
return 1.0 + (x * (x * 0.5));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 + (x * (x * 0.5d0))
end function
public static double code(double x, double y, double z) {
return 1.0 + (x * (x * 0.5));
}
def code(x, y, z): return 1.0 + (x * (x * 0.5))
function code(x, y, z) return Float64(1.0 + Float64(x * Float64(x * 0.5))) end
function tmp = code(x, y, z) tmp = 1.0 + (x * (x * 0.5)); end
code[x_, y_, z_] := N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + x \cdot \left(x \cdot 0.5\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around inf 78.0%
Taylor expanded in z around 0 51.8%
Taylor expanded in x around 0 25.1%
Taylor expanded in x around inf 25.1%
Final simplification25.1%
(FPCore (x y z) :precision binary64 (- 1.0 z))
double code(double x, double y, double z) {
return 1.0 - z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 - z
end function
public static double code(double x, double y, double z) {
return 1.0 - z;
}
def code(x, y, z): return 1.0 - z
function code(x, y, z) return Float64(1.0 - z) end
function tmp = code(x, y, z) tmp = 1.0 - z; end
code[x_, y_, z_] := N[(1.0 - z), $MachinePrecision]
\begin{array}{l}
\\
1 - z
\end{array}
Initial program 100.0%
Taylor expanded in z around inf 52.6%
neg-mul-152.6%
Simplified52.6%
Taylor expanded in z around 0 14.5%
neg-mul-114.5%
unsub-neg14.5%
Simplified14.5%
(FPCore (x y z) :precision binary64 (+ x 1.0))
double code(double x, double y, double z) {
return x + 1.0;
}
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
end function
public static double code(double x, double y, double z) {
return x + 1.0;
}
def code(x, y, z): return x + 1.0
function code(x, y, z) return Float64(x + 1.0) end
function tmp = code(x, y, z) tmp = x + 1.0; end
code[x_, y_, z_] := N[(x + 1.0), $MachinePrecision]
\begin{array}{l}
\\
x + 1
\end{array}
Initial program 100.0%
Taylor expanded in x around inf 78.0%
Taylor expanded in z around 0 51.8%
Taylor expanded in x around 0 14.3%
Final simplification14.3%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in z around inf 52.6%
neg-mul-152.6%
Simplified52.6%
Taylor expanded in z around 0 14.0%
(FPCore (x y z) :precision binary64 (exp (+ (- x z) (* (log y) y))))
double code(double x, double y, double z) {
return exp(((x - z) + (log(y) * y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x - z) + (log(y) * y)))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x - z) + (Math.log(y) * y)));
}
def code(x, y, z): return math.exp(((x - z) + (math.log(y) * y)))
function code(x, y, z) return exp(Float64(Float64(x - z) + Float64(log(y) * y))) end
function tmp = code(x, y, z) tmp = exp(((x - z) + (log(y) * y))); end
code[x_, y_, z_] := N[Exp[N[(N[(x - z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x - z\right) + \log y \cdot y}
\end{array}
herbie shell --seed 2024116
(FPCore (x y z)
:name "Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (exp (+ (- x z) (* (log y) y))))
(exp (- (+ x (* y (log y))) z)))