
(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%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (log y))))
(if (or (<= t_0 -5e-305) (and (not (<= t_0 2e+27)) (<= t_0 2e+51)))
(exp (- x z))
(exp t_0))))
double code(double x, double y, double z) {
double t_0 = y * log(y);
double tmp;
if ((t_0 <= -5e-305) || (!(t_0 <= 2e+27) && (t_0 <= 2e+51))) {
tmp = exp((x - z));
} else {
tmp = exp(t_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) :: t_0
real(8) :: tmp
t_0 = y * log(y)
if ((t_0 <= (-5d-305)) .or. (.not. (t_0 <= 2d+27)) .and. (t_0 <= 2d+51)) then
tmp = exp((x - z))
else
tmp = exp(t_0)
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 <= -5e-305) || (!(t_0 <= 2e+27) && (t_0 <= 2e+51))) {
tmp = Math.exp((x - z));
} else {
tmp = Math.exp(t_0);
}
return tmp;
}
def code(x, y, z): t_0 = y * math.log(y) tmp = 0 if (t_0 <= -5e-305) or (not (t_0 <= 2e+27) and (t_0 <= 2e+51)): tmp = math.exp((x - z)) else: tmp = math.exp(t_0) return tmp
function code(x, y, z) t_0 = Float64(y * log(y)) tmp = 0.0 if ((t_0 <= -5e-305) || (!(t_0 <= 2e+27) && (t_0 <= 2e+51))) tmp = exp(Float64(x - z)); else tmp = exp(t_0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * log(y); tmp = 0.0; if ((t_0 <= -5e-305) || (~((t_0 <= 2e+27)) && (t_0 <= 2e+51))) tmp = exp((x - z)); else tmp = exp(t_0); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -5e-305], And[N[Not[LessEqual[t$95$0, 2e+27]], $MachinePrecision], LessEqual[t$95$0, 2e+51]]], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Exp[t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \log y\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-305} \lor \neg \left(t\_0 \leq 2 \cdot 10^{+27}\right) \land t\_0 \leq 2 \cdot 10^{+51}:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < -4.99999999999999985e-305 or 2e27 < (*.f64 y (log.f64 y)) < 2e51Initial program 100.0%
Taylor expanded in x around inf 99.9%
if -4.99999999999999985e-305 < (*.f64 y (log.f64 y)) < 2e27 or 2e51 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in x around 0 92.4%
Taylor expanded in y around inf 85.6%
mul-1-neg85.6%
distribute-rgt-neg-in85.6%
log-rec85.6%
remove-double-neg85.6%
Simplified85.6%
Final simplification93.4%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* y (log y)))) (if (<= t_0 -5e-286) (/ (pow y y) (exp (- z x))) (exp (- t_0 z)))))
double code(double x, double y, double z) {
double t_0 = y * log(y);
double tmp;
if (t_0 <= -5e-286) {
tmp = pow(y, y) / exp((z - x));
} 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 <= (-5d-286)) then
tmp = (y ** y) / exp((z - x))
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 <= -5e-286) {
tmp = Math.pow(y, y) / Math.exp((z - x));
} 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 <= -5e-286: tmp = math.pow(y, y) / math.exp((z - x)) 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 <= -5e-286) tmp = Float64((y ^ y) / exp(Float64(z - x))); 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 <= -5e-286) tmp = (y ^ y) / exp((z - x)); 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, -5e-286], N[(N[Power[y, y], $MachinePrecision] / N[Exp[N[(z - x), $MachinePrecision]], $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 -5 \cdot 10^{-286}:\\
\;\;\;\;\frac{{y}^{y}}{e^{z - x}}\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0 - z}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < -5.00000000000000037e-286Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum87.2%
exp-diff87.2%
associate-/r/87.2%
*-commutative87.2%
exp-to-pow87.2%
div-exp100.0%
Simplified100.0%
if -5.00000000000000037e-286 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in x around 0 91.0%
Final simplification95.4%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* y (log y)))) (if (<= t_0 -5e-286) (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 <= -5e-286) {
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 <= (-5d-286)) 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 <= -5e-286) {
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 <= -5e-286: 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 <= -5e-286) 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 <= -5e-286) 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, -5e-286], 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 -5 \cdot 10^{-286}:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0 - z}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < -5.00000000000000037e-286Initial program 100.0%
Taylor expanded in x around inf 99.9%
if -5.00000000000000037e-286 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in x around 0 91.0%
Final simplification95.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.9e-8) (not (<= x 5.1e-14))) (exp x) (exp (- z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.9e-8) || !(x <= 5.1e-14)) {
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 <= (-1.9d-8)) .or. (.not. (x <= 5.1d-14))) 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 <= -1.9e-8) || !(x <= 5.1e-14)) {
tmp = Math.exp(x);
} else {
tmp = Math.exp(-z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.9e-8) or not (x <= 5.1e-14): tmp = math.exp(x) else: tmp = math.exp(-z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.9e-8) || !(x <= 5.1e-14)) tmp = exp(x); else tmp = exp(Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.9e-8) || ~((x <= 5.1e-14))) tmp = exp(x); else tmp = exp(-z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.9e-8], N[Not[LessEqual[x, 5.1e-14]], $MachinePrecision]], N[Exp[x], $MachinePrecision], N[Exp[(-z)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-8} \lor \neg \left(x \leq 5.1 \cdot 10^{-14}\right):\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;e^{-z}\\
\end{array}
\end{array}
if x < -1.90000000000000014e-8 or 5.0999999999999997e-14 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum64.6%
exp-diff58.5%
associate-/r/58.5%
*-commutative58.5%
exp-to-pow58.5%
div-exp76.2%
Simplified76.2%
Taylor expanded in y around 0 84.9%
Taylor expanded in z around 0 76.6%
exp-neg76.6%
remove-double-div76.6%
Simplified76.6%
if -1.90000000000000014e-8 < x < 5.0999999999999997e-14Initial program 100.0%
Taylor expanded in z around inf 61.4%
neg-mul-161.4%
Simplified61.4%
Final simplification69.1%
(FPCore (x y z) :precision binary64 (if (<= z -1.9e+154) (+ 1.0 (* z (+ (* z 0.5) -1.0))) (if (<= z 125000000.0) (exp x) 0.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.9e+154) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else if (z <= 125000000.0) {
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 <= (-1.9d+154)) then
tmp = 1.0d0 + (z * ((z * 0.5d0) + (-1.0d0)))
else if (z <= 125000000.0d0) 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 <= -1.9e+154) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else if (z <= 125000000.0) {
tmp = Math.exp(x);
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.9e+154: tmp = 1.0 + (z * ((z * 0.5) + -1.0)) elif z <= 125000000.0: tmp = math.exp(x) else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.9e+154) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * 0.5) + -1.0))); elseif (z <= 125000000.0) tmp = exp(x); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.9e+154) tmp = 1.0 + (z * ((z * 0.5) + -1.0)); elseif (z <= 125000000.0) tmp = exp(x); else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.9e+154], N[(1.0 + N[(z * N[(N[(z * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 125000000.0], N[Exp[x], $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+154}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5 + -1\right)\\
\mathbf{elif}\;z \leq 125000000:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if z < -1.8999999999999999e154Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum79.3%
exp-diff79.3%
associate-/r/79.3%
*-commutative79.3%
exp-to-pow79.3%
div-exp100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around 0 100.0%
if -1.8999999999999999e154 < z < 1.25e8Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum82.8%
exp-diff82.8%
associate-/r/82.8%
*-commutative82.8%
exp-to-pow82.8%
div-exp88.7%
Simplified88.7%
Taylor expanded in y around 0 67.8%
Taylor expanded in z around 0 59.4%
exp-neg59.4%
remove-double-div59.4%
Simplified59.4%
if 1.25e8 < z Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum81.0%
exp-diff37.9%
associate-/r/37.9%
*-commutative37.9%
exp-to-pow37.9%
div-exp50.0%
Simplified50.0%
Taylor expanded in y around 0 76.2%
Taylor expanded in z around 0 36.4%
Applied egg-rr67.8%
Final simplification65.9%
(FPCore (x y z) :precision binary64 (if (<= y 8.8e+64) (exp (- x z)) (/ 1.0 (pow z 6.0))))
double code(double x, double y, double z) {
double tmp;
if (y <= 8.8e+64) {
tmp = exp((x - z));
} else {
tmp = 1.0 / pow(z, 6.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 (y <= 8.8d+64) then
tmp = exp((x - z))
else
tmp = 1.0d0 / (z ** 6.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 8.8e+64) {
tmp = Math.exp((x - z));
} else {
tmp = 1.0 / Math.pow(z, 6.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 8.8e+64: tmp = math.exp((x - z)) else: tmp = 1.0 / math.pow(z, 6.0) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 8.8e+64) tmp = exp(Float64(x - z)); else tmp = Float64(1.0 / (z ^ 6.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 8.8e+64) tmp = exp((x - z)); else tmp = 1.0 / (z ^ 6.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 8.8e+64], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[Power[z, 6.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.8 \cdot 10^{+64}:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{{z}^{6}}\\
\end{array}
\end{array}
if y < 8.80000000000000007e64Initial program 100.0%
Taylor expanded in x around inf 93.7%
if 8.80000000000000007e64 < y Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum77.0%
exp-diff56.0%
associate-/r/56.0%
*-commutative56.0%
exp-to-pow56.0%
div-exp62.0%
Simplified62.0%
Taylor expanded in y around 0 41.6%
Taylor expanded in x around 0 29.0%
Applied egg-rr50.5%
Taylor expanded in z around 0 51.2%
Final simplification77.1%
(FPCore (x y z) :precision binary64 (exp (- x z)))
double code(double x, double y, double z) {
return exp((x - 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 - z))
end function
public static double code(double x, double y, double z) {
return Math.exp((x - z));
}
def code(x, y, z): return math.exp((x - z))
function code(x, y, z) return exp(Float64(x - z)) end
function tmp = code(x, y, z) tmp = exp((x - z)); end
code[x_, y_, z_] := N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{x - z}
\end{array}
Initial program 100.0%
Taylor expanded in x around inf 73.4%
Final simplification73.4%
(FPCore (x y z)
:precision binary64
(if (<= x -4e-30)
0.0
(if (<= x 9.5e-269)
(- 1.0 z)
(if (<= x 3.5e-148) 0.0 (+ 1.0 (* x (+ 1.0 (* x 0.5))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4e-30) {
tmp = 0.0;
} else if (x <= 9.5e-269) {
tmp = 1.0 - z;
} else if (x <= 3.5e-148) {
tmp = 0.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 <= (-4d-30)) then
tmp = 0.0d0
else if (x <= 9.5d-269) then
tmp = 1.0d0 - z
else if (x <= 3.5d-148) then
tmp = 0.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 <= -4e-30) {
tmp = 0.0;
} else if (x <= 9.5e-269) {
tmp = 1.0 - z;
} else if (x <= 3.5e-148) {
tmp = 0.0;
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4e-30: tmp = 0.0 elif x <= 9.5e-269: tmp = 1.0 - z elif x <= 3.5e-148: tmp = 0.0 else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4e-30) tmp = 0.0; elseif (x <= 9.5e-269) tmp = Float64(1.0 - z); elseif (x <= 3.5e-148) tmp = 0.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 <= -4e-30) tmp = 0.0; elseif (x <= 9.5e-269) tmp = 1.0 - z; elseif (x <= 3.5e-148) tmp = 0.0; else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4e-30], 0.0, If[LessEqual[x, 9.5e-269], N[(1.0 - z), $MachinePrecision], If[LessEqual[x, 3.5e-148], 0.0, 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 -4 \cdot 10^{-30}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-269}:\\
\;\;\;\;1 - z\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-148}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -4e-30 or 9.5000000000000006e-269 < x < 3.5e-148Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum64.8%
exp-diff52.8%
associate-/r/52.8%
*-commutative52.8%
exp-to-pow52.8%
div-exp66.7%
Simplified66.7%
Taylor expanded in y around 0 71.9%
Taylor expanded in z around 0 48.6%
Applied egg-rr53.6%
if -4e-30 < x < 9.5000000000000006e-269Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum100.0%
exp-diff90.5%
associate-/r/90.5%
*-commutative90.5%
exp-to-pow90.5%
div-exp90.5%
Simplified90.5%
Taylor expanded in y around 0 66.0%
Taylor expanded in x around 0 66.0%
Taylor expanded in z around 0 29.0%
mul-1-neg29.0%
unsub-neg29.0%
Simplified29.0%
if 3.5e-148 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum90.6%
exp-diff83.5%
associate-/r/83.5%
*-commutative83.5%
exp-to-pow83.5%
div-exp92.9%
Simplified92.9%
Taylor expanded in y around 0 80.6%
Taylor expanded in z around 0 73.1%
Taylor expanded in x around 0 50.8%
Final simplification46.6%
(FPCore (x y z)
:precision binary64
(if (<= x -2.05e-29)
0.0
(if (or (<= x 3.5e-269) (and (not (<= x 3.06e-148)) (<= x 4.35e-48)))
(- 1.0 z)
0.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.05e-29) {
tmp = 0.0;
} else if ((x <= 3.5e-269) || (!(x <= 3.06e-148) && (x <= 4.35e-48))) {
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 <= (-2.05d-29)) then
tmp = 0.0d0
else if ((x <= 3.5d-269) .or. (.not. (x <= 3.06d-148)) .and. (x <= 4.35d-48)) 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 <= -2.05e-29) {
tmp = 0.0;
} else if ((x <= 3.5e-269) || (!(x <= 3.06e-148) && (x <= 4.35e-48))) {
tmp = 1.0 - z;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.05e-29: tmp = 0.0 elif (x <= 3.5e-269) or (not (x <= 3.06e-148) and (x <= 4.35e-48)): tmp = 1.0 - z else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.05e-29) tmp = 0.0; elseif ((x <= 3.5e-269) || (!(x <= 3.06e-148) && (x <= 4.35e-48))) 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 <= -2.05e-29) tmp = 0.0; elseif ((x <= 3.5e-269) || (~((x <= 3.06e-148)) && (x <= 4.35e-48))) tmp = 1.0 - z; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.05e-29], 0.0, If[Or[LessEqual[x, 3.5e-269], And[N[Not[LessEqual[x, 3.06e-148]], $MachinePrecision], LessEqual[x, 4.35e-48]]], N[(1.0 - z), $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.05 \cdot 10^{-29}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-269} \lor \neg \left(x \leq 3.06 \cdot 10^{-148}\right) \land x \leq 4.35 \cdot 10^{-48}:\\
\;\;\;\;1 - z\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -2.0499999999999999e-29 or 3.50000000000000019e-269 < x < 3.0600000000000001e-148 or 4.3499999999999998e-48 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum73.3%
exp-diff62.8%
associate-/r/62.8%
*-commutative62.8%
exp-to-pow62.8%
div-exp76.2%
Simplified76.2%
Taylor expanded in y around 0 78.4%
Taylor expanded in z around 0 60.9%
Applied egg-rr38.3%
if -2.0499999999999999e-29 < x < 3.50000000000000019e-269 or 3.0600000000000001e-148 < x < 4.3499999999999998e-48Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum100.0%
exp-diff91.6%
associate-/r/91.6%
*-commutative91.6%
exp-to-pow91.6%
div-exp91.6%
Simplified91.6%
Taylor expanded in y around 0 63.0%
Taylor expanded in x around 0 63.0%
Taylor expanded in z around 0 33.4%
mul-1-neg33.4%
unsub-neg33.4%
Simplified33.4%
Final simplification36.7%
(FPCore (x y z)
:precision binary64
(if (<= x -9.8e-19)
0.0
(if (<= x 9e+42)
(+ 1.0 (* z (+ (* z 0.5) -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 <= -9.8e-19) {
tmp = 0.0;
} else if (x <= 9e+42) {
tmp = 1.0 + (z * ((z * 0.5) + -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 <= (-9.8d-19)) then
tmp = 0.0d0
else if (x <= 9d+42) then
tmp = 1.0d0 + (z * ((z * 0.5d0) + (-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 <= -9.8e-19) {
tmp = 0.0;
} else if (x <= 9e+42) {
tmp = 1.0 + (z * ((z * 0.5) + -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 <= -9.8e-19: tmp = 0.0 elif x <= 9e+42: tmp = 1.0 + (z * ((z * 0.5) + -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 <= -9.8e-19) tmp = 0.0; elseif (x <= 9e+42) 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 * Float64(0.5 + Float64(x * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -9.8e-19) tmp = 0.0; elseif (x <= 9e+42) tmp = 1.0 + (z * ((z * 0.5) + -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, -9.8e-19], 0.0, If[LessEqual[x, 9e+42], 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 * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{-19}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+42}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5 + -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 < -9.79999999999999985e-19Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum48.6%
exp-diff41.9%
associate-/r/41.9%
*-commutative41.9%
exp-to-pow41.9%
div-exp62.2%
Simplified62.2%
Taylor expanded in y around 0 80.0%
Taylor expanded in z around 0 65.4%
Applied egg-rr66.8%
if -9.79999999999999985e-19 < x < 9.00000000000000025e42Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum99.2%
exp-diff86.4%
associate-/r/86.4%
*-commutative86.4%
exp-to-pow86.4%
div-exp86.4%
Simplified86.4%
Taylor expanded in y around 0 60.3%
Taylor expanded in x around 0 58.8%
Taylor expanded in z around 0 35.9%
if 9.00000000000000025e42 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum86.0%
exp-diff80.0%
associate-/r/80.0%
*-commutative80.0%
exp-to-pow80.0%
div-exp96.0%
Simplified96.0%
Taylor expanded in y around 0 98.0%
Taylor expanded in z around 0 94.1%
Taylor expanded in x around 0 80.9%
+-commutative80.9%
distribute-lft-in80.9%
*-rgt-identity80.9%
remove-double-neg80.9%
mul-1-neg80.9%
unsub-neg80.9%
unsub-neg80.9%
mul-1-neg80.9%
remove-double-neg80.9%
*-rgt-identity80.9%
distribute-lft-in80.9%
+-commutative80.9%
*-commutative80.9%
Simplified80.9%
Final simplification53.6%
(FPCore (x y z)
:precision binary64
(if (<= x -2.25e-18)
0.0
(if (<= x 1.4e+77)
(+ 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 <= -2.25e-18) {
tmp = 0.0;
} else if (x <= 1.4e+77) {
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 <= (-2.25d-18)) then
tmp = 0.0d0
else if (x <= 1.4d+77) 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 <= -2.25e-18) {
tmp = 0.0;
} else if (x <= 1.4e+77) {
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 <= -2.25e-18: tmp = 0.0 elif x <= 1.4e+77: 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 <= -2.25e-18) tmp = 0.0; elseif (x <= 1.4e+77) 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 <= -2.25e-18) tmp = 0.0; elseif (x <= 1.4e+77) 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, -2.25e-18], 0.0, If[LessEqual[x, 1.4e+77], 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 -2.25 \cdot 10^{-18}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+77}:\\
\;\;\;\;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 < -2.24999999999999997e-18Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum48.6%
exp-diff41.9%
associate-/r/41.9%
*-commutative41.9%
exp-to-pow41.9%
div-exp62.2%
Simplified62.2%
Taylor expanded in y around 0 80.0%
Taylor expanded in z around 0 65.4%
Applied egg-rr66.8%
if -2.24999999999999997e-18 < x < 1.4e77Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum99.3%
exp-diff86.8%
associate-/r/86.8%
*-commutative86.8%
exp-to-pow86.8%
div-exp86.8%
Simplified86.8%
Taylor expanded in y around 0 61.7%
Taylor expanded in x around 0 57.5%
Taylor expanded in z around 0 35.2%
if 1.4e77 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum84.4%
exp-diff77.8%
associate-/r/77.8%
*-commutative77.8%
exp-to-pow77.8%
div-exp95.6%
Simplified95.6%
Taylor expanded in y around 0 97.8%
Taylor expanded in z around 0 93.4%
Taylor expanded in x around 0 89.3%
+-commutative89.3%
distribute-lft-in89.3%
*-rgt-identity89.3%
remove-double-neg89.3%
mul-1-neg89.3%
unsub-neg89.3%
unsub-neg89.3%
mul-1-neg89.3%
remove-double-neg89.3%
*-rgt-identity89.3%
distribute-lft-in89.3%
+-commutative89.3%
*-commutative89.3%
Simplified89.3%
Final simplification53.8%
(FPCore (x y z)
:precision binary64
(if (<= x -2.25e-18)
0.0
(if (<= x 9e+145)
(+ 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 <= -2.25e-18) {
tmp = 0.0;
} else if (x <= 9e+145) {
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 <= (-2.25d-18)) then
tmp = 0.0d0
else if (x <= 9d+145) 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 <= -2.25e-18) {
tmp = 0.0;
} else if (x <= 9e+145) {
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 <= -2.25e-18: tmp = 0.0 elif x <= 9e+145: 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 <= -2.25e-18) tmp = 0.0; elseif (x <= 9e+145) 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 <= -2.25e-18) tmp = 0.0; elseif (x <= 9e+145) 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, -2.25e-18], 0.0, If[LessEqual[x, 9e+145], 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 -2.25 \cdot 10^{-18}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+145}:\\
\;\;\;\;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 < -2.24999999999999997e-18Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum48.6%
exp-diff41.9%
associate-/r/41.9%
*-commutative41.9%
exp-to-pow41.9%
div-exp62.2%
Simplified62.2%
Taylor expanded in y around 0 80.0%
Taylor expanded in z around 0 65.4%
Applied egg-rr66.8%
if -2.24999999999999997e-18 < x < 8.9999999999999996e145Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum97.3%
exp-diff85.2%
associate-/r/85.2%
*-commutative85.2%
exp-to-pow85.2%
div-exp86.6%
Simplified86.6%
Taylor expanded in y around 0 64.2%
Taylor expanded in x around 0 56.3%
Taylor expanded in z around 0 34.2%
if 8.9999999999999996e145 < x Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum87.9%
exp-diff81.8%
associate-/r/81.8%
*-commutative81.8%
exp-to-pow81.8%
div-exp100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in z around 0 97.0%
Taylor expanded in x around 0 94.3%
Final simplification51.3%
(FPCore (x y z) :precision binary64 (if (<= z -22.0) 0.0 (if (<= z 2.9e-236) 1.0 0.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -22.0) {
tmp = 0.0;
} else if (z <= 2.9e-236) {
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 (z <= (-22.0d0)) then
tmp = 0.0d0
else if (z <= 2.9d-236) 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 (z <= -22.0) {
tmp = 0.0;
} else if (z <= 2.9e-236) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -22.0: tmp = 0.0 elif z <= 2.9e-236: tmp = 1.0 else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -22.0) tmp = 0.0; elseif (z <= 2.9e-236) tmp = 1.0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -22.0) tmp = 0.0; elseif (z <= 2.9e-236) tmp = 1.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -22.0], 0.0, If[LessEqual[z, 2.9e-236], 1.0, 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22:\\
\;\;\;\;0\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-236}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if z < -22 or 2.9e-236 < z Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum78.6%
exp-diff63.7%
associate-/r/63.7%
*-commutative63.7%
exp-to-pow63.7%
div-exp77.4%
Simplified77.4%
Taylor expanded in y around 0 77.9%
Taylor expanded in z around 0 46.7%
Applied egg-rr35.1%
if -22 < z < 2.9e-236Initial program 100.0%
associate--l+100.0%
+-commutative100.0%
exp-sum88.6%
exp-diff88.6%
associate-/r/88.6%
*-commutative88.6%
exp-to-pow88.6%
div-exp88.6%
Simplified88.6%
Taylor expanded in y around 0 64.7%
Taylor expanded in x around 0 31.7%
Taylor expanded in z around 0 27.8%
Final simplification32.6%
(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%
associate--l+100.0%
+-commutative100.0%
exp-sum82.0%
exp-diff72.3%
associate-/r/72.3%
*-commutative72.3%
exp-to-pow72.3%
div-exp81.2%
Simplified81.2%
Taylor expanded in y around 0 73.4%
Taylor expanded in z around 0 51.6%
Applied egg-rr29.9%
Final simplification29.9%
(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 2024082
(FPCore (x y z)
:name "Statistics.Distribution.Poisson.Internal:probability from math-functions-0.1.5.2"
:precision binary64
:alt
(exp (+ (- x z) (* (log y) y)))
(exp (- (+ x (* y (log y))) z)))