
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Initial program 100.0%
(FPCore (x y z) :precision binary64 (if (<= (* y (log y)) 5e+18) (/ 1.0 (exp (- z x))) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if ((y * log(y)) <= 5e+18) {
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)) <= 5d+18) 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)) <= 5e+18) {
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)) <= 5e+18: 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)) <= 5e+18) 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)) <= 5e+18) 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], 5e+18], 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 5 \cdot 10^{+18}:\\
\;\;\;\;\frac{1}{e^{z - x}}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 5e18Initial 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--.f6496.3%
Simplified96.3%
Taylor expanded in y around 0
Simplified99.2%
if 5e18 < (*.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.f6487.0%
Simplified87.0%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6487.0%
Applied egg-rr87.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (exp (- 0.0 z))))
(if (<= y 2.85e-109)
t_0
(if (<= y 1.56e-80) (exp x) (if (<= y 600000000000.0) t_0 (pow y y))))))
double code(double x, double y, double z) {
double t_0 = exp((0.0 - z));
double tmp;
if (y <= 2.85e-109) {
tmp = t_0;
} else if (y <= 1.56e-80) {
tmp = exp(x);
} else if (y <= 600000000000.0) {
tmp = t_0;
} 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) :: tmp
t_0 = exp((0.0d0 - z))
if (y <= 2.85d-109) then
tmp = t_0
else if (y <= 1.56d-80) then
tmp = exp(x)
else if (y <= 600000000000.0d0) then
tmp = t_0
else
tmp = y ** y
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 (y <= 2.85e-109) {
tmp = t_0;
} else if (y <= 1.56e-80) {
tmp = Math.exp(x);
} else if (y <= 600000000000.0) {
tmp = t_0;
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): t_0 = math.exp((0.0 - z)) tmp = 0 if y <= 2.85e-109: tmp = t_0 elif y <= 1.56e-80: tmp = math.exp(x) elif y <= 600000000000.0: tmp = t_0 else: tmp = math.pow(y, y) return tmp
function code(x, y, z) t_0 = exp(Float64(0.0 - z)) tmp = 0.0 if (y <= 2.85e-109) tmp = t_0; elseif (y <= 1.56e-80) tmp = exp(x); elseif (y <= 600000000000.0) tmp = t_0; else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) t_0 = exp((0.0 - z)); tmp = 0.0; if (y <= 2.85e-109) tmp = t_0; elseif (y <= 1.56e-80) tmp = exp(x); elseif (y <= 600000000000.0) tmp = t_0; else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[Exp[N[(0.0 - z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, 2.85e-109], t$95$0, If[LessEqual[y, 1.56e-80], N[Exp[x], $MachinePrecision], If[LessEqual[y, 600000000000.0], t$95$0, N[Power[y, y], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{0 - z}\\
\mathbf{if}\;y \leq 2.85 \cdot 10^{-109}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.56 \cdot 10^{-80}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;y \leq 600000000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 2.84999999999999989e-109 or 1.55999999999999994e-80 < y < 6e11Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6482.9%
Simplified82.9%
sub0-negN/A
neg-lowering-neg.f6482.9%
Applied egg-rr82.9%
if 2.84999999999999989e-109 < y < 1.55999999999999994e-80Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
if 6e11 < 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.f6486.3%
Simplified86.3%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6486.3%
Applied egg-rr86.3%
Final simplification85.6%
(FPCore (x y z) :precision binary64 (if (<= x -6e+78) (exp x) (if (<= x 700.0) (exp (- 0.0 z)) (exp x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6e+78) {
tmp = exp(x);
} else if (x <= 700.0) {
tmp = exp((0.0 - z));
} 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 <= (-6d+78)) then
tmp = exp(x)
else if (x <= 700.0d0) then
tmp = exp((0.0d0 - z))
else
tmp = exp(x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6e+78) {
tmp = Math.exp(x);
} else if (x <= 700.0) {
tmp = Math.exp((0.0 - z));
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6e+78: tmp = math.exp(x) elif x <= 700.0: tmp = math.exp((0.0 - z)) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6e+78) tmp = exp(x); elseif (x <= 700.0) tmp = exp(Float64(0.0 - z)); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6e+78) tmp = exp(x); elseif (x <= 700.0) tmp = exp((0.0 - z)); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6e+78], N[Exp[x], $MachinePrecision], If[LessEqual[x, 700.0], N[Exp[N[(0.0 - z), $MachinePrecision]], $MachinePrecision], N[Exp[x], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{+78}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq 700:\\
\;\;\;\;e^{0 - z}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if x < -5.99999999999999964e78 or 700 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified89.4%
if -5.99999999999999964e78 < x < 700Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6471.1%
Simplified71.1%
sub0-negN/A
neg-lowering-neg.f6471.1%
Applied egg-rr71.1%
Final simplification78.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* z z))))
(if (<= x -14500000000000.0)
(exp x)
(if (<= x 4.5e-8)
(+ 1.0 (* z (/ (- 1.0 (* (* t_0 t_0) 0.015625)) (+ -1.0 (* z -0.5)))))
(exp x)))))
double code(double x, double y, double z) {
double t_0 = z * (z * z);
double tmp;
if (x <= -14500000000000.0) {
tmp = exp(x);
} else if (x <= 4.5e-8) {
tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5))));
} 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) :: t_0
real(8) :: tmp
t_0 = z * (z * z)
if (x <= (-14500000000000.0d0)) then
tmp = exp(x)
else if (x <= 4.5d-8) then
tmp = 1.0d0 + (z * ((1.0d0 - ((t_0 * t_0) * 0.015625d0)) / ((-1.0d0) + (z * (-0.5d0)))))
else
tmp = exp(x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * (z * z);
double tmp;
if (x <= -14500000000000.0) {
tmp = Math.exp(x);
} else if (x <= 4.5e-8) {
tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5))));
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): t_0 = z * (z * z) tmp = 0 if x <= -14500000000000.0: tmp = math.exp(x) elif x <= 4.5e-8: tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5)))) else: tmp = math.exp(x) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(z * z)) tmp = 0.0 if (x <= -14500000000000.0) tmp = exp(x); elseif (x <= 4.5e-8) tmp = Float64(1.0 + Float64(z * Float64(Float64(1.0 - Float64(Float64(t_0 * t_0) * 0.015625)) / Float64(-1.0 + Float64(z * -0.5))))); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * (z * z); tmp = 0.0; if (x <= -14500000000000.0) tmp = exp(x); elseif (x <= 4.5e-8) tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5)))); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -14500000000000.0], N[Exp[x], $MachinePrecision], If[LessEqual[x, 4.5e-8], N[(1.0 + N[(z * N[(N[(1.0 - N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 0.015625), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[x], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z \cdot z\right)\\
\mathbf{if}\;x \leq -14500000000000:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-8}:\\
\;\;\;\;1 + z \cdot \frac{1 - \left(t\_0 \cdot t\_0\right) \cdot 0.015625}{-1 + z \cdot -0.5}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if x < -1.45e13 or 4.49999999999999993e-8 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified83.7%
if -1.45e13 < x < 4.49999999999999993e-8Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6472.2%
Simplified72.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-*.f6443.5%
Simplified43.5%
Applied egg-rr26.3%
Taylor expanded in z around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6452.9%
Simplified52.9%
Final simplification66.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (* z z))))
(if (<= x -5.5e+75)
(* t_0 -0.16666666666666666)
(if (<= x 1.1e-93)
(+ 1.0 (* z (/ (- 1.0 (* (* t_0 t_0) 0.015625)) (+ -1.0 (* z -0.5)))))
(if (<= x 4.8e+102)
(+
1.0
(*
z
(+
-1.0
(/
(* z (* z (* z (+ -0.027777777777777776 (/ 0.25 (* z z))))))
(+ 0.5 (* z 0.16666666666666666))))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))))
double code(double x, double y, double z) {
double t_0 = z * (z * z);
double tmp;
if (x <= -5.5e+75) {
tmp = t_0 * -0.16666666666666666;
} else if (x <= 1.1e-93) {
tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5))));
} else if (x <= 4.8e+102) {
tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666)))));
} 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) :: t_0
real(8) :: tmp
t_0 = z * (z * z)
if (x <= (-5.5d+75)) then
tmp = t_0 * (-0.16666666666666666d0)
else if (x <= 1.1d-93) then
tmp = 1.0d0 + (z * ((1.0d0 - ((t_0 * t_0) * 0.015625d0)) / ((-1.0d0) + (z * (-0.5d0)))))
else if (x <= 4.8d+102) then
tmp = 1.0d0 + (z * ((-1.0d0) + ((z * (z * (z * ((-0.027777777777777776d0) + (0.25d0 / (z * z)))))) / (0.5d0 + (z * 0.16666666666666666d0)))))
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 t_0 = z * (z * z);
double tmp;
if (x <= -5.5e+75) {
tmp = t_0 * -0.16666666666666666;
} else if (x <= 1.1e-93) {
tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5))));
} else if (x <= 4.8e+102) {
tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666)))));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): t_0 = z * (z * z) tmp = 0 if x <= -5.5e+75: tmp = t_0 * -0.16666666666666666 elif x <= 1.1e-93: tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5)))) elif x <= 4.8e+102: tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666))))) else: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) return tmp
function code(x, y, z) t_0 = Float64(z * Float64(z * z)) tmp = 0.0 if (x <= -5.5e+75) tmp = Float64(t_0 * -0.16666666666666666); elseif (x <= 1.1e-93) tmp = Float64(1.0 + Float64(z * Float64(Float64(1.0 - Float64(Float64(t_0 * t_0) * 0.015625)) / Float64(-1.0 + Float64(z * -0.5))))); elseif (x <= 4.8e+102) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + Float64(Float64(z * Float64(z * Float64(z * Float64(-0.027777777777777776 + Float64(0.25 / Float64(z * z)))))) / Float64(0.5 + Float64(z * 0.16666666666666666)))))); 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) t_0 = z * (z * z); tmp = 0.0; if (x <= -5.5e+75) tmp = t_0 * -0.16666666666666666; elseif (x <= 1.1e-93) tmp = 1.0 + (z * ((1.0 - ((t_0 * t_0) * 0.015625)) / (-1.0 + (z * -0.5)))); elseif (x <= 4.8e+102) tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666))))); else tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.5e+75], N[(t$95$0 * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 1.1e-93], N[(1.0 + N[(z * N[(N[(1.0 - N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 0.015625), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+102], N[(1.0 + N[(z * N[(-1.0 + N[(N[(z * N[(z * N[(z * N[(-0.027777777777777776 + N[(0.25 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.5 + N[(z * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
t_0 := z \cdot \left(z \cdot z\right)\\
\mathbf{if}\;x \leq -5.5 \cdot 10^{+75}:\\
\;\;\;\;t\_0 \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-93}:\\
\;\;\;\;1 + z \cdot \frac{1 - \left(t\_0 \cdot t\_0\right) \cdot 0.015625}{-1 + z \cdot -0.5}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+102}:\\
\;\;\;\;1 + z \cdot \left(-1 + \frac{z \cdot \left(z \cdot \left(z \cdot \left(-0.027777777777777776 + \frac{0.25}{z \cdot z}\right)\right)\right)}{0.5 + z \cdot 0.16666666666666666}\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 < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x < 1.09999999999999998e-93Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6471.0%
Simplified71.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-*.f6443.3%
Simplified43.3%
Applied egg-rr25.0%
Taylor expanded in z around 0
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6452.6%
Simplified52.6%
if 1.09999999999999998e-93 < x < 4.79999999999999989e102Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6450.5%
Simplified50.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-*.f6426.0%
Simplified26.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval26.0%
Applied egg-rr26.0%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
Simplified54.2%
if 4.79999999999999989e102 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified93.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6491.6%
Simplified91.6%
Final simplification58.9%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5e+75)
(* (* z (* z z)) -0.16666666666666666)
(if (<= x 2.7e-95)
(+ 1.0 (/ (* z (- 1.0 (* (* z z) 0.25))) (+ -1.0 (* z -0.5))))
(if (<= x 4.8e+102)
(+
1.0
(*
z
(+
-1.0
(/
(* z (* z (* z (+ -0.027777777777777776 (/ 0.25 (* z z))))))
(+ 0.5 (* z 0.16666666666666666))))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 2.7e-95) {
tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5)));
} else if (x <= 4.8e+102) {
tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666)))));
} 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 <= (-5.5d+75)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (x <= 2.7d-95) then
tmp = 1.0d0 + ((z * (1.0d0 - ((z * z) * 0.25d0))) / ((-1.0d0) + (z * (-0.5d0))))
else if (x <= 4.8d+102) then
tmp = 1.0d0 + (z * ((-1.0d0) + ((z * (z * (z * ((-0.027777777777777776d0) + (0.25d0 / (z * z)))))) / (0.5d0 + (z * 0.16666666666666666d0)))))
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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 2.7e-95) {
tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5)));
} else if (x <= 4.8e+102) {
tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666)))));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5e+75: tmp = (z * (z * z)) * -0.16666666666666666 elif x <= 2.7e-95: tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5))) elif x <= 4.8e+102: tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666))))) 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 <= -5.5e+75) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (x <= 2.7e-95) tmp = Float64(1.0 + Float64(Float64(z * Float64(1.0 - Float64(Float64(z * z) * 0.25))) / Float64(-1.0 + Float64(z * -0.5)))); elseif (x <= 4.8e+102) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + Float64(Float64(z * Float64(z * Float64(z * Float64(-0.027777777777777776 + Float64(0.25 / Float64(z * z)))))) / Float64(0.5 + Float64(z * 0.16666666666666666)))))); 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 <= -5.5e+75) tmp = (z * (z * z)) * -0.16666666666666666; elseif (x <= 2.7e-95) tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5))); elseif (x <= 4.8e+102) tmp = 1.0 + (z * (-1.0 + ((z * (z * (z * (-0.027777777777777776 + (0.25 / (z * z)))))) / (0.5 + (z * 0.16666666666666666))))); 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, -5.5e+75], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 2.7e-95], N[(1.0 + N[(N[(z * N[(1.0 - N[(N[(z * z), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+102], N[(1.0 + N[(z * N[(-1.0 + N[(N[(z * N[(z * N[(z * N[(-0.027777777777777776 + N[(0.25 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.5 + N[(z * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -5.5 \cdot 10^{+75}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-95}:\\
\;\;\;\;1 + \frac{z \cdot \left(1 - \left(z \cdot z\right) \cdot 0.25\right)}{-1 + z \cdot -0.5}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+102}:\\
\;\;\;\;1 + z \cdot \left(-1 + \frac{z \cdot \left(z \cdot \left(z \cdot \left(-0.027777777777777776 + \frac{0.25}{z \cdot z}\right)\right)\right)}{0.5 + z \cdot 0.16666666666666666}\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 < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x < 2.7e-95Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6471.0%
Simplified71.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-*.f6443.3%
Simplified43.3%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
swap-sqrN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-lowering-+.f64N/A
associate-*r*N/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-eval48.2%
Applied egg-rr48.2%
if 2.7e-95 < x < 4.79999999999999989e102Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6450.5%
Simplified50.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-*.f6426.0%
Simplified26.0%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval26.0%
Applied egg-rr26.0%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
sub-negN/A
remove-double-negN/A
distribute-neg-inN/A
+-commutativeN/A
sub-negN/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
Simplified54.2%
if 4.79999999999999989e102 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified93.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6491.6%
Simplified91.6%
Final simplification56.6%
(FPCore (x y z)
:precision binary64
(if (<= x -5.9e+78)
(* (* z (* z z)) -0.16666666666666666)
(if (<= x 9.5e+102)
(+ 1.0 (/ (* z (- 1.0 (* (* z z) 0.25))) (+ -1.0 (* z -0.5))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.9e+78) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 9.5e+102) {
tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5)));
} 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 <= (-5.9d+78)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (x <= 9.5d+102) then
tmp = 1.0d0 + ((z * (1.0d0 - ((z * z) * 0.25d0))) / ((-1.0d0) + (z * (-0.5d0))))
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 <= -5.9e+78) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 9.5e+102) {
tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5)));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.9e+78: tmp = (z * (z * z)) * -0.16666666666666666 elif x <= 9.5e+102: tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5))) 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 <= -5.9e+78) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (x <= 9.5e+102) tmp = Float64(1.0 + Float64(Float64(z * Float64(1.0 - Float64(Float64(z * z) * 0.25))) / Float64(-1.0 + Float64(z * -0.5)))); 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 <= -5.9e+78) tmp = (z * (z * z)) * -0.16666666666666666; elseif (x <= 9.5e+102) tmp = 1.0 + ((z * (1.0 - ((z * z) * 0.25))) / (-1.0 + (z * -0.5))); 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, -5.9e+78], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 9.5e+102], N[(1.0 + N[(N[(z * N[(1.0 - N[(N[(z * z), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(z * -0.5), $MachinePrecision]), $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 -5.9 \cdot 10^{+78}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+102}:\\
\;\;\;\;1 + \frac{z \cdot \left(1 - \left(z \cdot z\right) \cdot 0.25\right)}{-1 + z \cdot -0.5}\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < -5.9e78Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.9e78 < x < 9.4999999999999992e102Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6465.2%
Simplified65.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-*.f6438.1%
Simplified38.1%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
swap-sqrN/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
sub-negN/A
mul-1-negN/A
+-lowering-+.f64N/A
associate-*r*N/A
metadata-evalN/A
metadata-evalN/A
*-lowering-*.f64N/A
metadata-eval43.2%
Applied egg-rr43.2%
if 9.4999999999999992e102 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified93.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6493.3%
Simplified93.3%
Final simplification52.1%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5e+75)
(* (* z (* z z)) -0.16666666666666666)
(if (<= x 1.2e+93)
(+ 1.0 (* z (+ -1.0 (* z (+ 0.5 (* z -0.16666666666666666))))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 1.2e+93) {
tmp = 1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666)))));
} 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 <= (-5.5d+75)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (x <= 1.2d+93) then
tmp = 1.0d0 + (z * ((-1.0d0) + (z * (0.5d0 + (z * (-0.16666666666666666d0))))))
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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 1.2e+93) {
tmp = 1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666)))));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5e+75: tmp = (z * (z * z)) * -0.16666666666666666 elif x <= 1.2e+93: tmp = 1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))) 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 <= -5.5e+75) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (x <= 1.2e+93) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + Float64(z * Float64(0.5 + Float64(z * -0.16666666666666666)))))); 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 <= -5.5e+75) tmp = (z * (z * z)) * -0.16666666666666666; elseif (x <= 1.2e+93) tmp = 1.0 + (z * (-1.0 + (z * (0.5 + (z * -0.16666666666666666))))); 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, -5.5e+75], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 1.2e+93], N[(1.0 + N[(z * N[(-1.0 + N[(z * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -5.5 \cdot 10^{+75}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+93}:\\
\;\;\;\;1 + z \cdot \left(-1 + z \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\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 < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x < 1.20000000000000005e93Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.0%
Simplified67.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-*.f6440.8%
Simplified40.8%
if 1.20000000000000005e93 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified94.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.9%
Simplified84.9%
Final simplification49.8%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5e+75)
(* (* z (* z z)) -0.16666666666666666)
(if (<= x 1.2e+93)
(+ 1.0 (* z (+ -1.0 (* z 0.5))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 1.2e+93) {
tmp = 1.0 + (z * (-1.0 + (z * 0.5)));
} 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 <= (-5.5d+75)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (x <= 1.2d+93) then
tmp = 1.0d0 + (z * ((-1.0d0) + (z * 0.5d0)))
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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 1.2e+93) {
tmp = 1.0 + (z * (-1.0 + (z * 0.5)));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5e+75: tmp = (z * (z * z)) * -0.16666666666666666 elif x <= 1.2e+93: tmp = 1.0 + (z * (-1.0 + (z * 0.5))) 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 <= -5.5e+75) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (x <= 1.2e+93) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + Float64(z * 0.5)))); 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 <= -5.5e+75) tmp = (z * (z * z)) * -0.16666666666666666; elseif (x <= 1.2e+93) tmp = 1.0 + (z * (-1.0 + (z * 0.5))); 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, -5.5e+75], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 1.2e+93], N[(1.0 + N[(z * N[(-1.0 + N[(z * 0.5), $MachinePrecision]), $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 -5.5 \cdot 10^{+75}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+93}:\\
\;\;\;\;1 + z \cdot \left(-1 + z \cdot 0.5\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 < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x < 1.20000000000000005e93Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.0%
Simplified67.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-*.f6439.1%
Simplified39.1%
if 1.20000000000000005e93 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified94.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6484.9%
Simplified84.9%
Final simplification48.6%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5e+75)
(* (* z (* z z)) -0.16666666666666666)
(if (<= x 1.2e+93)
(+ 1.0 (* z (+ -1.0 (* z 0.5))))
(+ 1.0 (* x (+ 1.0 (* x 0.5)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 1.2e+93) {
tmp = 1.0 + (z * (-1.0 + (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 <= (-5.5d+75)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (x <= 1.2d+93) then
tmp = 1.0d0 + (z * ((-1.0d0) + (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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 1.2e+93) {
tmp = 1.0 + (z * (-1.0 + (z * 0.5)));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5e+75: tmp = (z * (z * z)) * -0.16666666666666666 elif x <= 1.2e+93: tmp = 1.0 + (z * (-1.0 + (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 <= -5.5e+75) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (x <= 1.2e+93) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + 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 <= -5.5e+75) tmp = (z * (z * z)) * -0.16666666666666666; elseif (x <= 1.2e+93) tmp = 1.0 + (z * (-1.0 + (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, -5.5e+75], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 1.2e+93], N[(1.0 + N[(z * N[(-1.0 + N[(z * 0.5), $MachinePrecision]), $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 -5.5 \cdot 10^{+75}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+93}:\\
\;\;\;\;1 + z \cdot \left(-1 + z \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x < 1.20000000000000005e93Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.0%
Simplified67.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-*.f6439.1%
Simplified39.1%
if 1.20000000000000005e93 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified94.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6473.0%
Simplified73.0%
Final simplification46.3%
(FPCore (x y z) :precision binary64 (if (<= x -5.5e+75) (* (* z (* z z)) -0.16666666666666666) (if (<= x 9e+92) (+ 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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 9e+92) {
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 <= (-5.5d+75)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (x <= 9d+92) 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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (x <= 9e+92) {
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 <= -5.5e+75: tmp = (z * (z * z)) * -0.16666666666666666 elif x <= 9e+92: 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 <= -5.5e+75) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (x <= 9e+92) 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 <= -5.5e+75) tmp = (z * (z * z)) * -0.16666666666666666; elseif (x <= 9e+92) 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, -5.5e+75], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[x, 9e+92], 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 -5.5 \cdot 10^{+75}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+92}:\\
\;\;\;\;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 < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x < 8.9999999999999998e92Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.0%
Simplified67.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-*.f6439.1%
Simplified39.1%
Taylor expanded in z around inf
*-lowering-*.f6438.5%
Simplified38.5%
if 8.9999999999999998e92 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified94.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6473.0%
Simplified73.0%
Final simplification45.9%
(FPCore (x y z) :precision binary64 (if (<= z -1820000.0) (* (* z (* z z)) -0.16666666666666666) (if (<= z 6.8e+42) (+ x 1.0) (* (* z z) 0.5))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1820000.0) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (z <= 6.8e+42) {
tmp = x + 1.0;
} else {
tmp = (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 (z <= (-1820000.0d0)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
else if (z <= 6.8d+42) then
tmp = x + 1.0d0
else
tmp = (z * z) * 0.5d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1820000.0) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else if (z <= 6.8e+42) {
tmp = x + 1.0;
} else {
tmp = (z * z) * 0.5;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1820000.0: tmp = (z * (z * z)) * -0.16666666666666666 elif z <= 6.8e+42: tmp = x + 1.0 else: tmp = (z * z) * 0.5 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1820000.0) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); elseif (z <= 6.8e+42) tmp = Float64(x + 1.0); else tmp = Float64(Float64(z * z) * 0.5); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1820000.0) tmp = (z * (z * z)) * -0.16666666666666666; elseif (z <= 6.8e+42) tmp = x + 1.0; else tmp = (z * z) * 0.5; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1820000.0], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], If[LessEqual[z, 6.8e+42], N[(x + 1.0), $MachinePrecision], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1820000:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+42}:\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
\end{array}
\end{array}
if z < -1.82e6Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.9%
Simplified93.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-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6467.6%
Simplified67.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval67.6%
Applied egg-rr67.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6467.6%
Simplified67.6%
if -1.82e6 < z < 6.7999999999999995e42Initial program 100.0%
Taylor expanded in x around inf
Simplified70.3%
Taylor expanded in x around 0
+-lowering-+.f6429.5%
Simplified29.5%
if 6.7999999999999995e42 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6470.6%
Simplified70.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6414.7%
Simplified14.7%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6414.7%
Simplified14.7%
Final simplification35.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* (* z z) 0.5))) (if (<= z -31.5) t_0 (if (<= z 1e+43) (+ x 1.0) t_0))))
double code(double x, double y, double z) {
double t_0 = (z * z) * 0.5;
double tmp;
if (z <= -31.5) {
tmp = t_0;
} else if (z <= 1e+43) {
tmp = x + 1.0;
} 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 = (z * z) * 0.5d0
if (z <= (-31.5d0)) then
tmp = t_0
else if (z <= 1d+43) then
tmp = x + 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * z) * 0.5;
double tmp;
if (z <= -31.5) {
tmp = t_0;
} else if (z <= 1e+43) {
tmp = x + 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (z * z) * 0.5 tmp = 0 if z <= -31.5: tmp = t_0 elif z <= 1e+43: tmp = x + 1.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(z * z) * 0.5) tmp = 0.0 if (z <= -31.5) tmp = t_0; elseif (z <= 1e+43) tmp = Float64(x + 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * z) * 0.5; tmp = 0.0; if (z <= -31.5) tmp = t_0; elseif (z <= 1e+43) tmp = x + 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision]}, If[LessEqual[z, -31.5], t$95$0, If[LessEqual[z, 1e+43], N[(x + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(z \cdot z\right) \cdot 0.5\\
\mathbf{if}\;z \leq -31.5:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 10^{+43}:\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -31.5 or 1.00000000000000001e43 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6483.1%
Simplified83.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-*.f6435.1%
Simplified35.1%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6435.1%
Simplified35.1%
if -31.5 < z < 1.00000000000000001e43Initial program 100.0%
Taylor expanded in x around inf
Simplified70.3%
Taylor expanded in x around 0
+-lowering-+.f6429.5%
Simplified29.5%
Final simplification32.2%
(FPCore (x y z) :precision binary64 (if (<= x -5.5e+75) (* (* z (* z z)) -0.16666666666666666) (+ 1.0 (* z (* z 0.5)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} 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 <= (-5.5d+75)) then
tmp = (z * (z * z)) * (-0.16666666666666666d0)
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 <= -5.5e+75) {
tmp = (z * (z * z)) * -0.16666666666666666;
} else {
tmp = 1.0 + (z * (z * 0.5));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5e+75: tmp = (z * (z * z)) * -0.16666666666666666 else: tmp = 1.0 + (z * (z * 0.5)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.5e+75) tmp = Float64(Float64(z * Float64(z * z)) * -0.16666666666666666); 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 <= -5.5e+75) tmp = (z * (z * z)) * -0.16666666666666666; else tmp = 1.0 + (z * (z * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.5e+75], N[(N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision], N[(1.0 + N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+75}:\\
\;\;\;\;\left(z \cdot \left(z \cdot z\right)\right) \cdot -0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5\right)\\
\end{array}
\end{array}
if x < -5.5000000000000001e75Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.6%
Simplified21.6%
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-*.f642.6%
Simplified2.6%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-eval2.6%
Applied egg-rr2.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
cube-multN/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -5.5000000000000001e75 < x Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.8%
Simplified60.8%
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.7%
Simplified35.7%
Taylor expanded in z around inf
*-lowering-*.f6435.3%
Simplified35.3%
Final simplification36.5%
(FPCore (x y z) :precision binary64 (+ x 1.0))
double code(double x, double y, double z) {
return x + 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + 1.0d0
end function
public static double code(double x, double y, double z) {
return x + 1.0;
}
def code(x, y, z): return x + 1.0
function code(x, y, z) return Float64(x + 1.0) end
function tmp = code(x, y, z) tmp = x + 1.0; end
code[x_, y_, z_] := N[(x + 1.0), $MachinePrecision]
\begin{array}{l}
\\
x + 1
\end{array}
Initial program 100.0%
Taylor expanded in x around inf
Simplified53.0%
Taylor expanded in x around 0
+-lowering-+.f6417.1%
Simplified17.1%
Final simplification17.1%
(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
Simplified53.0%
Taylor expanded in x around 0
Simplified16.5%
(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 2024158
(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)))