
(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 15 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 (let* ((t_0 (* y (log y)))) (if (<= t_0 100000.0) (exp (- x z)) (exp (- t_0 z)))))
double code(double x, double y, double z) {
double t_0 = y * log(y);
double tmp;
if (t_0 <= 100000.0) {
tmp = exp((x - z));
} else {
tmp = exp((t_0 - 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) :: t_0
real(8) :: tmp
t_0 = y * log(y)
if (t_0 <= 100000.0d0) then
tmp = exp((x - z))
else
tmp = exp((t_0 - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * Math.log(y);
double tmp;
if (t_0 <= 100000.0) {
tmp = Math.exp((x - z));
} else {
tmp = Math.exp((t_0 - z));
}
return tmp;
}
def code(x, y, z): t_0 = y * math.log(y) tmp = 0 if t_0 <= 100000.0: tmp = math.exp((x - z)) else: tmp = math.exp((t_0 - z)) return tmp
function code(x, y, z) t_0 = Float64(y * log(y)) tmp = 0.0 if (t_0 <= 100000.0) tmp = exp(Float64(x - z)); else tmp = exp(Float64(t_0 - z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * log(y); tmp = 0.0; if (t_0 <= 100000.0) tmp = exp((x - z)); else tmp = exp((t_0 - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 100000.0], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Exp[N[(t$95$0 - z), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \log y\\
\mathbf{if}\;t\_0 \leq 100000:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0 - z}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 1e5Initial program 100.0%
Taylor expanded in y around 0 100.0%
if 1e5 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in x around 0 90.2%
(FPCore (x y z) :precision binary64 (if (<= x -3e-11) (exp x) (if (<= x -6.2e-270) (exp (- z)) (if (<= x 580.0) (pow y y) (exp x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3e-11) {
tmp = exp(x);
} else if (x <= -6.2e-270) {
tmp = exp(-z);
} else if (x <= 580.0) {
tmp = pow(y, y);
} 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 (x <= (-3d-11)) then
tmp = exp(x)
else if (x <= (-6.2d-270)) then
tmp = exp(-z)
else if (x <= 580.0d0) then
tmp = y ** y
else
tmp = exp(x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3e-11) {
tmp = Math.exp(x);
} else if (x <= -6.2e-270) {
tmp = Math.exp(-z);
} else if (x <= 580.0) {
tmp = Math.pow(y, y);
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3e-11: tmp = math.exp(x) elif x <= -6.2e-270: tmp = math.exp(-z) elif x <= 580.0: tmp = math.pow(y, y) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3e-11) tmp = exp(x); elseif (x <= -6.2e-270) tmp = exp(Float64(-z)); elseif (x <= 580.0) tmp = y ^ y; else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3e-11) tmp = exp(x); elseif (x <= -6.2e-270) tmp = exp(-z); elseif (x <= 580.0) tmp = y ^ y; else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3e-11], N[Exp[x], $MachinePrecision], If[LessEqual[x, -6.2e-270], N[Exp[(-z)], $MachinePrecision], If[LessEqual[x, 580.0], N[Power[y, y], $MachinePrecision], N[Exp[x], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-11}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-270}:\\
\;\;\;\;e^{-z}\\
\mathbf{elif}\;x \leq 580:\\
\;\;\;\;{y}^{y}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if x < -3e-11 or 580 < x Initial program 100.0%
Taylor expanded in x around inf 84.8%
if -3e-11 < x < -6.2e-270Initial program 100.0%
Taylor expanded in z around inf 76.5%
neg-mul-176.5%
Simplified76.5%
if -6.2e-270 < x < 580Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum85.7%
*-commutative85.7%
exp-to-pow85.7%
Simplified85.7%
Taylor expanded in z around 0 82.3%
Taylor expanded in x around 0 82.2%
(FPCore (x y z) :precision binary64 (if (or (<= x -3e-11) (not (<= x 1.7e-28))) (exp x) (exp (- z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3e-11) || !(x <= 1.7e-28)) {
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 <= (-3d-11)) .or. (.not. (x <= 1.7d-28))) 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 <= -3e-11) || !(x <= 1.7e-28)) {
tmp = Math.exp(x);
} else {
tmp = Math.exp(-z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3e-11) or not (x <= 1.7e-28): tmp = math.exp(x) else: tmp = math.exp(-z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3e-11) || !(x <= 1.7e-28)) tmp = exp(x); else tmp = exp(Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3e-11) || ~((x <= 1.7e-28))) tmp = exp(x); else tmp = exp(-z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3e-11], N[Not[LessEqual[x, 1.7e-28]], $MachinePrecision]], N[Exp[x], $MachinePrecision], N[Exp[(-z)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-11} \lor \neg \left(x \leq 1.7 \cdot 10^{-28}\right):\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;e^{-z}\\
\end{array}
\end{array}
if x < -3e-11 or 1.7e-28 < x Initial program 100.0%
Taylor expanded in x around inf 82.3%
if -3e-11 < x < 1.7e-28Initial program 100.0%
Taylor expanded in z around inf 67.8%
neg-mul-167.8%
Simplified67.8%
Final simplification75.1%
(FPCore (x y z) :precision binary64 (if (<= z -3e+95) (+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0))) (if (<= z 1.55e+81) (exp x) 0.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -3e+95) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if (z <= 1.55e+81) {
tmp = exp(x);
} else {
tmp = 0.0;
}
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 <= (-3d+95)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else if (z <= 1.55d+81) then
tmp = exp(x)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3e+95) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if (z <= 1.55e+81) {
tmp = Math.exp(x);
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3e+95: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) elif z <= 1.55e+81: tmp = math.exp(x) else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3e+95) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); elseif (z <= 1.55e+81) tmp = exp(x); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3e+95) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); elseif (z <= 1.55e+81) tmp = exp(x); else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3e+95], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+81], N[Exp[x], $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+95}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+81}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if z < -2.99999999999999991e95Initial program 100.0%
Taylor expanded in z around inf 95.0%
neg-mul-195.0%
Simplified95.0%
Taylor expanded in z around 0 92.6%
Taylor expanded in z around inf 92.6%
*-commutative92.6%
Simplified92.6%
if -2.99999999999999991e95 < z < 1.55e81Initial program 100.0%
Taylor expanded in x around inf 62.0%
if 1.55e81 < z Initial program 100.0%
Taylor expanded in z around inf 69.4%
neg-mul-169.4%
Simplified69.4%
Taylor expanded in z around 0 1.5%
mul-1-neg1.5%
unsub-neg1.5%
Simplified1.5%
Taylor expanded in z around inf 1.5%
neg-mul-11.5%
Simplified1.5%
add-log-exp1.1%
exp-neg1.1%
add-sqr-sqrt1.1%
associate-/r*1.1%
metadata-eval1.1%
sqrt-div1.1%
exp-neg1.1%
pow11.1%
pow11.1%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
pow10.0%
log-div0.0%
Applied egg-rr69.4%
+-inverses69.4%
Simplified69.4%
Final simplification68.0%
(FPCore (x y z) :precision binary64 (if (<= y 5.7e+63) (exp (- x z)) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 5.7e+63) {
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 <= 5.7d+63) 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 <= 5.7e+63) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 5.7e+63: tmp = math.exp((x - z)) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 5.7e+63) 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 <= 5.7e+63) tmp = exp((x - z)); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 5.7e+63], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.7 \cdot 10^{+63}:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 5.7000000000000002e63Initial program 100.0%
Taylor expanded in y around 0 98.0%
if 5.7000000000000002e63 < y Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum64.2%
*-commutative64.2%
exp-to-pow64.2%
Simplified64.2%
Taylor expanded in z around 0 77.1%
Taylor expanded in x around 0 83.7%
(FPCore (x y z)
:precision binary64
(if (<= x -3200.0)
0.0
(if (<= x 2.4e+101)
(+ 1.0 (* z (+ (* z (+ 0.5 (* z -0.16666666666666666))) -1.0)))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3200.0) {
tmp = 0.0;
} else if (x <= 2.4e+101) {
tmp = 1.0 + (z * ((z * (0.5 + (z * -0.16666666666666666))) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
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 <= (-3200.0d0)) then
tmp = 0.0d0
else if (x <= 2.4d+101) then
tmp = 1.0d0 + (z * ((z * (0.5d0 + (z * (-0.16666666666666666d0)))) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3200.0) {
tmp = 0.0;
} else if (x <= 2.4e+101) {
tmp = 1.0 + (z * ((z * (0.5 + (z * -0.16666666666666666))) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3200.0: tmp = 0.0 elif x <= 2.4e+101: tmp = 1.0 + (z * ((z * (0.5 + (z * -0.16666666666666666))) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3200.0) tmp = 0.0; elseif (x <= 2.4e+101) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666))) + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3200.0) tmp = 0.0; elseif (x <= 2.4e+101) tmp = 1.0 + (z * ((z * (0.5 + (z * -0.16666666666666666))) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3200.0], 0.0, If[LessEqual[x, 2.4e+101], N[(1.0 + N[(z * N[(N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3200:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+101}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(0.5 + z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < -3200Initial program 100.0%
Taylor expanded in z around inf 35.8%
neg-mul-135.8%
Simplified35.8%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 4.3%
neg-mul-14.3%
Simplified4.3%
add-log-exp51.7%
exp-neg51.7%
add-sqr-sqrt51.7%
associate-/r*51.7%
metadata-eval51.7%
sqrt-div51.7%
exp-neg51.7%
pow151.7%
pow151.7%
add-sqr-sqrt32.4%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod23.8%
add-sqr-sqrt47.6%
pow147.6%
pow147.6%
log-div47.6%
Applied egg-rr80.0%
+-inverses80.0%
Simplified80.0%
if -3200 < x < 2.39999999999999988e101Initial program 100.0%
Taylor expanded in z around inf 63.3%
neg-mul-163.3%
Simplified63.3%
Taylor expanded in z around 0 35.3%
if 2.39999999999999988e101 < x Initial program 100.0%
Taylor expanded in x around inf 95.4%
Taylor expanded in x around 0 95.4%
*-commutative95.4%
Simplified95.4%
Final simplification55.7%
(FPCore (x y z)
:precision binary64
(if (<= x -2900000.0)
0.0
(if (<= x 1.95e+102)
(+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0)))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2900000.0) {
tmp = 0.0;
} else if (x <= 1.95e+102) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
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 <= (-2900000.0d0)) then
tmp = 0.0d0
else if (x <= 1.95d+102) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2900000.0) {
tmp = 0.0;
} else if (x <= 1.95e+102) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2900000.0: tmp = 0.0 elif x <= 1.95e+102: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2900000.0) tmp = 0.0; elseif (x <= 1.95e+102) 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 * Float64(0.5 + Float64(x * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2900000.0) tmp = 0.0; elseif (x <= 1.95e+102) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2900000.0], 0.0, If[LessEqual[x, 1.95e+102], 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 * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2900000:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{+102}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < -2.9e6Initial program 100.0%
Taylor expanded in z around inf 35.8%
neg-mul-135.8%
Simplified35.8%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 4.3%
neg-mul-14.3%
Simplified4.3%
add-log-exp51.7%
exp-neg51.7%
add-sqr-sqrt51.7%
associate-/r*51.7%
metadata-eval51.7%
sqrt-div51.7%
exp-neg51.7%
pow151.7%
pow151.7%
add-sqr-sqrt32.4%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod23.8%
add-sqr-sqrt47.6%
pow147.6%
pow147.6%
log-div47.6%
Applied egg-rr80.0%
+-inverses80.0%
Simplified80.0%
if -2.9e6 < x < 1.9499999999999999e102Initial program 100.0%
Taylor expanded in z around inf 63.3%
neg-mul-163.3%
Simplified63.3%
Taylor expanded in z around 0 35.3%
Taylor expanded in z around inf 35.2%
*-commutative35.2%
Simplified35.2%
if 1.9499999999999999e102 < x Initial program 100.0%
Taylor expanded in x around inf 95.4%
Taylor expanded in x around 0 95.4%
*-commutative95.4%
Simplified95.4%
Final simplification55.6%
(FPCore (x y z)
:precision binary64
(if (<= x -48.0)
0.0
(if (<= x 3.6e+116)
(+ 1.0 (* z (+ (* z 0.5) -1.0)))
(+ 1.0 (* x (+ 1.0 (* x 0.5)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -48.0) {
tmp = 0.0;
} else if (x <= 3.6e+116) {
tmp = 1.0 + (z * ((z * 0.5) + -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 (x <= (-48.0d0)) then
tmp = 0.0d0
else if (x <= 3.6d+116) then
tmp = 1.0d0 + (z * ((z * 0.5d0) + (-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 (x <= -48.0) {
tmp = 0.0;
} else if (x <= 3.6e+116) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -48.0: tmp = 0.0 elif x <= 3.6e+116: tmp = 1.0 + (z * ((z * 0.5) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -48.0) tmp = 0.0; elseif (x <= 3.6e+116) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * 0.5) + -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 (x <= -48.0) tmp = 0.0; elseif (x <= 3.6e+116) tmp = 1.0 + (z * ((z * 0.5) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -48.0], 0.0, If[LessEqual[x, 3.6e+116], N[(1.0 + N[(z * N[(N[(z * 0.5), $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}\;x \leq -48:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+116}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -48Initial program 100.0%
Taylor expanded in z around inf 35.8%
neg-mul-135.8%
Simplified35.8%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 4.3%
neg-mul-14.3%
Simplified4.3%
add-log-exp51.7%
exp-neg51.7%
add-sqr-sqrt51.7%
associate-/r*51.7%
metadata-eval51.7%
sqrt-div51.7%
exp-neg51.7%
pow151.7%
pow151.7%
add-sqr-sqrt32.4%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod23.8%
add-sqr-sqrt47.6%
pow147.6%
pow147.6%
log-div47.6%
Applied egg-rr80.0%
+-inverses80.0%
Simplified80.0%
if -48 < x < 3.59999999999999971e116Initial program 100.0%
Taylor expanded in z around inf 63.0%
neg-mul-163.0%
Simplified63.0%
Taylor expanded in z around 0 35.7%
if 3.59999999999999971e116 < x Initial program 100.0%
Taylor expanded in x around inf 95.0%
Taylor expanded in x around 0 73.8%
*-commutative73.8%
Simplified73.8%
Final simplification51.7%
(FPCore (x y z)
:precision binary64
(if (<= x -720.0)
0.0
(if (<= x 6.2e+118)
(+ 1.0 (* z (* z 0.5)))
(+ 1.0 (* x (+ 1.0 (* x 0.5)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -720.0) {
tmp = 0.0;
} else if (x <= 6.2e+118) {
tmp = 1.0 + (z * (z * 0.5));
} 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 (x <= (-720.0d0)) then
tmp = 0.0d0
else if (x <= 6.2d+118) then
tmp = 1.0d0 + (z * (z * 0.5d0))
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 (x <= -720.0) {
tmp = 0.0;
} else if (x <= 6.2e+118) {
tmp = 1.0 + (z * (z * 0.5));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -720.0: tmp = 0.0 elif x <= 6.2e+118: tmp = 1.0 + (z * (z * 0.5)) else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -720.0) tmp = 0.0; elseif (x <= 6.2e+118) tmp = Float64(1.0 + Float64(z * Float64(z * 0.5))); 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 (x <= -720.0) tmp = 0.0; elseif (x <= 6.2e+118) tmp = 1.0 + (z * (z * 0.5)); else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -720.0], 0.0, If[LessEqual[x, 6.2e+118], N[(1.0 + N[(z * N[(z * 0.5), $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}\;x \leq -720:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+118}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -720Initial program 100.0%
Taylor expanded in z around inf 35.8%
neg-mul-135.8%
Simplified35.8%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 4.3%
neg-mul-14.3%
Simplified4.3%
add-log-exp51.7%
exp-neg51.7%
add-sqr-sqrt51.7%
associate-/r*51.7%
metadata-eval51.7%
sqrt-div51.7%
exp-neg51.7%
pow151.7%
pow151.7%
add-sqr-sqrt32.4%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod23.8%
add-sqr-sqrt47.6%
pow147.6%
pow147.6%
log-div47.6%
Applied egg-rr80.0%
+-inverses80.0%
Simplified80.0%
if -720 < x < 6.19999999999999973e118Initial program 100.0%
Taylor expanded in z around inf 63.0%
neg-mul-163.0%
Simplified63.0%
Taylor expanded in z around 0 35.7%
Taylor expanded in z around inf 35.3%
*-commutative35.3%
Simplified35.3%
if 6.19999999999999973e118 < x Initial program 100.0%
Taylor expanded in x around inf 95.0%
Taylor expanded in x around 0 73.8%
*-commutative73.8%
Simplified73.8%
(FPCore (x y z) :precision binary64 (if (<= x -42.0) 0.0 (if (<= x 2.05e+21) (- 1.0 z) 0.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -42.0) {
tmp = 0.0;
} else if (x <= 2.05e+21) {
tmp = 1.0 - z;
} else {
tmp = 0.0;
}
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 <= (-42.0d0)) then
tmp = 0.0d0
else if (x <= 2.05d+21) then
tmp = 1.0d0 - z
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -42.0) {
tmp = 0.0;
} else if (x <= 2.05e+21) {
tmp = 1.0 - z;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -42.0: tmp = 0.0 elif x <= 2.05e+21: tmp = 1.0 - z else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -42.0) tmp = 0.0; elseif (x <= 2.05e+21) tmp = Float64(1.0 - z); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -42.0) tmp = 0.0; elseif (x <= 2.05e+21) tmp = 1.0 - z; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -42.0], 0.0, If[LessEqual[x, 2.05e+21], N[(1.0 - z), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -42:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+21}:\\
\;\;\;\;1 - z\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -42 or 2.05e21 < x Initial program 100.0%
Taylor expanded in z around inf 37.6%
neg-mul-137.6%
Simplified37.6%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 3.3%
neg-mul-13.3%
Simplified3.3%
add-log-exp39.2%
exp-neg39.2%
add-sqr-sqrt39.2%
associate-/r*39.2%
metadata-eval39.2%
sqrt-div39.2%
exp-neg39.2%
pow139.2%
pow139.2%
add-sqr-sqrt29.4%
sqrt-unprod41.3%
sqr-neg41.3%
sqrt-unprod11.9%
add-sqr-sqrt23.7%
pow123.7%
pow123.7%
log-div23.7%
Applied egg-rr45.9%
+-inverses45.9%
Simplified45.9%
if -42 < x < 2.05e21Initial program 100.0%
Taylor expanded in z around inf 64.9%
neg-mul-164.9%
Simplified64.9%
Taylor expanded in z around 0 24.7%
mul-1-neg24.7%
unsub-neg24.7%
Simplified24.7%
(FPCore (x y z) :precision binary64 (if (<= x -0.031) 0.0 (if (<= x 3.2e+21) (+ x 1.0) 0.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.031) {
tmp = 0.0;
} else if (x <= 3.2e+21) {
tmp = x + 1.0;
} else {
tmp = 0.0;
}
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 <= (-0.031d0)) then
tmp = 0.0d0
else if (x <= 3.2d+21) then
tmp = x + 1.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.031) {
tmp = 0.0;
} else if (x <= 3.2e+21) {
tmp = x + 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.031: tmp = 0.0 elif x <= 3.2e+21: tmp = x + 1.0 else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.031) tmp = 0.0; elseif (x <= 3.2e+21) tmp = Float64(x + 1.0); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.031) tmp = 0.0; elseif (x <= 3.2e+21) tmp = x + 1.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.031], 0.0, If[LessEqual[x, 3.2e+21], N[(x + 1.0), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.031:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+21}:\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -0.031 or 3.2e21 < x Initial program 100.0%
Taylor expanded in z around inf 37.7%
neg-mul-137.7%
Simplified37.7%
Taylor expanded in z around 0 3.2%
mul-1-neg3.2%
unsub-neg3.2%
Simplified3.2%
Taylor expanded in z around inf 3.4%
neg-mul-13.4%
Simplified3.4%
add-log-exp39.2%
exp-neg39.2%
add-sqr-sqrt39.2%
associate-/r*39.2%
metadata-eval39.2%
sqrt-div39.2%
exp-neg39.2%
pow139.2%
pow139.2%
add-sqr-sqrt29.5%
sqrt-unprod41.4%
sqr-neg41.4%
sqrt-unprod11.9%
add-sqr-sqrt23.8%
pow123.8%
pow123.8%
log-div23.8%
Applied egg-rr45.9%
+-inverses45.9%
Simplified45.9%
if -0.031 < x < 3.2e21Initial program 100.0%
Taylor expanded in x around inf 26.3%
Taylor expanded in x around 0 24.5%
Final simplification34.5%
(FPCore (x y z) :precision binary64 (if (<= x -700.0) 0.0 (+ 1.0 (* z (* z 0.5)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -700.0) {
tmp = 0.0;
} else {
tmp = 1.0 + (z * (z * 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 (x <= (-700.0d0)) then
tmp = 0.0d0
else
tmp = 1.0d0 + (z * (z * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -700.0) {
tmp = 0.0;
} else {
tmp = 1.0 + (z * (z * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -700.0: tmp = 0.0 else: tmp = 1.0 + (z * (z * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -700.0) tmp = 0.0; else tmp = Float64(1.0 + Float64(z * Float64(z * 0.5))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -700.0) tmp = 0.0; else tmp = 1.0 + (z * (z * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -700.0], 0.0, N[(1.0 + N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -700:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -700Initial program 100.0%
Taylor expanded in z around inf 35.8%
neg-mul-135.8%
Simplified35.8%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 4.3%
neg-mul-14.3%
Simplified4.3%
add-log-exp51.7%
exp-neg51.7%
add-sqr-sqrt51.7%
associate-/r*51.7%
metadata-eval51.7%
sqrt-div51.7%
exp-neg51.7%
pow151.7%
pow151.7%
add-sqr-sqrt32.4%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod23.8%
add-sqr-sqrt47.6%
pow147.6%
pow147.6%
log-div47.6%
Applied egg-rr80.0%
+-inverses80.0%
Simplified80.0%
if -700 < x Initial program 100.0%
Taylor expanded in z around inf 57.0%
neg-mul-157.0%
Simplified57.0%
Taylor expanded in z around 0 31.8%
Taylor expanded in z around inf 31.5%
*-commutative31.5%
Simplified31.5%
(FPCore (x y z) :precision binary64 (if (<= x -42.0) 0.0 (if (<= x 3.2e+21) 1.0 0.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -42.0) {
tmp = 0.0;
} else if (x <= 3.2e+21) {
tmp = 1.0;
} else {
tmp = 0.0;
}
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 <= (-42.0d0)) then
tmp = 0.0d0
else if (x <= 3.2d+21) then
tmp = 1.0d0
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -42.0) {
tmp = 0.0;
} else if (x <= 3.2e+21) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -42.0: tmp = 0.0 elif x <= 3.2e+21: tmp = 1.0 else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -42.0) tmp = 0.0; elseif (x <= 3.2e+21) tmp = 1.0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -42.0) tmp = 0.0; elseif (x <= 3.2e+21) tmp = 1.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -42.0], 0.0, If[LessEqual[x, 3.2e+21], 1.0, 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -42:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+21}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -42 or 3.2e21 < x Initial program 100.0%
Taylor expanded in z around inf 37.9%
neg-mul-137.9%
Simplified37.9%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 3.3%
neg-mul-13.3%
Simplified3.3%
add-log-exp39.5%
exp-neg39.5%
add-sqr-sqrt39.5%
associate-/r*39.5%
metadata-eval39.5%
sqrt-div39.5%
exp-neg39.5%
pow139.5%
pow139.5%
add-sqr-sqrt29.7%
sqrt-unprod41.7%
sqr-neg41.7%
sqrt-unprod12.0%
add-sqr-sqrt23.9%
pow123.9%
pow123.9%
log-div23.9%
Applied egg-rr46.2%
+-inverses46.2%
Simplified46.2%
if -42 < x < 3.2e21Initial program 100.0%
Taylor expanded in x around inf 26.9%
Taylor expanded in x around 0 24.1%
(FPCore (x y z) :precision binary64 0.0)
double code(double x, double y, double z) {
return 0.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.0d0
end function
public static double code(double x, double y, double z) {
return 0.0;
}
def code(x, y, z): return 0.0
function code(x, y, z) return 0.0 end
function tmp = code(x, y, z) tmp = 0.0; end
code[x_, y_, z_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 100.0%
Taylor expanded in z around inf 52.1%
neg-mul-152.1%
Simplified52.1%
Taylor expanded in z around 0 14.6%
mul-1-neg14.6%
unsub-neg14.6%
Simplified14.6%
Taylor expanded in z around inf 3.2%
neg-mul-13.2%
Simplified3.2%
add-log-exp34.7%
exp-neg34.7%
add-sqr-sqrt34.7%
associate-/r*34.7%
metadata-eval34.7%
sqrt-div34.7%
exp-neg34.7%
pow134.7%
pow134.7%
add-sqr-sqrt29.8%
sqrt-unprod35.7%
sqr-neg35.7%
sqrt-unprod5.8%
add-sqr-sqrt11.7%
pow111.7%
pow111.7%
log-div11.7%
Applied egg-rr28.7%
+-inverses28.7%
Simplified28.7%
(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 2024146
(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)))