
(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 16 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 -1.45e+42) (not (<= x 750.0))) (exp (- x z)) (exp (- (* y (log y)) z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.45e+42) || !(x <= 750.0)) {
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 <= (-1.45d+42)) .or. (.not. (x <= 750.0d0))) 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 <= -1.45e+42) || !(x <= 750.0)) {
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 <= -1.45e+42) or not (x <= 750.0): 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 <= -1.45e+42) || !(x <= 750.0)) 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 <= -1.45e+42) || ~((x <= 750.0))) tmp = exp((x - z)); else tmp = exp(((y * log(y)) - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.45e+42], N[Not[LessEqual[x, 750.0]], $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 -1.45 \cdot 10^{+42} \lor \neg \left(x \leq 750\right):\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;e^{y \cdot \log y - z}\\
\end{array}
\end{array}
if x < -1.4499999999999999e42 or 750 < x Initial program 100.0%
Taylor expanded in y around 0 95.8%
if -1.4499999999999999e42 < x < 750Initial program 100.0%
Taylor expanded in x around 0 98.9%
Final simplification97.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.6e+39) (not (<= x 450.0))) (exp (- x z)) (/ (pow y y) (exp z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.6e+39) || !(x <= 450.0)) {
tmp = exp((x - z));
} else {
tmp = pow(y, y) / exp(z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.6d+39)) .or. (.not. (x <= 450.0d0))) then
tmp = exp((x - z))
else
tmp = (y ** y) / exp(z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.6e+39) || !(x <= 450.0)) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y) / Math.exp(z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.6e+39) or not (x <= 450.0): tmp = math.exp((x - z)) else: tmp = math.pow(y, y) / math.exp(z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.6e+39) || !(x <= 450.0)) tmp = exp(Float64(x - z)); else tmp = Float64((y ^ y) / exp(z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.6e+39) || ~((x <= 450.0))) tmp = exp((x - z)); else tmp = (y ^ y) / exp(z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.6e+39], N[Not[LessEqual[x, 450.0]], $MachinePrecision]], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[(N[Power[y, y], $MachinePrecision] / N[Exp[z], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+39} \lor \neg \left(x \leq 450\right):\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{{y}^{y}}{e^{z}}\\
\end{array}
\end{array}
if x < -5.60000000000000003e39 or 450 < x Initial program 100.0%
Taylor expanded in y around 0 95.8%
if -5.60000000000000003e39 < x < 450Initial program 100.0%
Taylor expanded in x around 0 98.9%
exp-diff89.6%
*-commutative89.6%
exp-to-pow89.6%
Simplified89.6%
Final simplification92.4%
(FPCore (x y z) :precision binary64 (if (<= x -6.2e+54) 0.0 (if (<= x 700.0) (pow y y) (exp x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6.2e+54) {
tmp = 0.0;
} else if (x <= 700.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 <= (-6.2d+54)) then
tmp = 0.0d0
else if (x <= 700.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 <= -6.2e+54) {
tmp = 0.0;
} else if (x <= 700.0) {
tmp = Math.pow(y, y);
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6.2e+54: tmp = 0.0 elif x <= 700.0: tmp = math.pow(y, y) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6.2e+54) tmp = 0.0; elseif (x <= 700.0) tmp = y ^ y; else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6.2e+54) tmp = 0.0; elseif (x <= 700.0) tmp = y ^ y; else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6.2e+54], 0.0, If[LessEqual[x, 700.0], N[Power[y, y], $MachinePrecision], N[Exp[x], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+54}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 700:\\
\;\;\;\;{y}^{y}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if x < -6.1999999999999999e54Initial program 100.0%
Taylor expanded in z around inf 43.8%
neg-mul-143.8%
Simplified43.8%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.6%
neg-mul-13.6%
Simplified3.6%
add-log-exp52.3%
exp-neg52.3%
add-sqr-sqrt52.3%
associate-/r*52.3%
metadata-eval52.3%
sqrt-div52.3%
exp-neg52.3%
pow152.3%
pow152.3%
add-sqr-sqrt37.7%
sqrt-unprod51.8%
sqr-neg51.8%
sqrt-unprod14.1%
add-sqr-sqrt42.2%
pow142.2%
pow142.2%
log-div42.2%
Applied egg-rr84.6%
+-inverses84.6%
Simplified84.6%
if -6.1999999999999999e54 < x < 700Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum89.4%
*-commutative89.4%
exp-to-pow89.4%
Simplified89.4%
Taylor expanded in z around 0 70.1%
Taylor expanded in x around 0 71.8%
if 700 < x Initial program 100.0%
Taylor expanded in x around inf 90.2%
(FPCore (x y z) :precision binary64 (if (<= z -710.0) (exp (- z)) (if (<= z 3.6e+79) (exp x) 0.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -710.0) {
tmp = exp(-z);
} else if (z <= 3.6e+79) {
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 <= (-710.0d0)) then
tmp = exp(-z)
else if (z <= 3.6d+79) 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 <= -710.0) {
tmp = Math.exp(-z);
} else if (z <= 3.6e+79) {
tmp = Math.exp(x);
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -710.0: tmp = math.exp(-z) elif z <= 3.6e+79: tmp = math.exp(x) else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -710.0) tmp = exp(Float64(-z)); elseif (z <= 3.6e+79) tmp = exp(x); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -710.0) tmp = exp(-z); elseif (z <= 3.6e+79) tmp = exp(x); else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -710.0], N[Exp[(-z)], $MachinePrecision], If[LessEqual[z, 3.6e+79], N[Exp[x], $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -710:\\
\;\;\;\;e^{-z}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+79}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if z < -710Initial program 100.0%
Taylor expanded in z around inf 89.9%
neg-mul-189.9%
Simplified89.9%
if -710 < z < 3.5999999999999999e79Initial program 100.0%
Taylor expanded in x around inf 66.6%
if 3.5999999999999999e79 < z Initial program 100.0%
Taylor expanded in z around inf 80.8%
neg-mul-180.8%
Simplified80.8%
Taylor expanded in z around 0 1.7%
mul-1-neg1.7%
unsub-neg1.7%
Simplified1.7%
Taylor expanded in z around inf 1.7%
neg-mul-11.7%
Simplified1.7%
add-log-exp1.3%
exp-neg1.3%
add-sqr-sqrt1.3%
associate-/r*1.3%
metadata-eval1.3%
sqrt-div1.3%
exp-neg1.3%
pow11.3%
pow11.3%
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-rr80.8%
+-inverses80.8%
Simplified80.8%
(FPCore (x y z) :precision binary64 (if (<= z -4.6e+112) (+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0))) (if (<= z 3.6e+79) (exp x) 0.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.6e+112) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if (z <= 3.6e+79) {
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 <= (-4.6d+112)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else if (z <= 3.6d+79) 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 <= -4.6e+112) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if (z <= 3.6e+79) {
tmp = Math.exp(x);
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.6e+112: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) elif z <= 3.6e+79: tmp = math.exp(x) else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.6e+112) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); elseif (z <= 3.6e+79) tmp = exp(x); else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.6e+112) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); elseif (z <= 3.6e+79) tmp = exp(x); else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.6e+112], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+79], N[Exp[x], $MachinePrecision], 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+112}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+79}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if z < -4.5999999999999999e112Initial program 100.0%
Taylor expanded in z around inf 91.4%
neg-mul-191.4%
Simplified91.4%
Taylor expanded in z around 0 91.4%
Taylor expanded in z around inf 91.4%
*-commutative91.4%
Simplified91.4%
if -4.5999999999999999e112 < z < 3.5999999999999999e79Initial program 100.0%
Taylor expanded in x around inf 62.3%
if 3.5999999999999999e79 < z Initial program 100.0%
Taylor expanded in z around inf 80.8%
neg-mul-180.8%
Simplified80.8%
Taylor expanded in z around 0 1.7%
mul-1-neg1.7%
unsub-neg1.7%
Simplified1.7%
Taylor expanded in z around inf 1.7%
neg-mul-11.7%
Simplified1.7%
add-log-exp1.3%
exp-neg1.3%
add-sqr-sqrt1.3%
associate-/r*1.3%
metadata-eval1.3%
sqrt-div1.3%
exp-neg1.3%
pow11.3%
pow11.3%
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-rr80.8%
+-inverses80.8%
Simplified80.8%
Final simplification70.5%
(FPCore (x y z) :precision binary64 (if (<= y 3.8e+20) (exp (- x z)) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 3.8e+20) {
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 <= 3.8d+20) 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 <= 3.8e+20) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 3.8e+20: tmp = math.exp((x - z)) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 3.8e+20) 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 <= 3.8e+20) tmp = exp((x - z)); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 3.8e+20], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.8 \cdot 10^{+20}:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 3.8e20Initial program 100.0%
Taylor expanded in y around 0 99.3%
if 3.8e20 < y Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum64.0%
*-commutative64.0%
exp-to-pow64.0%
Simplified64.0%
Taylor expanded in z around 0 67.2%
Taylor expanded in x around 0 78.0%
(FPCore (x y z)
:precision binary64
(if (<= x -2.3e+54)
0.0
(if (<= x 1.2e+59)
(+ 1.0 (* z (+ (* z (+ (* z -0.16666666666666666) 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 <= -2.3e+54) {
tmp = 0.0;
} else if (x <= 1.2e+59) {
tmp = 1.0 + (z * ((z * ((z * -0.16666666666666666) + 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 <= (-2.3d+54)) then
tmp = 0.0d0
else if (x <= 1.2d+59) then
tmp = 1.0d0 + (z * ((z * ((z * (-0.16666666666666666d0)) + 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 <= -2.3e+54) {
tmp = 0.0;
} else if (x <= 1.2e+59) {
tmp = 1.0 + (z * ((z * ((z * -0.16666666666666666) + 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 <= -2.3e+54: tmp = 0.0 elif x <= 1.2e+59: tmp = 1.0 + (z * ((z * ((z * -0.16666666666666666) + 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 <= -2.3e+54) tmp = 0.0; elseif (x <= 1.2e+59) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(Float64(z * -0.16666666666666666) + 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 <= -2.3e+54) tmp = 0.0; elseif (x <= 1.2e+59) tmp = 1.0 + (z * ((z * ((z * -0.16666666666666666) + 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, -2.3e+54], 0.0, If[LessEqual[x, 1.2e+59], N[(1.0 + N[(z * N[(N[(z * N[(N[(z * -0.16666666666666666), $MachinePrecision] + 0.5), $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.3 \cdot 10^{+54}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+59}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666 + 0.5\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.29999999999999994e54Initial program 100.0%
Taylor expanded in z around inf 43.8%
neg-mul-143.8%
Simplified43.8%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.6%
neg-mul-13.6%
Simplified3.6%
add-log-exp52.3%
exp-neg52.3%
add-sqr-sqrt52.3%
associate-/r*52.3%
metadata-eval52.3%
sqrt-div52.3%
exp-neg52.3%
pow152.3%
pow152.3%
add-sqr-sqrt37.7%
sqrt-unprod51.8%
sqr-neg51.8%
sqrt-unprod14.1%
add-sqr-sqrt42.2%
pow142.2%
pow142.2%
log-div42.2%
Applied egg-rr84.6%
+-inverses84.6%
Simplified84.6%
if -2.29999999999999994e54 < x < 1.2000000000000001e59Initial program 100.0%
Taylor expanded in z around inf 61.6%
neg-mul-161.6%
Simplified61.6%
Taylor expanded in z around 0 41.8%
if 1.2000000000000001e59 < x Initial program 100.0%
Taylor expanded in x around inf 89.9%
Taylor expanded in x around 0 87.7%
*-commutative87.7%
Simplified87.7%
Final simplification59.5%
(FPCore (x y z)
:precision binary64
(if (<= x -2.3e+54)
0.0
(if (<= x 4.5e+58)
(+ 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 <= -2.3e+54) {
tmp = 0.0;
} else if (x <= 4.5e+58) {
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 <= (-2.3d+54)) then
tmp = 0.0d0
else if (x <= 4.5d+58) 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 <= -2.3e+54) {
tmp = 0.0;
} else if (x <= 4.5e+58) {
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 <= -2.3e+54: tmp = 0.0 elif x <= 4.5e+58: 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 <= -2.3e+54) tmp = 0.0; elseif (x <= 4.5e+58) 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 <= -2.3e+54) tmp = 0.0; elseif (x <= 4.5e+58) 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, -2.3e+54], 0.0, If[LessEqual[x, 4.5e+58], 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 -2.3 \cdot 10^{+54}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+58}:\\
\;\;\;\;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.29999999999999994e54Initial program 100.0%
Taylor expanded in z around inf 43.8%
neg-mul-143.8%
Simplified43.8%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.6%
neg-mul-13.6%
Simplified3.6%
add-log-exp52.3%
exp-neg52.3%
add-sqr-sqrt52.3%
associate-/r*52.3%
metadata-eval52.3%
sqrt-div52.3%
exp-neg52.3%
pow152.3%
pow152.3%
add-sqr-sqrt37.7%
sqrt-unprod51.8%
sqr-neg51.8%
sqrt-unprod14.1%
add-sqr-sqrt42.2%
pow142.2%
pow142.2%
log-div42.2%
Applied egg-rr84.6%
+-inverses84.6%
Simplified84.6%
if -2.29999999999999994e54 < x < 4.4999999999999998e58Initial program 100.0%
Taylor expanded in z around inf 61.6%
neg-mul-161.6%
Simplified61.6%
Taylor expanded in z around 0 41.8%
Taylor expanded in z around inf 41.6%
*-commutative41.6%
Simplified41.6%
if 4.4999999999999998e58 < x Initial program 100.0%
Taylor expanded in x around inf 89.9%
Taylor expanded in x around 0 87.7%
*-commutative87.7%
Simplified87.7%
Final simplification59.4%
(FPCore (x y z)
:precision binary64
(if (<= x -2.3e+54)
0.0
(if (<= x 1.2e+59)
(+ 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 (x <= -2.3e+54) {
tmp = 0.0;
} else if (x <= 1.2e+59) {
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 (x <= (-2.3d+54)) then
tmp = 0.0d0
else if (x <= 1.2d+59) 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 (x <= -2.3e+54) {
tmp = 0.0;
} else if (x <= 1.2e+59) {
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 x <= -2.3e+54: tmp = 0.0 elif x <= 1.2e+59: 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 (x <= -2.3e+54) tmp = 0.0; elseif (x <= 1.2e+59) 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 (x <= -2.3e+54) tmp = 0.0; elseif (x <= 1.2e+59) 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[x, -2.3e+54], 0.0, If[LessEqual[x, 1.2e+59], 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}\;x \leq -2.3 \cdot 10^{+54}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+59}:\\
\;\;\;\;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 x < -2.29999999999999994e54Initial program 100.0%
Taylor expanded in z around inf 43.8%
neg-mul-143.8%
Simplified43.8%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.6%
neg-mul-13.6%
Simplified3.6%
add-log-exp52.3%
exp-neg52.3%
add-sqr-sqrt52.3%
associate-/r*52.3%
metadata-eval52.3%
sqrt-div52.3%
exp-neg52.3%
pow152.3%
pow152.3%
add-sqr-sqrt37.7%
sqrt-unprod51.8%
sqr-neg51.8%
sqrt-unprod14.1%
add-sqr-sqrt42.2%
pow142.2%
pow142.2%
log-div42.2%
Applied egg-rr84.6%
+-inverses84.6%
Simplified84.6%
if -2.29999999999999994e54 < x < 1.2000000000000001e59Initial program 100.0%
Taylor expanded in z around inf 61.6%
neg-mul-161.6%
Simplified61.6%
Taylor expanded in z around 0 41.8%
Taylor expanded in z around inf 41.6%
*-commutative41.6%
Simplified41.6%
if 1.2000000000000001e59 < x Initial program 100.0%
Taylor expanded in x around inf 89.9%
Taylor expanded in x around 0 71.1%
*-commutative71.1%
Simplified71.1%
Final simplification56.8%
(FPCore (x y z)
:precision binary64
(if (<= x -2.2e+41)
0.0
(if (<= x 1.45e+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.2e+41) {
tmp = 0.0;
} else if (x <= 1.45e+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.2d+41)) then
tmp = 0.0d0
else if (x <= 1.45d+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.2e+41) {
tmp = 0.0;
} else if (x <= 1.45e+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.2e+41: tmp = 0.0 elif x <= 1.45e+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.2e+41) tmp = 0.0; elseif (x <= 1.45e+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.2e+41) tmp = 0.0; elseif (x <= 1.45e+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.2e+41], 0.0, If[LessEqual[x, 1.45e+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.2 \cdot 10^{+41}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 1.45 \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.1999999999999999e41Initial program 100.0%
Taylor expanded in z around inf 44.0%
neg-mul-144.0%
Simplified44.0%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.7%
neg-mul-13.7%
Simplified3.7%
add-log-exp53.8%
exp-neg53.8%
add-sqr-sqrt53.8%
associate-/r*53.8%
metadata-eval53.8%
sqrt-div53.8%
exp-neg53.8%
pow153.8%
pow153.8%
add-sqr-sqrt38.1%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-unprod15.2%
add-sqr-sqrt42.5%
pow142.5%
pow142.5%
log-div42.5%
Applied egg-rr83.6%
+-inverses83.6%
Simplified83.6%
if -2.1999999999999999e41 < x < 1.45e145Initial program 100.0%
Taylor expanded in z around inf 60.8%
neg-mul-160.8%
Simplified60.8%
Taylor expanded in z around 0 36.8%
if 1.45e145 < x Initial program 100.0%
Taylor expanded in x around inf 96.7%
Taylor expanded in x around 0 90.8%
*-commutative90.8%
Simplified90.8%
Final simplification55.2%
(FPCore (x y z)
:precision binary64
(if (<= x -2.8e+39)
0.0
(if (<= x 9.5e+145)
(+ 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 <= -2.8e+39) {
tmp = 0.0;
} else if (x <= 9.5e+145) {
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 <= (-2.8d+39)) then
tmp = 0.0d0
else if (x <= 9.5d+145) 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 <= -2.8e+39) {
tmp = 0.0;
} else if (x <= 9.5e+145) {
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 <= -2.8e+39: tmp = 0.0 elif x <= 9.5e+145: 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 <= -2.8e+39) tmp = 0.0; elseif (x <= 9.5e+145) 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 <= -2.8e+39) tmp = 0.0; elseif (x <= 9.5e+145) 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, -2.8e+39], 0.0, If[LessEqual[x, 9.5e+145], 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 -2.8 \cdot 10^{+39}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+145}:\\
\;\;\;\;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 < -2.80000000000000001e39Initial program 100.0%
Taylor expanded in z around inf 44.0%
neg-mul-144.0%
Simplified44.0%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.7%
neg-mul-13.7%
Simplified3.7%
add-log-exp53.8%
exp-neg53.8%
add-sqr-sqrt53.8%
associate-/r*53.8%
metadata-eval53.8%
sqrt-div53.8%
exp-neg53.8%
pow153.8%
pow153.8%
add-sqr-sqrt38.1%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-unprod15.2%
add-sqr-sqrt42.5%
pow142.5%
pow142.5%
log-div42.5%
Applied egg-rr83.6%
+-inverses83.6%
Simplified83.6%
if -2.80000000000000001e39 < x < 9.49999999999999948e145Initial program 100.0%
Taylor expanded in z around inf 60.8%
neg-mul-160.8%
Simplified60.8%
Taylor expanded in z around 0 36.8%
Taylor expanded in z around inf 36.5%
*-commutative36.5%
Simplified36.5%
if 9.49999999999999948e145 < x Initial program 100.0%
Taylor expanded in x around inf 96.7%
Taylor expanded in x around 0 90.8%
*-commutative90.8%
Simplified90.8%
(FPCore (x y z) :precision binary64 (if (<= x -2.8e+41) 0.0 (+ 1.0 (* z (* z 0.5)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.8e+41) {
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 <= (-2.8d+41)) 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 <= -2.8e+41) {
tmp = 0.0;
} else {
tmp = 1.0 + (z * (z * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.8e+41: tmp = 0.0 else: tmp = 1.0 + (z * (z * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.8e+41) 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 <= -2.8e+41) tmp = 0.0; else tmp = 1.0 + (z * (z * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.8e+41], 0.0, N[(1.0 + N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+41}:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -2.7999999999999999e41Initial program 100.0%
Taylor expanded in z around inf 44.0%
neg-mul-144.0%
Simplified44.0%
Taylor expanded in z around 0 3.0%
mul-1-neg3.0%
unsub-neg3.0%
Simplified3.0%
Taylor expanded in z around inf 3.7%
neg-mul-13.7%
Simplified3.7%
add-log-exp53.8%
exp-neg53.8%
add-sqr-sqrt53.8%
associate-/r*53.8%
metadata-eval53.8%
sqrt-div53.8%
exp-neg53.8%
pow153.8%
pow153.8%
add-sqr-sqrt38.1%
sqrt-unprod53.3%
sqr-neg53.3%
sqrt-unprod15.2%
add-sqr-sqrt42.5%
pow142.5%
pow142.5%
log-div42.5%
Applied egg-rr83.6%
+-inverses83.6%
Simplified83.6%
if -2.7999999999999999e41 < x Initial program 100.0%
Taylor expanded in z around inf 54.2%
neg-mul-154.2%
Simplified54.2%
Taylor expanded in z around 0 32.5%
Taylor expanded in z around inf 32.3%
*-commutative32.3%
Simplified32.3%
(FPCore (x y z) :precision binary64 (if (<= x -1.46e+24) 0.0 (if (<= x 5e-61) 1.0 0.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.46e+24) {
tmp = 0.0;
} else if (x <= 5e-61) {
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 <= (-1.46d+24)) then
tmp = 0.0d0
else if (x <= 5d-61) 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 <= -1.46e+24) {
tmp = 0.0;
} else if (x <= 5e-61) {
tmp = 1.0;
} else {
tmp = 0.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.46e+24: tmp = 0.0 elif x <= 5e-61: tmp = 1.0 else: tmp = 0.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.46e+24) tmp = 0.0; elseif (x <= 5e-61) tmp = 1.0; else tmp = 0.0; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.46e+24) tmp = 0.0; elseif (x <= 5e-61) tmp = 1.0; else tmp = 0.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.46e+24], 0.0, If[LessEqual[x, 5e-61], 1.0, 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.46 \cdot 10^{+24}:\\
\;\;\;\;0\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-61}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if x < -1.46000000000000013e24 or 4.9999999999999999e-61 < x Initial program 100.0%
Taylor expanded in z around inf 40.6%
neg-mul-140.6%
Simplified40.6%
Taylor expanded in z around 0 4.7%
mul-1-neg4.7%
unsub-neg4.7%
Simplified4.7%
Taylor expanded in z around inf 3.1%
neg-mul-13.1%
Simplified3.1%
add-log-exp37.1%
exp-neg37.1%
add-sqr-sqrt37.1%
associate-/r*37.1%
metadata-eval37.1%
sqrt-div37.1%
exp-neg37.1%
pow137.1%
pow137.1%
add-sqr-sqrt29.2%
sqrt-unprod36.7%
sqr-neg36.7%
sqrt-unprod7.5%
add-sqr-sqrt21.8%
pow121.8%
pow121.8%
log-div21.8%
Applied egg-rr48.6%
+-inverses48.6%
Simplified48.6%
if -1.46000000000000013e24 < x < 4.9999999999999999e-61Initial program 100.0%
Taylor expanded in x around inf 23.3%
Taylor expanded in x around 0 23.0%
(FPCore (x y z) :precision binary64 (if (<= x -0.0057) 0.0 (+ x 1.0)))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.0057) {
tmp = 0.0;
} else {
tmp = x + 1.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.0057d0)) then
tmp = 0.0d0
else
tmp = x + 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.0057) {
tmp = 0.0;
} else {
tmp = x + 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.0057: tmp = 0.0 else: tmp = x + 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.0057) tmp = 0.0; else tmp = Float64(x + 1.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.0057) tmp = 0.0; else tmp = x + 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.0057], 0.0, N[(x + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0057:\\
\;\;\;\;0\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if x < -0.0057000000000000002Initial program 100.0%
Taylor expanded in z around inf 46.4%
neg-mul-146.4%
Simplified46.4%
Taylor expanded in z around 0 3.1%
mul-1-neg3.1%
unsub-neg3.1%
Simplified3.1%
Taylor expanded in z around inf 3.6%
neg-mul-13.6%
Simplified3.6%
add-log-exp54.5%
exp-neg54.5%
add-sqr-sqrt54.5%
associate-/r*54.5%
metadata-eval54.5%
sqrt-div54.5%
exp-neg54.5%
pow154.5%
pow154.5%
add-sqr-sqrt41.2%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod12.9%
add-sqr-sqrt37.3%
pow137.3%
pow137.3%
log-div37.3%
Applied egg-rr73.5%
+-inverses73.5%
Simplified73.5%
if -0.0057000000000000002 < x Initial program 100.0%
Taylor expanded in x around inf 42.5%
Taylor expanded in x around 0 18.7%
Final simplification35.4%
(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 51.6%
neg-mul-151.6%
Simplified51.6%
Taylor expanded in z around 0 13.5%
mul-1-neg13.5%
unsub-neg13.5%
Simplified13.5%
Taylor expanded in z around inf 3.2%
neg-mul-13.2%
Simplified3.2%
add-log-exp35.9%
exp-neg35.9%
add-sqr-sqrt35.9%
associate-/r*35.9%
metadata-eval35.9%
sqrt-div35.9%
exp-neg35.9%
pow135.9%
pow135.9%
add-sqr-sqrt31.4%
sqrt-unprod35.7%
sqr-neg35.7%
sqrt-unprod4.3%
add-sqr-sqrt12.1%
pow112.1%
pow112.1%
log-div12.1%
Applied egg-rr30.6%
+-inverses30.6%
Simplified30.6%
(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 2024141
(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)))