
(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 21 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))) (t_1 (exp (- z x))))
(if (<= t_0 5e+72)
(/ (pow y y) t_1)
(if (<= t_0 1e+179) (/ 1.0 t_1) (pow y y)))))
double code(double x, double y, double z) {
double t_0 = y * log(y);
double t_1 = exp((z - x));
double tmp;
if (t_0 <= 5e+72) {
tmp = pow(y, y) / t_1;
} else if (t_0 <= 1e+179) {
tmp = 1.0 / t_1;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * log(y)
t_1 = exp((z - x))
if (t_0 <= 5d+72) then
tmp = (y ** y) / t_1
else if (t_0 <= 1d+179) then
tmp = 1.0d0 / t_1
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = y * Math.log(y);
double t_1 = Math.exp((z - x));
double tmp;
if (t_0 <= 5e+72) {
tmp = Math.pow(y, y) / t_1;
} else if (t_0 <= 1e+179) {
tmp = 1.0 / t_1;
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): t_0 = y * math.log(y) t_1 = math.exp((z - x)) tmp = 0 if t_0 <= 5e+72: tmp = math.pow(y, y) / t_1 elif t_0 <= 1e+179: tmp = 1.0 / t_1 else: tmp = math.pow(y, y) return tmp
function code(x, y, z) t_0 = Float64(y * log(y)) t_1 = exp(Float64(z - x)) tmp = 0.0 if (t_0 <= 5e+72) tmp = Float64((y ^ y) / t_1); elseif (t_0 <= 1e+179) tmp = Float64(1.0 / t_1); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * log(y); t_1 = exp((z - x)); tmp = 0.0; if (t_0 <= 5e+72) tmp = (y ^ y) / t_1; elseif (t_0 <= 1e+179) tmp = 1.0 / t_1; else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(z - x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, 5e+72], N[(N[Power[y, y], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$0, 1e+179], N[(1.0 / t$95$1), $MachinePrecision], N[Power[y, y], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \log y\\
t_1 := e^{z - x}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{+72}:\\
\;\;\;\;\frac{{y}^{y}}{t\_1}\\
\mathbf{elif}\;t\_0 \leq 10^{+179}:\\
\;\;\;\;\frac{1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 4.99999999999999992e72Initial program 100.0%
associate--l+N/A
+-commutativeN/A
associate-+l-N/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f6494.4%
Simplified94.4%
if 4.99999999999999992e72 < (*.f64 y (log.f64 y)) < 9.9999999999999998e178Initial program 100.0%
associate--l+N/A
+-commutativeN/A
associate-+l-N/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f6445.5%
Simplified45.5%
Taylor expanded in y around 0
Simplified73.4%
if 9.9999999999999998e178 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
*-lowering-*.f64N/A
log-lowering-log.f6494.2%
Simplified94.2%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6494.2%
Applied egg-rr94.2%
(FPCore (x y z) :precision binary64 (if (<= (* y (log y)) 1e+179) (/ 1.0 (exp (- z x))) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if ((y * log(y)) <= 1e+179) {
tmp = 1.0 / exp((z - x));
} 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 * log(y)) <= 1d+179) then
tmp = 1.0d0 / exp((z - x))
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y * Math.log(y)) <= 1e+179) {
tmp = 1.0 / Math.exp((z - x));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y * math.log(y)) <= 1e+179: tmp = 1.0 / math.exp((z - x)) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y * log(y)) <= 1e+179) tmp = Float64(1.0 / exp(Float64(z - x))); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y * log(y)) <= 1e+179) tmp = 1.0 / exp((z - x)); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision], 1e+179], N[(1.0 / N[Exp[N[(z - x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \log y \leq 10^{+179}:\\
\;\;\;\;\frac{1}{e^{z - x}}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 9.9999999999999998e178Initial program 100.0%
associate--l+N/A
+-commutativeN/A
associate-+l-N/A
exp-diffN/A
/-lowering-/.f64N/A
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f6483.9%
Simplified83.9%
Taylor expanded in y around 0
Simplified87.2%
if 9.9999999999999998e178 < (*.f64 y (log.f64 y)) Initial program 100.0%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
*-lowering-*.f64N/A
log-lowering-log.f6494.2%
Simplified94.2%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6494.2%
Applied egg-rr94.2%
(FPCore (x y z) :precision binary64 (let* ((t_0 (exp (- 0.0 z)))) (if (<= z -1.8e+41) t_0 (if (<= z 1.55e-28) (exp x) t_0))))
double code(double x, double y, double z) {
double t_0 = exp((0.0 - z));
double tmp;
if (z <= -1.8e+41) {
tmp = t_0;
} else if (z <= 1.55e-28) {
tmp = exp(x);
} else {
tmp = 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 = exp((0.0d0 - z))
if (z <= (-1.8d+41)) then
tmp = t_0
else if (z <= 1.55d-28) then
tmp = exp(x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.exp((0.0 - z));
double tmp;
if (z <= -1.8e+41) {
tmp = t_0;
} else if (z <= 1.55e-28) {
tmp = Math.exp(x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = math.exp((0.0 - z)) tmp = 0 if z <= -1.8e+41: tmp = t_0 elif z <= 1.55e-28: tmp = math.exp(x) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = exp(Float64(0.0 - z)) tmp = 0.0 if (z <= -1.8e+41) tmp = t_0; elseif (z <= 1.55e-28) tmp = exp(x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = exp((0.0 - z)); tmp = 0.0; if (z <= -1.8e+41) tmp = t_0; elseif (z <= 1.55e-28) tmp = exp(x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[Exp[N[(0.0 - z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[z, -1.8e+41], t$95$0, If[LessEqual[z, 1.55e-28], N[Exp[x], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{0 - z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+41}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-28}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.80000000000000013e41 or 1.54999999999999996e-28 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6483.2%
Simplified83.2%
sub0-negN/A
neg-lowering-neg.f6483.2%
Applied egg-rr83.2%
if -1.80000000000000013e41 < z < 1.54999999999999996e-28Initial program 100.0%
Taylor expanded in x around inf
Simplified70.4%
Final simplification76.2%
(FPCore (x y z) :precision binary64 (if (<= y 4.5e-192) (exp (- 0.0 z)) (if (<= y 200.0) (exp x) (pow y y))))
double code(double x, double y, double z) {
double tmp;
if (y <= 4.5e-192) {
tmp = exp((0.0 - z));
} else if (y <= 200.0) {
tmp = exp(x);
} 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 <= 4.5d-192) then
tmp = exp((0.0d0 - z))
else if (y <= 200.0d0) then
tmp = exp(x)
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 4.5e-192) {
tmp = Math.exp((0.0 - z));
} else if (y <= 200.0) {
tmp = Math.exp(x);
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 4.5e-192: tmp = math.exp((0.0 - z)) elif y <= 200.0: tmp = math.exp(x) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 4.5e-192) tmp = exp(Float64(0.0 - z)); elseif (y <= 200.0) tmp = exp(x); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 4.5e-192) tmp = exp((0.0 - z)); elseif (y <= 200.0) tmp = exp(x); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 4.5e-192], N[Exp[N[(0.0 - z), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 200.0], N[Exp[x], $MachinePrecision], N[Power[y, y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{-192}:\\
\;\;\;\;e^{0 - z}\\
\mathbf{elif}\;y \leq 200:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 4.50000000000000024e-192Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6484.7%
Simplified84.7%
sub0-negN/A
neg-lowering-neg.f6484.7%
Applied egg-rr84.7%
if 4.50000000000000024e-192 < y < 200Initial program 100.0%
Taylor expanded in x around inf
Simplified79.0%
if 200 < y Initial program 100.0%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
log-recN/A
remove-double-negN/A
*-lowering-*.f64N/A
log-lowering-log.f6477.3%
Simplified77.3%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6477.3%
Applied egg-rr77.3%
Final simplification79.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (+ 0.5 (* z -0.16666666666666666))))
(t_1 (* z (+ -1.0 t_0))))
(if (<= z -4e+43)
(* (+ (* t_1 (* z (- 1.0 t_0))) 1.0) (/ -1.0 (- -1.0 z)))
(if (<= z 1.05e+103) (exp x) (/ -1.0 (+ -1.0 t_1))))))
double code(double x, double y, double z) {
double t_0 = z * (0.5 + (z * -0.16666666666666666));
double t_1 = z * (-1.0 + t_0);
double tmp;
if (z <= -4e+43) {
tmp = ((t_1 * (z * (1.0 - t_0))) + 1.0) * (-1.0 / (-1.0 - z));
} else if (z <= 1.05e+103) {
tmp = exp(x);
} else {
tmp = -1.0 / (-1.0 + t_1);
}
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) :: t_1
real(8) :: tmp
t_0 = z * (0.5d0 + (z * (-0.16666666666666666d0)))
t_1 = z * ((-1.0d0) + t_0)
if (z <= (-4d+43)) then
tmp = ((t_1 * (z * (1.0d0 - t_0))) + 1.0d0) * ((-1.0d0) / ((-1.0d0) - z))
else if (z <= 1.05d+103) then
tmp = exp(x)
else
tmp = (-1.0d0) / ((-1.0d0) + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (0.5 + (z * -0.16666666666666666));
double t_1 = z * (-1.0 + t_0);
double tmp;
if (z <= -4e+43) {
tmp = ((t_1 * (z * (1.0 - t_0))) + 1.0) * (-1.0 / (-1.0 - z));
} else if (z <= 1.05e+103) {
tmp = Math.exp(x);
} else {
tmp = -1.0 / (-1.0 + t_1);
}
return tmp;
}
def code(x, y, z): t_0 = z * (0.5 + (z * -0.16666666666666666)) t_1 = z * (-1.0 + t_0) tmp = 0 if z <= -4e+43: tmp = ((t_1 * (z * (1.0 - t_0))) + 1.0) * (-1.0 / (-1.0 - z)) elif z <= 1.05e+103: tmp = math.exp(x) else: tmp = -1.0 / (-1.0 + t_1) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666))) t_1 = Float64(z * Float64(-1.0 + t_0)) tmp = 0.0 if (z <= -4e+43) tmp = Float64(Float64(Float64(t_1 * Float64(z * Float64(1.0 - t_0))) + 1.0) * Float64(-1.0 / Float64(-1.0 - z))); elseif (z <= 1.05e+103) tmp = exp(x); else tmp = Float64(-1.0 / Float64(-1.0 + t_1)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (0.5 + (z * -0.16666666666666666)); t_1 = z * (-1.0 + t_0); tmp = 0.0; if (z <= -4e+43) tmp = ((t_1 * (z * (1.0 - t_0))) + 1.0) * (-1.0 / (-1.0 - z)); elseif (z <= 1.05e+103) tmp = exp(x); else tmp = -1.0 / (-1.0 + t_1); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+43], N[(N[(N[(t$95$1 * N[(z * N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(-1.0 / N[(-1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+103], N[Exp[x], $MachinePrecision], N[(-1.0 / N[(-1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\\
t_1 := z \cdot \left(-1 + t\_0\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+43}:\\
\;\;\;\;\left(t\_1 \cdot \left(z \cdot \left(1 - t\_0\right)\right) + 1\right) \cdot \frac{-1}{-1 - z}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+103}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-1 + t\_1}\\
\end{array}
\end{array}
if z < -4.00000000000000006e43Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6491.7%
Simplified91.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6477.4%
Simplified77.4%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr13.7%
Taylor expanded in z around 0
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6490.1%
Simplified90.1%
if -4.00000000000000006e43 < z < 1.0500000000000001e103Initial program 100.0%
Taylor expanded in x around inf
Simplified66.5%
if 1.0500000000000001e103 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6482.1%
Simplified82.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f641.3%
Simplified1.3%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr0.0%
Taylor expanded in z around 0
Simplified82.1%
Final simplification73.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (+ 0.5 (* z -0.16666666666666666))))
(t_1 (* z (+ -1.0 t_0)))
(t_2 (+ (* t_1 (* z (- 1.0 t_0))) 1.0)))
(if (<= z -1.45e+40)
(* t_2 (/ -1.0 (- -1.0 z)))
(if (<= z -1.1e-286)
(+ (* x (+ (* x 0.5) 1.0)) 1.0)
(if (<= z 1.8e-46)
(* t_2 (/ (+ 6.0 (/ 18.0 z)) (* z (* z z))))
(/ -1.0 (+ -1.0 t_1)))))))
double code(double x, double y, double z) {
double t_0 = z * (0.5 + (z * -0.16666666666666666));
double t_1 = z * (-1.0 + t_0);
double t_2 = (t_1 * (z * (1.0 - t_0))) + 1.0;
double tmp;
if (z <= -1.45e+40) {
tmp = t_2 * (-1.0 / (-1.0 - z));
} else if (z <= -1.1e-286) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 1.8e-46) {
tmp = t_2 * ((6.0 + (18.0 / z)) / (z * (z * z)));
} else {
tmp = -1.0 / (-1.0 + t_1);
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = z * (0.5d0 + (z * (-0.16666666666666666d0)))
t_1 = z * ((-1.0d0) + t_0)
t_2 = (t_1 * (z * (1.0d0 - t_0))) + 1.0d0
if (z <= (-1.45d+40)) then
tmp = t_2 * ((-1.0d0) / ((-1.0d0) - z))
else if (z <= (-1.1d-286)) then
tmp = (x * ((x * 0.5d0) + 1.0d0)) + 1.0d0
else if (z <= 1.8d-46) then
tmp = t_2 * ((6.0d0 + (18.0d0 / z)) / (z * (z * z)))
else
tmp = (-1.0d0) / ((-1.0d0) + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (0.5 + (z * -0.16666666666666666));
double t_1 = z * (-1.0 + t_0);
double t_2 = (t_1 * (z * (1.0 - t_0))) + 1.0;
double tmp;
if (z <= -1.45e+40) {
tmp = t_2 * (-1.0 / (-1.0 - z));
} else if (z <= -1.1e-286) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 1.8e-46) {
tmp = t_2 * ((6.0 + (18.0 / z)) / (z * (z * z)));
} else {
tmp = -1.0 / (-1.0 + t_1);
}
return tmp;
}
def code(x, y, z): t_0 = z * (0.5 + (z * -0.16666666666666666)) t_1 = z * (-1.0 + t_0) t_2 = (t_1 * (z * (1.0 - t_0))) + 1.0 tmp = 0 if z <= -1.45e+40: tmp = t_2 * (-1.0 / (-1.0 - z)) elif z <= -1.1e-286: tmp = (x * ((x * 0.5) + 1.0)) + 1.0 elif z <= 1.8e-46: tmp = t_2 * ((6.0 + (18.0 / z)) / (z * (z * z))) else: tmp = -1.0 / (-1.0 + t_1) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666))) t_1 = Float64(z * Float64(-1.0 + t_0)) t_2 = Float64(Float64(t_1 * Float64(z * Float64(1.0 - t_0))) + 1.0) tmp = 0.0 if (z <= -1.45e+40) tmp = Float64(t_2 * Float64(-1.0 / Float64(-1.0 - z))); elseif (z <= -1.1e-286) tmp = Float64(Float64(x * Float64(Float64(x * 0.5) + 1.0)) + 1.0); elseif (z <= 1.8e-46) tmp = Float64(t_2 * Float64(Float64(6.0 + Float64(18.0 / z)) / Float64(z * Float64(z * z)))); else tmp = Float64(-1.0 / Float64(-1.0 + t_1)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (0.5 + (z * -0.16666666666666666)); t_1 = z * (-1.0 + t_0); t_2 = (t_1 * (z * (1.0 - t_0))) + 1.0; tmp = 0.0; if (z <= -1.45e+40) tmp = t_2 * (-1.0 / (-1.0 - z)); elseif (z <= -1.1e-286) tmp = (x * ((x * 0.5) + 1.0)) + 1.0; elseif (z <= 1.8e-46) tmp = t_2 * ((6.0 + (18.0 / z)) / (z * (z * z))); else tmp = -1.0 / (-1.0 + t_1); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(-1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 * N[(z * N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[z, -1.45e+40], N[(t$95$2 * N[(-1.0 / N[(-1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-286], N[(N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 1.8e-46], N[(t$95$2 * N[(N[(6.0 + N[(18.0 / z), $MachinePrecision]), $MachinePrecision] / N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[(-1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\\
t_1 := z \cdot \left(-1 + t\_0\right)\\
t_2 := t\_1 \cdot \left(z \cdot \left(1 - t\_0\right)\right) + 1\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+40}:\\
\;\;\;\;t\_2 \cdot \frac{-1}{-1 - z}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-286}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right) + 1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-46}:\\
\;\;\;\;t\_2 \cdot \frac{6 + \frac{18}{z}}{z \cdot \left(z \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{-1 + t\_1}\\
\end{array}
\end{array}
if z < -1.45000000000000009e40Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6490.2%
Simplified90.2%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6476.2%
Simplified76.2%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr13.5%
Taylor expanded in z around 0
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6488.6%
Simplified88.6%
if -1.45000000000000009e40 < z < -1.1e-286Initial program 100.0%
Taylor expanded in x around inf
Simplified70.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6451.6%
Simplified51.6%
if -1.1e-286 < z < 1.8e-46Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6419.5%
Simplified19.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6419.5%
Simplified19.5%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr19.5%
Taylor expanded in z around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6443.9%
Simplified43.9%
if 1.8e-46 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6471.5%
Simplified71.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f647.9%
Simplified7.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr7.2%
Taylor expanded in z around 0
Simplified51.7%
Final simplification58.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.5 (* z -0.16666666666666666)))
(t_1 (* z (* z z)))
(t_2 (* z t_0))
(t_3 (/ -1.0 (+ -1.0 (* z (+ -1.0 t_2))))))
(if (<= z -2.4e+99)
(* -0.16666666666666666 t_1)
(if (<= z -1.45e+41)
(+ (/ (* z (- 1.0 (* t_0 (* t_0 (* z z))))) (- -1.0 t_2)) 1.0)
(if (<= z 2.7e-186)
(+ (* x (+ (* x 0.5) 1.0)) 1.0)
(if (<= z 9e-53)
(* t_3 (* -0.027777777777777776 (* t_1 t_1)))
t_3))))))
double code(double x, double y, double z) {
double t_0 = 0.5 + (z * -0.16666666666666666);
double t_1 = z * (z * z);
double t_2 = z * t_0;
double t_3 = -1.0 / (-1.0 + (z * (-1.0 + t_2)));
double tmp;
if (z <= -2.4e+99) {
tmp = -0.16666666666666666 * t_1;
} else if (z <= -1.45e+41) {
tmp = ((z * (1.0 - (t_0 * (t_0 * (z * z))))) / (-1.0 - t_2)) + 1.0;
} else if (z <= 2.7e-186) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 9e-53) {
tmp = t_3 * (-0.027777777777777776 * (t_1 * t_1));
} else {
tmp = t_3;
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = 0.5d0 + (z * (-0.16666666666666666d0))
t_1 = z * (z * z)
t_2 = z * t_0
t_3 = (-1.0d0) / ((-1.0d0) + (z * ((-1.0d0) + t_2)))
if (z <= (-2.4d+99)) then
tmp = (-0.16666666666666666d0) * t_1
else if (z <= (-1.45d+41)) then
tmp = ((z * (1.0d0 - (t_0 * (t_0 * (z * z))))) / ((-1.0d0) - t_2)) + 1.0d0
else if (z <= 2.7d-186) then
tmp = (x * ((x * 0.5d0) + 1.0d0)) + 1.0d0
else if (z <= 9d-53) then
tmp = t_3 * ((-0.027777777777777776d0) * (t_1 * t_1))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.5 + (z * -0.16666666666666666);
double t_1 = z * (z * z);
double t_2 = z * t_0;
double t_3 = -1.0 / (-1.0 + (z * (-1.0 + t_2)));
double tmp;
if (z <= -2.4e+99) {
tmp = -0.16666666666666666 * t_1;
} else if (z <= -1.45e+41) {
tmp = ((z * (1.0 - (t_0 * (t_0 * (z * z))))) / (-1.0 - t_2)) + 1.0;
} else if (z <= 2.7e-186) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 9e-53) {
tmp = t_3 * (-0.027777777777777776 * (t_1 * t_1));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 + (z * -0.16666666666666666) t_1 = z * (z * z) t_2 = z * t_0 t_3 = -1.0 / (-1.0 + (z * (-1.0 + t_2))) tmp = 0 if z <= -2.4e+99: tmp = -0.16666666666666666 * t_1 elif z <= -1.45e+41: tmp = ((z * (1.0 - (t_0 * (t_0 * (z * z))))) / (-1.0 - t_2)) + 1.0 elif z <= 2.7e-186: tmp = (x * ((x * 0.5) + 1.0)) + 1.0 elif z <= 9e-53: tmp = t_3 * (-0.027777777777777776 * (t_1 * t_1)) else: tmp = t_3 return tmp
function code(x, y, z) t_0 = Float64(0.5 + Float64(z * -0.16666666666666666)) t_1 = Float64(z * Float64(z * z)) t_2 = Float64(z * t_0) t_3 = Float64(-1.0 / Float64(-1.0 + Float64(z * Float64(-1.0 + t_2)))) tmp = 0.0 if (z <= -2.4e+99) tmp = Float64(-0.16666666666666666 * t_1); elseif (z <= -1.45e+41) tmp = Float64(Float64(Float64(z * Float64(1.0 - Float64(t_0 * Float64(t_0 * Float64(z * z))))) / Float64(-1.0 - t_2)) + 1.0); elseif (z <= 2.7e-186) tmp = Float64(Float64(x * Float64(Float64(x * 0.5) + 1.0)) + 1.0); elseif (z <= 9e-53) tmp = Float64(t_3 * Float64(-0.027777777777777776 * Float64(t_1 * t_1))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.5 + (z * -0.16666666666666666); t_1 = z * (z * z); t_2 = z * t_0; t_3 = -1.0 / (-1.0 + (z * (-1.0 + t_2))); tmp = 0.0; if (z <= -2.4e+99) tmp = -0.16666666666666666 * t_1; elseif (z <= -1.45e+41) tmp = ((z * (1.0 - (t_0 * (t_0 * (z * z))))) / (-1.0 - t_2)) + 1.0; elseif (z <= 2.7e-186) tmp = (x * ((x * 0.5) + 1.0)) + 1.0; elseif (z <= 9e-53) tmp = t_3 * (-0.027777777777777776 * (t_1 * t_1)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 / N[(-1.0 + N[(z * N[(-1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+99], N[(-0.16666666666666666 * t$95$1), $MachinePrecision], If[LessEqual[z, -1.45e+41], N[(N[(N[(z * N[(1.0 - N[(t$95$0 * N[(t$95$0 * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - t$95$2), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 2.7e-186], N[(N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 9e-53], N[(t$95$3 * N[(-0.027777777777777776 * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + z \cdot -0.16666666666666666\\
t_1 := z \cdot \left(z \cdot z\right)\\
t_2 := z \cdot t\_0\\
t_3 := \frac{-1}{-1 + z \cdot \left(-1 + t\_2\right)}\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+99}:\\
\;\;\;\;-0.16666666666666666 \cdot t\_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;\frac{z \cdot \left(1 - t\_0 \cdot \left(t\_0 \cdot \left(z \cdot z\right)\right)\right)}{-1 - t\_2} + 1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-186}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right) + 1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-53}:\\
\;\;\;\;t\_3 \cdot \left(-0.027777777777777776 \cdot \left(t\_1 \cdot t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.4000000000000001e99Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6492.0%
Simplified92.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
if -2.4000000000000001e99 < z < -1.44999999999999994e41Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6482.1%
Simplified82.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f645.8%
Simplified5.8%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr73.5%
if -1.44999999999999994e41 < z < 2.6999999999999999e-186Initial program 100.0%
Taylor expanded in x around inf
Simplified69.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.3%
Simplified46.3%
if 2.6999999999999999e-186 < z < 8.9999999999999997e-53Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6412.5%
Simplified12.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6412.5%
Simplified12.5%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr12.5%
Taylor expanded in z around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.2%
Simplified46.2%
if 8.9999999999999997e-53 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6470.5%
Simplified70.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f647.9%
Simplified7.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr7.1%
Taylor expanded in z around 0
Simplified50.9%
Final simplification57.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* z z)))
(t_1
(/
-1.0
(+ -1.0 (* z (+ -1.0 (* z (+ 0.5 (* z -0.16666666666666666))))))))
(t_2 (* t_1 (* -0.027777777777777776 (* t_0 t_0)))))
(if (<= z -2.4e+99)
(* -0.16666666666666666 t_0)
(if (<= z -1.25e+41)
t_2
(if (<= z 1.95e-187)
(+ (* x (+ (* x 0.5) 1.0)) 1.0)
(if (<= z 2.8e-54) t_2 t_1))))))
double code(double x, double y, double z) {
double t_0 = z * (z * z);
double t_1 = -1.0 / (-1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))));
double t_2 = t_1 * (-0.027777777777777776 * (t_0 * t_0));
double tmp;
if (z <= -2.4e+99) {
tmp = -0.16666666666666666 * t_0;
} else if (z <= -1.25e+41) {
tmp = t_2;
} else if (z <= 1.95e-187) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 2.8e-54) {
tmp = t_2;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = z * (z * z)
t_1 = (-1.0d0) / ((-1.0d0) + (z * ((-1.0d0) + (z * (0.5d0 + (z * (-0.16666666666666666d0)))))))
t_2 = t_1 * ((-0.027777777777777776d0) * (t_0 * t_0))
if (z <= (-2.4d+99)) then
tmp = (-0.16666666666666666d0) * t_0
else if (z <= (-1.25d+41)) then
tmp = t_2
else if (z <= 1.95d-187) then
tmp = (x * ((x * 0.5d0) + 1.0d0)) + 1.0d0
else if (z <= 2.8d-54) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (z * z);
double t_1 = -1.0 / (-1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))));
double t_2 = t_1 * (-0.027777777777777776 * (t_0 * t_0));
double tmp;
if (z <= -2.4e+99) {
tmp = -0.16666666666666666 * t_0;
} else if (z <= -1.25e+41) {
tmp = t_2;
} else if (z <= 1.95e-187) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 2.8e-54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = z * (z * z) t_1 = -1.0 / (-1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666)))))) t_2 = t_1 * (-0.027777777777777776 * (t_0 * t_0)) tmp = 0 if z <= -2.4e+99: tmp = -0.16666666666666666 * t_0 elif z <= -1.25e+41: tmp = t_2 elif z <= 1.95e-187: tmp = (x * ((x * 0.5) + 1.0)) + 1.0 elif z <= 2.8e-54: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(z * z)) t_1 = Float64(-1.0 / Float64(-1.0 + Float64(z * Float64(-1.0 + Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666))))))) t_2 = Float64(t_1 * Float64(-0.027777777777777776 * Float64(t_0 * t_0))) tmp = 0.0 if (z <= -2.4e+99) tmp = Float64(-0.16666666666666666 * t_0); elseif (z <= -1.25e+41) tmp = t_2; elseif (z <= 1.95e-187) tmp = Float64(Float64(x * Float64(Float64(x * 0.5) + 1.0)) + 1.0); elseif (z <= 2.8e-54) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (z * z); t_1 = -1.0 / (-1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666)))))); t_2 = t_1 * (-0.027777777777777776 * (t_0 * t_0)); tmp = 0.0; if (z <= -2.4e+99) tmp = -0.16666666666666666 * t_0; elseif (z <= -1.25e+41) tmp = t_2; elseif (z <= 1.95e-187) tmp = (x * ((x * 0.5) + 1.0)) + 1.0; elseif (z <= 2.8e-54) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(-1.0 / N[(-1.0 + N[(z * N[(-1.0 + N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(-0.027777777777777776 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.4e+99], N[(-0.16666666666666666 * t$95$0), $MachinePrecision], If[LessEqual[z, -1.25e+41], t$95$2, If[LessEqual[z, 1.95e-187], N[(N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 2.8e-54], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot z\right)\\
t_1 := \frac{-1}{-1 + z \cdot \left(-1 + z \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\right)}\\
t_2 := t\_1 \cdot \left(-0.027777777777777776 \cdot \left(t\_0 \cdot t\_0\right)\right)\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+99}:\\
\;\;\;\;-0.16666666666666666 \cdot t\_0\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-187}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right) + 1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.4000000000000001e99Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6492.0%
Simplified92.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6492.0%
Simplified92.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.0%
Simplified92.0%
if -2.4000000000000001e99 < z < -1.25000000000000006e41 or 1.9499999999999999e-187 < z < 2.8000000000000002e-54Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6430.7%
Simplified30.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6410.7%
Simplified10.7%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr28.5%
Taylor expanded in z around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.3%
Simplified53.3%
if -1.25000000000000006e41 < z < 1.9499999999999999e-187Initial program 100.0%
Taylor expanded in x around inf
Simplified69.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.3%
Simplified46.3%
if 2.8000000000000002e-54 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6470.5%
Simplified70.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f647.9%
Simplified7.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr7.1%
Taylor expanded in z around 0
Simplified50.9%
Final simplification57.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* z z)))
(t_1 (* z (+ 0.5 (* z -0.16666666666666666))))
(t_2 (* z (+ -1.0 t_1)))
(t_3 (/ -1.0 (+ -1.0 t_2))))
(if (<= z -1.45e+41)
(* (+ (* t_2 (* z (- 1.0 t_1))) 1.0) (/ -1.0 (- -1.0 z)))
(if (<= z 1.3e-186)
(+ (* x (+ (* x 0.5) 1.0)) 1.0)
(if (<= z 1.45e-53)
(* t_3 (* -0.027777777777777776 (* t_0 t_0)))
t_3)))))
double code(double x, double y, double z) {
double t_0 = z * (z * z);
double t_1 = z * (0.5 + (z * -0.16666666666666666));
double t_2 = z * (-1.0 + t_1);
double t_3 = -1.0 / (-1.0 + t_2);
double tmp;
if (z <= -1.45e+41) {
tmp = ((t_2 * (z * (1.0 - t_1))) + 1.0) * (-1.0 / (-1.0 - z));
} else if (z <= 1.3e-186) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 1.45e-53) {
tmp = t_3 * (-0.027777777777777776 * (t_0 * t_0));
} else {
tmp = t_3;
}
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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = z * (z * z)
t_1 = z * (0.5d0 + (z * (-0.16666666666666666d0)))
t_2 = z * ((-1.0d0) + t_1)
t_3 = (-1.0d0) / ((-1.0d0) + t_2)
if (z <= (-1.45d+41)) then
tmp = ((t_2 * (z * (1.0d0 - t_1))) + 1.0d0) * ((-1.0d0) / ((-1.0d0) - z))
else if (z <= 1.3d-186) then
tmp = (x * ((x * 0.5d0) + 1.0d0)) + 1.0d0
else if (z <= 1.45d-53) then
tmp = t_3 * ((-0.027777777777777776d0) * (t_0 * t_0))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (z * z);
double t_1 = z * (0.5 + (z * -0.16666666666666666));
double t_2 = z * (-1.0 + t_1);
double t_3 = -1.0 / (-1.0 + t_2);
double tmp;
if (z <= -1.45e+41) {
tmp = ((t_2 * (z * (1.0 - t_1))) + 1.0) * (-1.0 / (-1.0 - z));
} else if (z <= 1.3e-186) {
tmp = (x * ((x * 0.5) + 1.0)) + 1.0;
} else if (z <= 1.45e-53) {
tmp = t_3 * (-0.027777777777777776 * (t_0 * t_0));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z): t_0 = z * (z * z) t_1 = z * (0.5 + (z * -0.16666666666666666)) t_2 = z * (-1.0 + t_1) t_3 = -1.0 / (-1.0 + t_2) tmp = 0 if z <= -1.45e+41: tmp = ((t_2 * (z * (1.0 - t_1))) + 1.0) * (-1.0 / (-1.0 - z)) elif z <= 1.3e-186: tmp = (x * ((x * 0.5) + 1.0)) + 1.0 elif z <= 1.45e-53: tmp = t_3 * (-0.027777777777777776 * (t_0 * t_0)) else: tmp = t_3 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(z * z)) t_1 = Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666))) t_2 = Float64(z * Float64(-1.0 + t_1)) t_3 = Float64(-1.0 / Float64(-1.0 + t_2)) tmp = 0.0 if (z <= -1.45e+41) tmp = Float64(Float64(Float64(t_2 * Float64(z * Float64(1.0 - t_1))) + 1.0) * Float64(-1.0 / Float64(-1.0 - z))); elseif (z <= 1.3e-186) tmp = Float64(Float64(x * Float64(Float64(x * 0.5) + 1.0)) + 1.0); elseif (z <= 1.45e-53) tmp = Float64(t_3 * Float64(-0.027777777777777776 * Float64(t_0 * t_0))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (z * z); t_1 = z * (0.5 + (z * -0.16666666666666666)); t_2 = z * (-1.0 + t_1); t_3 = -1.0 / (-1.0 + t_2); tmp = 0.0; if (z <= -1.45e+41) tmp = ((t_2 * (z * (1.0 - t_1))) + 1.0) * (-1.0 / (-1.0 - z)); elseif (z <= 1.3e-186) tmp = (x * ((x * 0.5) + 1.0)) + 1.0; elseif (z <= 1.45e-53) tmp = t_3 * (-0.027777777777777776 * (t_0 * t_0)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(-1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-1.0 / N[(-1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+41], N[(N[(N[(t$95$2 * N[(z * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(-1.0 / N[(-1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e-186], N[(N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[z, 1.45e-53], N[(t$95$3 * N[(-0.027777777777777776 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot z\right)\\
t_1 := z \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\\
t_2 := z \cdot \left(-1 + t\_1\right)\\
t_3 := \frac{-1}{-1 + t\_2}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+41}:\\
\;\;\;\;\left(t\_2 \cdot \left(z \cdot \left(1 - t\_1\right)\right) + 1\right) \cdot \frac{-1}{-1 - z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-186}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right) + 1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-53}:\\
\;\;\;\;t\_3 \cdot \left(-0.027777777777777776 \cdot \left(t\_0 \cdot t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -1.44999999999999994e41Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6490.2%
Simplified90.2%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6476.2%
Simplified76.2%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr13.5%
Taylor expanded in z around 0
neg-mul-1N/A
neg-sub0N/A
--lowering--.f6488.6%
Simplified88.6%
if -1.44999999999999994e41 < z < 1.29999999999999997e-186Initial program 100.0%
Taylor expanded in x around inf
Simplified69.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.3%
Simplified46.3%
if 1.29999999999999997e-186 < z < 1.4499999999999999e-53Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6412.5%
Simplified12.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6412.5%
Simplified12.5%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr12.5%
Taylor expanded in z around inf
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6446.2%
Simplified46.2%
if 1.4499999999999999e-53 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6470.5%
Simplified70.5%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f647.9%
Simplified7.9%
flip-+N/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr7.1%
Taylor expanded in z around 0
Simplified50.9%
Final simplification57.3%
(FPCore (x y z)
:precision binary64
(if (<= x -380.0)
(* -0.16666666666666666 (* z (* z z)))
(if (<= x 1.15e+98)
(+ (* z (+ -1.0 (* z (+ 0.5 (* z -0.16666666666666666))))) 1.0)
(+ (* x (+ (* x (+ 0.5 (* x 0.16666666666666666))) 1.0)) 1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -380.0) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 1.15e+98) {
tmp = (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))) + 1.0;
} else {
tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 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 <= (-380.0d0)) then
tmp = (-0.16666666666666666d0) * (z * (z * z))
else if (x <= 1.15d+98) then
tmp = (z * ((-1.0d0) + (z * (0.5d0 + (z * (-0.16666666666666666d0)))))) + 1.0d0
else
tmp = (x * ((x * (0.5d0 + (x * 0.16666666666666666d0))) + 1.0d0)) + 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -380.0) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 1.15e+98) {
tmp = (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))) + 1.0;
} else {
tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -380.0: tmp = -0.16666666666666666 * (z * (z * z)) elif x <= 1.15e+98: tmp = (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))) + 1.0 else: tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -380.0) tmp = Float64(-0.16666666666666666 * Float64(z * Float64(z * z))); elseif (x <= 1.15e+98) tmp = Float64(Float64(z * Float64(-1.0 + Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666))))) + 1.0); else tmp = Float64(Float64(x * Float64(Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))) + 1.0)) + 1.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -380.0) tmp = -0.16666666666666666 * (z * (z * z)); elseif (x <= 1.15e+98) tmp = (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))) + 1.0; else tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -380.0], N[(-0.16666666666666666 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+98], N[(N[(z * N[(-1.0 + N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(x * N[(N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -380:\\
\;\;\;\;-0.16666666666666666 \cdot \left(z \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+98}:\\
\;\;\;\;z \cdot \left(-1 + z \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\right) + 1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.5 + x \cdot 0.16666666666666666\right) + 1\right) + 1\\
\end{array}
\end{array}
if x < -380Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6436.1%
Simplified36.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.4%
Simplified17.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
if -380 < x < 1.15000000000000007e98Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.0%
Simplified68.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.1%
Simplified46.1%
if 1.15000000000000007e98 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified96.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.7%
Simplified96.7%
Final simplification53.1%
(FPCore (x y z)
:precision binary64
(if (<= x -470.0)
(* -0.16666666666666666 (* z (* z z)))
(if (<= x 7e+97)
(+ (* z (* z (* z -0.16666666666666666))) 1.0)
(+ (* x (+ (* x (+ 0.5 (* x 0.16666666666666666))) 1.0)) 1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= -470.0) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 7e+97) {
tmp = (z * (z * (z * -0.16666666666666666))) + 1.0;
} else {
tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 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 <= (-470.0d0)) then
tmp = (-0.16666666666666666d0) * (z * (z * z))
else if (x <= 7d+97) then
tmp = (z * (z * (z * (-0.16666666666666666d0)))) + 1.0d0
else
tmp = (x * ((x * (0.5d0 + (x * 0.16666666666666666d0))) + 1.0d0)) + 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -470.0) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 7e+97) {
tmp = (z * (z * (z * -0.16666666666666666))) + 1.0;
} else {
tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -470.0: tmp = -0.16666666666666666 * (z * (z * z)) elif x <= 7e+97: tmp = (z * (z * (z * -0.16666666666666666))) + 1.0 else: tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -470.0) tmp = Float64(-0.16666666666666666 * Float64(z * Float64(z * z))); elseif (x <= 7e+97) tmp = Float64(Float64(z * Float64(z * Float64(z * -0.16666666666666666))) + 1.0); else tmp = Float64(Float64(x * Float64(Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))) + 1.0)) + 1.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -470.0) tmp = -0.16666666666666666 * (z * (z * z)); elseif (x <= 7e+97) tmp = (z * (z * (z * -0.16666666666666666))) + 1.0; else tmp = (x * ((x * (0.5 + (x * 0.16666666666666666))) + 1.0)) + 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -470.0], N[(-0.16666666666666666 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7e+97], N[(N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(x * N[(N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -470:\\
\;\;\;\;-0.16666666666666666 \cdot \left(z \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+97}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right) + 1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot \left(0.5 + x \cdot 0.16666666666666666\right) + 1\right) + 1\\
\end{array}
\end{array}
if x < -470Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6436.1%
Simplified36.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.4%
Simplified17.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
if -470 < x < 7.0000000000000001e97Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.0%
Simplified68.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6446.1%
Simplified46.1%
Taylor expanded in z around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.7%
Simplified45.7%
if 7.0000000000000001e97 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified96.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.7%
Simplified96.7%
Final simplification52.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1.7e-88)
(* -0.16666666666666666 (* z (* z z)))
(if (<= x 1500.0)
(+ x 1.0)
(if (<= x 5.2e+131) (* 0.5 (* z z)) (* x (+ (* x 0.5) 1.0))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e-88) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 1500.0) {
tmp = x + 1.0;
} else if (x <= 5.2e+131) {
tmp = 0.5 * (z * z);
} else {
tmp = x * ((x * 0.5) + 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 <= (-1.7d-88)) then
tmp = (-0.16666666666666666d0) * (z * (z * z))
else if (x <= 1500.0d0) then
tmp = x + 1.0d0
else if (x <= 5.2d+131) then
tmp = 0.5d0 * (z * z)
else
tmp = x * ((x * 0.5d0) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e-88) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 1500.0) {
tmp = x + 1.0;
} else if (x <= 5.2e+131) {
tmp = 0.5 * (z * z);
} else {
tmp = x * ((x * 0.5) + 1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.7e-88: tmp = -0.16666666666666666 * (z * (z * z)) elif x <= 1500.0: tmp = x + 1.0 elif x <= 5.2e+131: tmp = 0.5 * (z * z) else: tmp = x * ((x * 0.5) + 1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.7e-88) tmp = Float64(-0.16666666666666666 * Float64(z * Float64(z * z))); elseif (x <= 1500.0) tmp = Float64(x + 1.0); elseif (x <= 5.2e+131) tmp = Float64(0.5 * Float64(z * z)); else tmp = Float64(x * Float64(Float64(x * 0.5) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.7e-88) tmp = -0.16666666666666666 * (z * (z * z)); elseif (x <= 1500.0) tmp = x + 1.0; elseif (x <= 5.2e+131) tmp = 0.5 * (z * z); else tmp = x * ((x * 0.5) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.7e-88], N[(-0.16666666666666666 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1500.0], N[(x + 1.0), $MachinePrecision], If[LessEqual[x, 5.2e+131], N[(0.5 * N[(z * z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-88}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(z \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 1500:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+131}:\\
\;\;\;\;0.5 \cdot \left(z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right)\\
\end{array}
\end{array}
if x < -1.69999999999999987e-88Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6442.7%
Simplified42.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6425.2%
Simplified25.2%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.7%
Simplified47.7%
if -1.69999999999999987e-88 < x < 1500Initial program 100.0%
Taylor expanded in x around inf
Simplified33.1%
Taylor expanded in x around 0
+-lowering-+.f6432.0%
Simplified32.0%
if 1500 < x < 5.2e131Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.4%
Simplified60.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6435.8%
Simplified35.8%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.3%
Simplified35.3%
if 5.2e131 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.1%
Simplified96.1%
Taylor expanded in x around inf
unpow2N/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6496.1%
Simplified96.1%
Final simplification44.2%
(FPCore (x y z)
:precision binary64
(if (<= x -3.6e-91)
(* -0.16666666666666666 (* z (* z z)))
(if (<= x 1500.0)
(+ x 1.0)
(if (<= x 5.2e+131) (* 0.5 (* z z)) (* 0.5 (* x x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3.6e-91) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 1500.0) {
tmp = x + 1.0;
} else if (x <= 5.2e+131) {
tmp = 0.5 * (z * z);
} else {
tmp = 0.5 * (x * 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 <= (-3.6d-91)) then
tmp = (-0.16666666666666666d0) * (z * (z * z))
else if (x <= 1500.0d0) then
tmp = x + 1.0d0
else if (x <= 5.2d+131) then
tmp = 0.5d0 * (z * z)
else
tmp = 0.5d0 * (x * x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3.6e-91) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 1500.0) {
tmp = x + 1.0;
} else if (x <= 5.2e+131) {
tmp = 0.5 * (z * z);
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3.6e-91: tmp = -0.16666666666666666 * (z * (z * z)) elif x <= 1500.0: tmp = x + 1.0 elif x <= 5.2e+131: tmp = 0.5 * (z * z) else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3.6e-91) tmp = Float64(-0.16666666666666666 * Float64(z * Float64(z * z))); elseif (x <= 1500.0) tmp = Float64(x + 1.0); elseif (x <= 5.2e+131) tmp = Float64(0.5 * Float64(z * z)); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3.6e-91) tmp = -0.16666666666666666 * (z * (z * z)); elseif (x <= 1500.0) tmp = x + 1.0; elseif (x <= 5.2e+131) tmp = 0.5 * (z * z); else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3.6e-91], N[(-0.16666666666666666 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1500.0], N[(x + 1.0), $MachinePrecision], If[LessEqual[x, 5.2e+131], N[(0.5 * N[(z * z), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-91}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(z \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 1500:\\
\;\;\;\;x + 1\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+131}:\\
\;\;\;\;0.5 \cdot \left(z \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -3.6e-91Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6442.7%
Simplified42.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6425.2%
Simplified25.2%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.7%
Simplified47.7%
if -3.6e-91 < x < 1500Initial program 100.0%
Taylor expanded in x around inf
Simplified33.1%
Taylor expanded in x around 0
+-lowering-+.f6432.0%
Simplified32.0%
if 1500 < x < 5.2e131Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.4%
Simplified60.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6435.8%
Simplified35.8%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.3%
Simplified35.3%
if 5.2e131 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.1%
Simplified96.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.1%
Simplified96.1%
Final simplification44.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.5 (* z z))))
(if (<= x -4.3e-14)
t_0
(if (<= x 750000000000.0)
(- 1.0 z)
(if (<= x 5e+131) t_0 (* 0.5 (* x x)))))))
double code(double x, double y, double z) {
double t_0 = 0.5 * (z * z);
double tmp;
if (x <= -4.3e-14) {
tmp = t_0;
} else if (x <= 750000000000.0) {
tmp = 1.0 - z;
} else if (x <= 5e+131) {
tmp = t_0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = 0.5d0 * (z * z)
if (x <= (-4.3d-14)) then
tmp = t_0
else if (x <= 750000000000.0d0) then
tmp = 1.0d0 - z
else if (x <= 5d+131) then
tmp = t_0
else
tmp = 0.5d0 * (x * x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.5 * (z * z);
double tmp;
if (x <= -4.3e-14) {
tmp = t_0;
} else if (x <= 750000000000.0) {
tmp = 1.0 - z;
} else if (x <= 5e+131) {
tmp = t_0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 * (z * z) tmp = 0 if x <= -4.3e-14: tmp = t_0 elif x <= 750000000000.0: tmp = 1.0 - z elif x <= 5e+131: tmp = t_0 else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) t_0 = Float64(0.5 * Float64(z * z)) tmp = 0.0 if (x <= -4.3e-14) tmp = t_0; elseif (x <= 750000000000.0) tmp = Float64(1.0 - z); elseif (x <= 5e+131) tmp = t_0; else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.5 * (z * z); tmp = 0.0; if (x <= -4.3e-14) tmp = t_0; elseif (x <= 750000000000.0) tmp = 1.0 - z; elseif (x <= 5e+131) tmp = t_0; else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.5 * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e-14], t$95$0, If[LessEqual[x, 750000000000.0], N[(1.0 - z), $MachinePrecision], If[LessEqual[x, 5e+131], t$95$0, N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(z \cdot z\right)\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 750000000000:\\
\;\;\;\;1 - z\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+131}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -4.29999999999999998e-14 or 7.5e11 < x < 4.99999999999999995e131Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6441.9%
Simplified41.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6420.2%
Simplified20.2%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6438.1%
Simplified38.1%
if -4.29999999999999998e-14 < x < 7.5e11Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.3%
Simplified68.3%
Taylor expanded in z around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6430.4%
Simplified30.4%
if 4.99999999999999995e131 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.1%
Simplified96.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.1%
Simplified96.1%
(FPCore (x y z)
:precision binary64
(if (<= x -465.0)
(* -0.16666666666666666 (* z (* z z)))
(if (<= x 4.5e+131)
(+ (* z (* z (* z -0.16666666666666666))) 1.0)
(* x (+ (* x 0.5) 1.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -465.0) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 4.5e+131) {
tmp = (z * (z * (z * -0.16666666666666666))) + 1.0;
} else {
tmp = x * ((x * 0.5) + 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 <= (-465.0d0)) then
tmp = (-0.16666666666666666d0) * (z * (z * z))
else if (x <= 4.5d+131) then
tmp = (z * (z * (z * (-0.16666666666666666d0)))) + 1.0d0
else
tmp = x * ((x * 0.5d0) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -465.0) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 4.5e+131) {
tmp = (z * (z * (z * -0.16666666666666666))) + 1.0;
} else {
tmp = x * ((x * 0.5) + 1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -465.0: tmp = -0.16666666666666666 * (z * (z * z)) elif x <= 4.5e+131: tmp = (z * (z * (z * -0.16666666666666666))) + 1.0 else: tmp = x * ((x * 0.5) + 1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -465.0) tmp = Float64(-0.16666666666666666 * Float64(z * Float64(z * z))); elseif (x <= 4.5e+131) tmp = Float64(Float64(z * Float64(z * Float64(z * -0.16666666666666666))) + 1.0); else tmp = Float64(x * Float64(Float64(x * 0.5) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -465.0) tmp = -0.16666666666666666 * (z * (z * z)); elseif (x <= 4.5e+131) tmp = (z * (z * (z * -0.16666666666666666))) + 1.0; else tmp = x * ((x * 0.5) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -465.0], N[(-0.16666666666666666 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+131], N[(N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -465:\\
\;\;\;\;-0.16666666666666666 \cdot \left(z \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+131}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right) + 1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right)\\
\end{array}
\end{array}
if x < -465Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6436.1%
Simplified36.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.4%
Simplified17.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6449.4%
Simplified49.4%
if -465 < x < 4.5000000000000002e131Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.4%
Simplified67.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6445.7%
Simplified45.7%
Taylor expanded in z around inf
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.3%
Simplified45.3%
if 4.5000000000000002e131 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.1%
Simplified96.1%
Taylor expanded in x around inf
unpow2N/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6496.1%
Simplified96.1%
Final simplification51.3%
(FPCore (x y z) :precision binary64 (if (<= x -1.45e-56) (* -0.16666666666666666 (* z (* z z))) (if (<= x 2.8e+131) (+ (* z (* z 0.5)) 1.0) (* x (+ (* x 0.5) 1.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.45e-56) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 2.8e+131) {
tmp = (z * (z * 0.5)) + 1.0;
} else {
tmp = x * ((x * 0.5) + 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 <= (-1.45d-56)) then
tmp = (-0.16666666666666666d0) * (z * (z * z))
else if (x <= 2.8d+131) then
tmp = (z * (z * 0.5d0)) + 1.0d0
else
tmp = x * ((x * 0.5d0) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.45e-56) {
tmp = -0.16666666666666666 * (z * (z * z));
} else if (x <= 2.8e+131) {
tmp = (z * (z * 0.5)) + 1.0;
} else {
tmp = x * ((x * 0.5) + 1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.45e-56: tmp = -0.16666666666666666 * (z * (z * z)) elif x <= 2.8e+131: tmp = (z * (z * 0.5)) + 1.0 else: tmp = x * ((x * 0.5) + 1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.45e-56) tmp = Float64(-0.16666666666666666 * Float64(z * Float64(z * z))); elseif (x <= 2.8e+131) tmp = Float64(Float64(z * Float64(z * 0.5)) + 1.0); else tmp = Float64(x * Float64(Float64(x * 0.5) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.45e-56) tmp = -0.16666666666666666 * (z * (z * z)); elseif (x <= 2.8e+131) tmp = (z * (z * 0.5)) + 1.0; else tmp = x * ((x * 0.5) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.45e-56], N[(-0.16666666666666666 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+131], N[(N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(x * N[(N[(x * 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-56}:\\
\;\;\;\;-0.16666666666666666 \cdot \left(z \cdot \left(z \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+131}:\\
\;\;\;\;z \cdot \left(z \cdot 0.5\right) + 1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(x \cdot 0.5 + 1\right)\\
\end{array}
\end{array}
if x < -1.44999999999999996e-56Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6439.0%
Simplified39.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6419.6%
Simplified19.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.8%
Simplified47.8%
if -1.44999999999999996e-56 < x < 2.8000000000000001e131Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.1%
Simplified67.1%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6443.5%
Simplified43.5%
Taylor expanded in z around inf
*-lowering-*.f6443.1%
Simplified43.1%
if 2.8000000000000001e131 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6496.1%
Simplified96.1%
Taylor expanded in x around inf
unpow2N/A
associate-*l*N/A
+-commutativeN/A
distribute-rgt-inN/A
lft-mult-inverseN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6496.1%
Simplified96.1%
Final simplification49.6%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* 0.5 (* x x)))) (if (<= x -1.5e+156) t_0 (if (<= x 3.2e+76) (- 1.0 z) t_0))))
double code(double x, double y, double z) {
double t_0 = 0.5 * (x * x);
double tmp;
if (x <= -1.5e+156) {
tmp = t_0;
} else if (x <= 3.2e+76) {
tmp = 1.0 - z;
} else {
tmp = 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 = 0.5d0 * (x * x)
if (x <= (-1.5d+156)) then
tmp = t_0
else if (x <= 3.2d+76) then
tmp = 1.0d0 - z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.5 * (x * x);
double tmp;
if (x <= -1.5e+156) {
tmp = t_0;
} else if (x <= 3.2e+76) {
tmp = 1.0 - z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 * (x * x) tmp = 0 if x <= -1.5e+156: tmp = t_0 elif x <= 3.2e+76: tmp = 1.0 - z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(0.5 * Float64(x * x)) tmp = 0.0 if (x <= -1.5e+156) tmp = t_0; elseif (x <= 3.2e+76) tmp = Float64(1.0 - z); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.5 * (x * x); tmp = 0.0; if (x <= -1.5e+156) tmp = t_0; elseif (x <= 3.2e+76) tmp = 1.0 - z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+156], t$95$0, If[LessEqual[x, 3.2e+76], N[(1.0 - z), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{+156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+76}:\\
\;\;\;\;1 - z\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.5e156 or 3.19999999999999976e76 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified86.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6442.7%
Simplified42.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6442.7%
Simplified42.7%
if -1.5e156 < x < 3.19999999999999976e76Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6461.7%
Simplified61.7%
Taylor expanded in z around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6423.5%
Simplified23.5%
(FPCore (x y z) :precision binary64 (- 1.0 z))
double code(double x, double y, double z) {
return 1.0 - z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 - z
end function
public static double code(double x, double y, double z) {
return 1.0 - z;
}
def code(x, y, z): return 1.0 - z
function code(x, y, z) return Float64(1.0 - z) end
function tmp = code(x, y, z) tmp = 1.0 - z; end
code[x_, y_, z_] := N[(1.0 - z), $MachinePrecision]
\begin{array}{l}
\\
1 - z
\end{array}
Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6453.9%
Simplified53.9%
Taylor expanded in z around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6417.2%
Simplified17.2%
(FPCore (x y z) :precision binary64 (+ x 1.0))
double code(double x, double y, double z) {
return x + 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + 1.0d0
end function
public static double code(double x, double y, double z) {
return x + 1.0;
}
def code(x, y, z): return x + 1.0
function code(x, y, z) return Float64(x + 1.0) end
function tmp = code(x, y, z) tmp = x + 1.0; end
code[x_, y_, z_] := N[(x + 1.0), $MachinePrecision]
\begin{array}{l}
\\
x + 1
\end{array}
Initial program 100.0%
Taylor expanded in x around inf
Simplified56.1%
Taylor expanded in x around 0
+-lowering-+.f6416.8%
Simplified16.8%
Final simplification16.8%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in x around inf
Simplified56.1%
Taylor expanded in x around 0
Simplified16.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 2024138
(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)))