
(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 18 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)) 1000.0) (/ (pow y y) (exp (- z x))) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if ((y * log(y)) <= 1000.0) {
tmp = pow(y, y) / 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)) <= 1000.0d0) then
tmp = (y ** y) / 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)) <= 1000.0) {
tmp = Math.pow(y, y) / Math.exp((z - x));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y * math.log(y)) <= 1000.0: tmp = math.pow(y, y) / 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)) <= 1000.0) tmp = Float64((y ^ y) / 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)) <= 1000.0) tmp = (y ^ y) / 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], 1000.0], N[(N[Power[y, y], $MachinePrecision] / 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 1000:\\
\;\;\;\;\frac{{y}^{y}}{e^{z - x}}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 1e3Initial 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--.f64100.0%
Simplified100.0%
if 1e3 < (*.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.f6484.0%
Simplified84.0%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6484.0%
Applied egg-rr84.0%
(FPCore (x y z) :precision binary64 (if (<= x -1.7e+40) (exp x) (if (<= x -1.55e-27) (pow y y) (if (<= x 6.5) (exp (- 0.0 z)) (exp x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.7e+40) {
tmp = exp(x);
} else if (x <= -1.55e-27) {
tmp = pow(y, y);
} else if (x <= 6.5) {
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 <= (-1.7d+40)) then
tmp = exp(x)
else if (x <= (-1.55d-27)) then
tmp = y ** y
else if (x <= 6.5d0) 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 <= -1.7e+40) {
tmp = Math.exp(x);
} else if (x <= -1.55e-27) {
tmp = Math.pow(y, y);
} else if (x <= 6.5) {
tmp = Math.exp((0.0 - z));
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.7e+40: tmp = math.exp(x) elif x <= -1.55e-27: tmp = math.pow(y, y) elif x <= 6.5: tmp = math.exp((0.0 - z)) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.7e+40) tmp = exp(x); elseif (x <= -1.55e-27) tmp = y ^ y; elseif (x <= 6.5) 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 <= -1.7e+40) tmp = exp(x); elseif (x <= -1.55e-27) tmp = y ^ y; elseif (x <= 6.5) tmp = exp((0.0 - z)); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.7e+40], N[Exp[x], $MachinePrecision], If[LessEqual[x, -1.55e-27], N[Power[y, y], $MachinePrecision], If[LessEqual[x, 6.5], N[Exp[N[(0.0 - z), $MachinePrecision]], $MachinePrecision], N[Exp[x], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+40}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-27}:\\
\;\;\;\;{y}^{y}\\
\mathbf{elif}\;x \leq 6.5:\\
\;\;\;\;e^{0 - z}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if x < -1.69999999999999994e40 or 6.5 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified85.6%
if -1.69999999999999994e40 < x < -1.5499999999999999e-27Initial 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.1%
Simplified77.1%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6477.1%
Applied egg-rr77.1%
if -1.5499999999999999e-27 < x < 6.5Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6476.9%
Simplified76.9%
sub0-negN/A
neg-lowering-neg.f6476.9%
Applied egg-rr76.9%
Final simplification80.6%
(FPCore (x y z) :precision binary64 (let* ((t_0 (exp (- 0.0 z)))) (if (<= z -1.08e-24) t_0 (if (<= z 4.6e+23) (exp x) t_0))))
double code(double x, double y, double z) {
double t_0 = exp((0.0 - z));
double tmp;
if (z <= -1.08e-24) {
tmp = t_0;
} else if (z <= 4.6e+23) {
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.08d-24)) then
tmp = t_0
else if (z <= 4.6d+23) 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.08e-24) {
tmp = t_0;
} else if (z <= 4.6e+23) {
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.08e-24: tmp = t_0 elif z <= 4.6e+23: 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.08e-24) tmp = t_0; elseif (z <= 4.6e+23) 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.08e-24) tmp = t_0; elseif (z <= 4.6e+23) 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.08e-24], t$95$0, If[LessEqual[z, 4.6e+23], N[Exp[x], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{0 - z}\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+23}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.08000000000000006e-24 or 4.6000000000000001e23 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6486.5%
Simplified86.5%
sub0-negN/A
neg-lowering-neg.f6486.5%
Applied egg-rr86.5%
if -1.08000000000000006e-24 < z < 4.6000000000000001e23Initial program 100.0%
Taylor expanded in x around inf
Simplified68.4%
Final simplification78.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 0.5 (* z -0.16666666666666666))) (t_1 (* z t_0)))
(if (<= z -2e+77)
(+ 1.0 (* z (/ 1.0 (/ 1.0 (+ -1.0 (* 0.125 (* z (* z z))))))))
(if (<= z -2.3e+46)
(+
1.0
(/
(* z (+ -1.0 (* t_1 (* z (* t_0 t_1)))))
(+ 1.0 (* t_1 (+ 1.0 t_1)))))
(exp x)))))
double code(double x, double y, double z) {
double t_0 = 0.5 + (z * -0.16666666666666666);
double t_1 = z * t_0;
double tmp;
if (z <= -2e+77) {
tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z)))))));
} else if (z <= -2.3e+46) {
tmp = 1.0 + ((z * (-1.0 + (t_1 * (z * (t_0 * t_1))))) / (1.0 + (t_1 * (1.0 + t_1))));
} 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) :: t_1
real(8) :: tmp
t_0 = 0.5d0 + (z * (-0.16666666666666666d0))
t_1 = z * t_0
if (z <= (-2d+77)) then
tmp = 1.0d0 + (z * (1.0d0 / (1.0d0 / ((-1.0d0) + (0.125d0 * (z * (z * z)))))))
else if (z <= (-2.3d+46)) then
tmp = 1.0d0 + ((z * ((-1.0d0) + (t_1 * (z * (t_0 * t_1))))) / (1.0d0 + (t_1 * (1.0d0 + t_1))))
else
tmp = exp(x)
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 * t_0;
double tmp;
if (z <= -2e+77) {
tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z)))))));
} else if (z <= -2.3e+46) {
tmp = 1.0 + ((z * (-1.0 + (t_1 * (z * (t_0 * t_1))))) / (1.0 + (t_1 * (1.0 + t_1))));
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 + (z * -0.16666666666666666) t_1 = z * t_0 tmp = 0 if z <= -2e+77: tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z))))))) elif z <= -2.3e+46: tmp = 1.0 + ((z * (-1.0 + (t_1 * (z * (t_0 * t_1))))) / (1.0 + (t_1 * (1.0 + t_1)))) else: tmp = math.exp(x) return tmp
function code(x, y, z) t_0 = Float64(0.5 + Float64(z * -0.16666666666666666)) t_1 = Float64(z * t_0) tmp = 0.0 if (z <= -2e+77) tmp = Float64(1.0 + Float64(z * Float64(1.0 / Float64(1.0 / Float64(-1.0 + Float64(0.125 * Float64(z * Float64(z * z)))))))); elseif (z <= -2.3e+46) tmp = Float64(1.0 + Float64(Float64(z * Float64(-1.0 + Float64(t_1 * Float64(z * Float64(t_0 * t_1))))) / Float64(1.0 + Float64(t_1 * Float64(1.0 + t_1))))); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.5 + (z * -0.16666666666666666); t_1 = z * t_0; tmp = 0.0; if (z <= -2e+77) tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z))))))); elseif (z <= -2.3e+46) tmp = 1.0 + ((z * (-1.0 + (t_1 * (z * (t_0 * t_1))))) / (1.0 + (t_1 * (1.0 + t_1)))); else tmp = exp(x); 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 * t$95$0), $MachinePrecision]}, If[LessEqual[z, -2e+77], N[(1.0 + N[(z * N[(1.0 / N[(1.0 / N[(-1.0 + N[(0.125 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e+46], N[(1.0 + N[(N[(z * N[(-1.0 + N[(t$95$1 * N[(z * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$1 * N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[x], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 + z \cdot -0.16666666666666666\\
t_1 := z \cdot t\_0\\
\mathbf{if}\;z \leq -2 \cdot 10^{+77}:\\
\;\;\;\;1 + z \cdot \frac{1}{\frac{1}{-1 + 0.125 \cdot \left(z \cdot \left(z \cdot z\right)\right)}}\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{+46}:\\
\;\;\;\;1 + \frac{z \cdot \left(-1 + t\_1 \cdot \left(z \cdot \left(t\_0 \cdot t\_1\right)\right)\right)}{1 + t\_1 \cdot \left(1 + t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if z < -1.99999999999999997e77Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.3%
Simplified93.3%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6465.3%
Simplified65.3%
+-commutativeN/A
flip3-+N/A
metadata-evalN/A
+-commutativeN/A
metadata-evalN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr22.5%
Taylor expanded in z around 0
Simplified93.3%
if -1.99999999999999997e77 < z < -2.3000000000000001e46Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64100.0%
Simplified100.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-*.f645.1%
Simplified5.1%
*-commutativeN/A
flip3-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr100.0%
if -2.3000000000000001e46 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified55.6%
Final simplification65.7%
(FPCore (x y z)
:precision binary64
(if (<= x -800.0)
(* z (* (* z z) -0.16666666666666666))
(if (<= x 7.1e+99)
(+ 1.0 (* z (/ 1.0 (/ 1.0 (+ -1.0 (* 0.125 (* z (* z z))))))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -800.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 7.1e+99) {
tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z)))))));
} 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 <= (-800.0d0)) then
tmp = z * ((z * z) * (-0.16666666666666666d0))
else if (x <= 7.1d+99) then
tmp = 1.0d0 + (z * (1.0d0 / (1.0d0 / ((-1.0d0) + (0.125d0 * (z * (z * z)))))))
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 <= -800.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 7.1e+99) {
tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z)))))));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -800.0: tmp = z * ((z * z) * -0.16666666666666666) elif x <= 7.1e+99: tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z))))))) 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 <= -800.0) tmp = Float64(z * Float64(Float64(z * z) * -0.16666666666666666)); elseif (x <= 7.1e+99) tmp = Float64(1.0 + Float64(z * Float64(1.0 / Float64(1.0 / Float64(-1.0 + Float64(0.125 * Float64(z * Float64(z * z)))))))); 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 <= -800.0) tmp = z * ((z * z) * -0.16666666666666666); elseif (x <= 7.1e+99) tmp = 1.0 + (z * (1.0 / (1.0 / (-1.0 + (0.125 * (z * (z * z))))))); 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, -800.0], N[(z * N[(N[(z * z), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.1e+99], N[(1.0 + N[(z * N[(1.0 / N[(1.0 / N[(-1.0 + N[(0.125 * N[(z * N[(z * z), $MachinePrecision]), $MachinePrecision]), $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 -800:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{+99}:\\
\;\;\;\;1 + z \cdot \frac{1}{\frac{1}{-1 + 0.125 \cdot \left(z \cdot \left(z \cdot z\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 < -800Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.1%
Simplified34.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-*.f6415.7%
Simplified15.7%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6415.7%
Applied egg-rr15.7%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
if -800 < x < 7.09999999999999994e99Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6473.2%
Simplified73.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-*.f6435.7%
Simplified35.7%
+-commutativeN/A
flip3-+N/A
metadata-evalN/A
+-commutativeN/A
metadata-evalN/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr25.1%
Taylor expanded in z around 0
Simplified46.3%
if 7.09999999999999994e99 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified88.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-*.f6483.7%
Simplified83.7%
Final simplification52.1%
(FPCore (x y z)
:precision binary64
(if (<= x -680.0)
(* z (* (* z z) -0.16666666666666666))
(if (<= x 6e+99)
(+ 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 <= -680.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 6e+99) {
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 <= (-680.0d0)) then
tmp = z * ((z * z) * (-0.16666666666666666d0))
else if (x <= 6d+99) 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 <= -680.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 6e+99) {
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 <= -680.0: tmp = z * ((z * z) * -0.16666666666666666) elif x <= 6e+99: 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 <= -680.0) tmp = Float64(z * Float64(Float64(z * z) * -0.16666666666666666)); elseif (x <= 6e+99) 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 <= -680.0) tmp = z * ((z * z) * -0.16666666666666666); elseif (x <= 6e+99) 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, -680.0], N[(z * N[(N[(z * z), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6e+99], 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 -680:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+99}:\\
\;\;\;\;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 < -680Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.1%
Simplified34.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-*.f6415.7%
Simplified15.7%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6415.7%
Applied egg-rr15.7%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
if -680 < x < 6.00000000000000029e99Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6473.2%
Simplified73.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-*.f6442.1%
Simplified42.1%
if 6.00000000000000029e99 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified88.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-*.f6483.7%
Simplified83.7%
Final simplification49.6%
(FPCore (x y z)
:precision binary64
(if (<= x -480.0)
(* z (* (* z z) -0.16666666666666666))
(if (<= x 7.1e+99)
(+ 1.0 (* z (+ -1.0 (/ z (/ -6.0 z)))))
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -480.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 7.1e+99) {
tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z))));
} 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 <= (-480.0d0)) then
tmp = z * ((z * z) * (-0.16666666666666666d0))
else if (x <= 7.1d+99) then
tmp = 1.0d0 + (z * ((-1.0d0) + (z / ((-6.0d0) / z))))
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 <= -480.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 7.1e+99) {
tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z))));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -480.0: tmp = z * ((z * z) * -0.16666666666666666) elif x <= 7.1e+99: tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z)))) 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 <= -480.0) tmp = Float64(z * Float64(Float64(z * z) * -0.16666666666666666)); elseif (x <= 7.1e+99) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + Float64(z / Float64(-6.0 / z))))); 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 <= -480.0) tmp = z * ((z * z) * -0.16666666666666666); elseif (x <= 7.1e+99) tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z)))); 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, -480.0], N[(z * N[(N[(z * z), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.1e+99], N[(1.0 + N[(z * N[(-1.0 + N[(z / N[(-6.0 / z), $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 -480:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{+99}:\\
\;\;\;\;1 + z \cdot \left(-1 + \frac{z}{\frac{-6}{z}}\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 < -480Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.1%
Simplified34.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-*.f6415.7%
Simplified15.7%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6415.7%
Applied egg-rr15.7%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
if -480 < x < 7.09999999999999994e99Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6473.2%
Simplified73.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-*.f6442.1%
Simplified42.1%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6442.1%
Applied egg-rr42.1%
Taylor expanded in z around inf
/-lowering-/.f6441.9%
Simplified41.9%
if 7.09999999999999994e99 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified88.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-*.f6483.7%
Simplified83.7%
Final simplification49.4%
(FPCore (x y z)
:precision binary64
(if (<= x -420.0)
(* z (* (* z z) -0.16666666666666666))
(if (<= x 1.32e+154)
(+ 1.0 (* z (+ -1.0 (/ z (/ -6.0 z)))))
(* 0.5 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -420.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 1.32e+154) {
tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / 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 <= (-420.0d0)) then
tmp = z * ((z * z) * (-0.16666666666666666d0))
else if (x <= 1.32d+154) then
tmp = 1.0d0 + (z * ((-1.0d0) + (z / ((-6.0d0) / 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 <= -420.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (x <= 1.32e+154) {
tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z))));
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -420.0: tmp = z * ((z * z) * -0.16666666666666666) elif x <= 1.32e+154: tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z)))) else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -420.0) tmp = Float64(z * Float64(Float64(z * z) * -0.16666666666666666)); elseif (x <= 1.32e+154) tmp = Float64(1.0 + Float64(z * Float64(-1.0 + Float64(z / Float64(-6.0 / 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 <= -420.0) tmp = z * ((z * z) * -0.16666666666666666); elseif (x <= 1.32e+154) tmp = 1.0 + (z * (-1.0 + (z / (-6.0 / z)))); else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -420.0], N[(z * N[(N[(z * z), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.32e+154], N[(1.0 + N[(z * N[(-1.0 + N[(z / N[(-6.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -420:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;1 + z \cdot \left(-1 + \frac{z}{\frac{-6}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if x < -420Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.1%
Simplified34.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-*.f6415.7%
Simplified15.7%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6415.7%
Applied egg-rr15.7%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
if -420 < x < 1.31999999999999998e154Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6469.9%
Simplified69.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-*.f6439.7%
Simplified39.7%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6439.7%
Applied egg-rr39.7%
Taylor expanded in z around inf
/-lowering-/.f6439.5%
Simplified39.5%
if 1.31999999999999998e154 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified91.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6491.4%
Simplified91.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.4%
Simplified91.4%
Final simplification45.6%
(FPCore (x y z) :precision binary64 (if (<= z -10500.0) (* (* z z) (+ 0.5 (* z -0.16666666666666666))) (if (<= z 2.2e-7) (+ 1.0 (* x (+ 1.0 (* x 0.5)))) (* 0.5 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -10500.0) {
tmp = (z * z) * (0.5 + (z * -0.16666666666666666));
} else if (z <= 2.2e-7) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} 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 (z <= (-10500.0d0)) then
tmp = (z * z) * (0.5d0 + (z * (-0.16666666666666666d0)))
else if (z <= 2.2d-7) then
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
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 (z <= -10500.0) {
tmp = (z * z) * (0.5 + (z * -0.16666666666666666));
} else if (z <= 2.2e-7) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -10500.0: tmp = (z * z) * (0.5 + (z * -0.16666666666666666)) elif z <= 2.2e-7: tmp = 1.0 + (x * (1.0 + (x * 0.5))) else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -10500.0) tmp = Float64(Float64(z * z) * Float64(0.5 + Float64(z * -0.16666666666666666))); elseif (z <= 2.2e-7) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -10500.0) tmp = (z * z) * (0.5 + (z * -0.16666666666666666)); elseif (z <= 2.2e-7) tmp = 1.0 + (x * (1.0 + (x * 0.5))); else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -10500.0], N[(N[(z * z), $MachinePrecision] * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-7], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -10500:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-7}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if z < -10500Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.4%
Simplified93.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-*.f6469.5%
Simplified69.5%
Taylor expanded in z around inf
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
fma-defineN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
unpow2N/A
associate-/l*N/A
*-rgt-identityN/A
associate-*r/N/A
rgt-mult-inverseN/A
*-rgt-identityN/A
fma-defineN/A
Simplified69.5%
if -10500 < z < 2.2000000000000001e-7Initial program 100.0%
Taylor expanded in x around inf
Simplified69.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.3%
Simplified33.3%
if 2.2000000000000001e-7 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified35.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6416.9%
Simplified16.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.3%
Simplified36.3%
Final simplification44.7%
(FPCore (x y z) :precision binary64 (if (<= z -24.0) (* (* z z) (+ 0.5 (* z -0.16666666666666666))) (if (<= z 370.0) (+ 1.0 (* x (* x 0.5))) (* 0.5 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -24.0) {
tmp = (z * z) * (0.5 + (z * -0.16666666666666666));
} else if (z <= 370.0) {
tmp = 1.0 + (x * (x * 0.5));
} 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 (z <= (-24.0d0)) then
tmp = (z * z) * (0.5d0 + (z * (-0.16666666666666666d0)))
else if (z <= 370.0d0) then
tmp = 1.0d0 + (x * (x * 0.5d0))
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 (z <= -24.0) {
tmp = (z * z) * (0.5 + (z * -0.16666666666666666));
} else if (z <= 370.0) {
tmp = 1.0 + (x * (x * 0.5));
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -24.0: tmp = (z * z) * (0.5 + (z * -0.16666666666666666)) elif z <= 370.0: tmp = 1.0 + (x * (x * 0.5)) else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -24.0) tmp = Float64(Float64(z * z) * Float64(0.5 + Float64(z * -0.16666666666666666))); elseif (z <= 370.0) tmp = Float64(1.0 + Float64(x * Float64(x * 0.5))); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -24.0) tmp = (z * z) * (0.5 + (z * -0.16666666666666666)); elseif (z <= 370.0) tmp = 1.0 + (x * (x * 0.5)); else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -24.0], N[(N[(z * z), $MachinePrecision] * N[(0.5 + N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 370.0], N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -24:\\
\;\;\;\;\left(z \cdot z\right) \cdot \left(0.5 + z \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;z \leq 370:\\
\;\;\;\;1 + x \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if z < -24Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.4%
Simplified93.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-*.f6469.5%
Simplified69.5%
Taylor expanded in z around inf
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
unpow3N/A
unpow2N/A
associate-*r*N/A
metadata-evalN/A
distribute-lft-neg-inN/A
*-commutativeN/A
fma-defineN/A
associate-*l*N/A
associate-*l/N/A
*-lft-identityN/A
unpow2N/A
associate-/l*N/A
*-rgt-identityN/A
associate-*r/N/A
rgt-mult-inverseN/A
*-rgt-identityN/A
fma-defineN/A
Simplified69.5%
if -24 < z < 370Initial program 100.0%
Taylor expanded in x around inf
Simplified69.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.3%
Simplified33.3%
Taylor expanded in x around inf
*-lowering-*.f6433.1%
Simplified33.1%
if 370 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified33.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6416.1%
Simplified16.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.3%
Simplified36.3%
Final simplification44.6%
(FPCore (x y z) :precision binary64 (if (<= z -4500000.0) (* z (* (* z z) -0.16666666666666666)) (if (<= z 390.0) (+ 1.0 (* x (* x 0.5))) (* 0.5 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4500000.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (z <= 390.0) {
tmp = 1.0 + (x * (x * 0.5));
} 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 (z <= (-4500000.0d0)) then
tmp = z * ((z * z) * (-0.16666666666666666d0))
else if (z <= 390.0d0) then
tmp = 1.0d0 + (x * (x * 0.5d0))
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 (z <= -4500000.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (z <= 390.0) {
tmp = 1.0 + (x * (x * 0.5));
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4500000.0: tmp = z * ((z * z) * -0.16666666666666666) elif z <= 390.0: tmp = 1.0 + (x * (x * 0.5)) else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4500000.0) tmp = Float64(z * Float64(Float64(z * z) * -0.16666666666666666)); elseif (z <= 390.0) tmp = Float64(1.0 + Float64(x * Float64(x * 0.5))); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4500000.0) tmp = z * ((z * z) * -0.16666666666666666); elseif (z <= 390.0) tmp = 1.0 + (x * (x * 0.5)); else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4500000.0], N[(z * N[(N[(z * z), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 390.0], N[(1.0 + N[(x * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4500000:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;z \leq 390:\\
\;\;\;\;1 + x \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if z < -4.5e6Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.4%
Simplified93.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-*.f6469.5%
Simplified69.5%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6469.5%
Applied egg-rr69.5%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.5%
Simplified69.5%
if -4.5e6 < z < 390Initial program 100.0%
Taylor expanded in x around inf
Simplified69.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6433.3%
Simplified33.3%
Taylor expanded in x around inf
*-lowering-*.f6433.1%
Simplified33.1%
if 390 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified33.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6416.1%
Simplified16.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6436.3%
Simplified36.3%
Final simplification44.6%
(FPCore (x y z) :precision binary64 (if (<= z -1260000.0) (* z (* (* z z) -0.16666666666666666)) (if (<= z 4.5e-90) (+ x 1.0) (* 0.5 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1260000.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (z <= 4.5e-90) {
tmp = x + 1.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) :: tmp
if (z <= (-1260000.0d0)) then
tmp = z * ((z * z) * (-0.16666666666666666d0))
else if (z <= 4.5d-90) then
tmp = x + 1.0d0
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 (z <= -1260000.0) {
tmp = z * ((z * z) * -0.16666666666666666);
} else if (z <= 4.5e-90) {
tmp = x + 1.0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1260000.0: tmp = z * ((z * z) * -0.16666666666666666) elif z <= 4.5e-90: tmp = x + 1.0 else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1260000.0) tmp = Float64(z * Float64(Float64(z * z) * -0.16666666666666666)); elseif (z <= 4.5e-90) tmp = Float64(x + 1.0); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1260000.0) tmp = z * ((z * z) * -0.16666666666666666); elseif (z <= 4.5e-90) tmp = x + 1.0; else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1260000.0], N[(z * N[(N[(z * z), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-90], N[(x + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1260000:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot -0.16666666666666666\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-90}:\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if z < -1.26e6Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.4%
Simplified93.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-*.f6469.5%
Simplified69.5%
flip3-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6469.5%
Applied egg-rr69.5%
Taylor expanded in z around inf
unpow3N/A
unpow2N/A
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.5%
Simplified69.5%
if -1.26e6 < z < 4.50000000000000009e-90Initial program 100.0%
Taylor expanded in x around inf
Simplified70.6%
Taylor expanded in x around 0
+-lowering-+.f6427.0%
Simplified27.0%
if 4.50000000000000009e-90 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified39.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6415.7%
Simplified15.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.6%
Simplified31.6%
Final simplification40.9%
(FPCore (x y z) :precision binary64 (if (<= z -250.0) (* (* z z) 0.5) (if (<= z 4.4e-90) (+ x 1.0) (* 0.5 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -250.0) {
tmp = (z * z) * 0.5;
} else if (z <= 4.4e-90) {
tmp = x + 1.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) :: tmp
if (z <= (-250.0d0)) then
tmp = (z * z) * 0.5d0
else if (z <= 4.4d-90) then
tmp = x + 1.0d0
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 (z <= -250.0) {
tmp = (z * z) * 0.5;
} else if (z <= 4.4e-90) {
tmp = x + 1.0;
} else {
tmp = 0.5 * (x * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -250.0: tmp = (z * z) * 0.5 elif z <= 4.4e-90: tmp = x + 1.0 else: tmp = 0.5 * (x * x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -250.0) tmp = Float64(Float64(z * z) * 0.5); elseif (z <= 4.4e-90) tmp = Float64(x + 1.0); else tmp = Float64(0.5 * Float64(x * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -250.0) tmp = (z * z) * 0.5; elseif (z <= 4.4e-90) tmp = x + 1.0; else tmp = 0.5 * (x * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -250.0], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[z, 4.4e-90], N[(x + 1.0), $MachinePrecision], N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -250:\\
\;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-90}:\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot x\right)\\
\end{array}
\end{array}
if z < -250Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6493.4%
Simplified93.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-*.f6452.2%
Simplified52.2%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6453.2%
Simplified53.2%
if -250 < z < 4.39999999999999972e-90Initial program 100.0%
Taylor expanded in x around inf
Simplified70.6%
Taylor expanded in x around 0
+-lowering-+.f6427.0%
Simplified27.0%
if 4.39999999999999972e-90 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified39.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6415.7%
Simplified15.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6431.6%
Simplified31.6%
Final simplification36.2%
(FPCore (x y z) :precision binary64 (let* ((t_0 (* 0.5 (* x x)))) (if (<= z -1.5e-92) t_0 (if (<= z 4.5e-90) (+ x 1.0) t_0))))
double code(double x, double y, double z) {
double t_0 = 0.5 * (x * x);
double tmp;
if (z <= -1.5e-92) {
tmp = t_0;
} else if (z <= 4.5e-90) {
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 = 0.5d0 * (x * x)
if (z <= (-1.5d-92)) then
tmp = t_0
else if (z <= 4.5d-90) 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 = 0.5 * (x * x);
double tmp;
if (z <= -1.5e-92) {
tmp = t_0;
} else if (z <= 4.5e-90) {
tmp = x + 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = 0.5 * (x * x) tmp = 0 if z <= -1.5e-92: tmp = t_0 elif z <= 4.5e-90: tmp = x + 1.0 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(0.5 * Float64(x * x)) tmp = 0.0 if (z <= -1.5e-92) tmp = t_0; elseif (z <= 4.5e-90) tmp = Float64(x + 1.0); 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 (z <= -1.5e-92) tmp = t_0; elseif (z <= 4.5e-90) tmp = x + 1.0; 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[z, -1.5e-92], t$95$0, If[LessEqual[z, 4.5e-90], N[(x + 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.5 \cdot \left(x \cdot x\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{-92}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-90}:\\
\;\;\;\;x + 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -1.50000000000000007e-92 or 4.50000000000000009e-90 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified36.7%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6415.9%
Simplified15.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6421.7%
Simplified21.7%
if -1.50000000000000007e-92 < z < 4.50000000000000009e-90Initial program 100.0%
Taylor expanded in x around inf
Simplified71.6%
Taylor expanded in x around 0
+-lowering-+.f6428.1%
Simplified28.1%
Final simplification23.8%
(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--.f6456.7%
Simplified56.7%
Taylor expanded in z around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6412.4%
Simplified12.4%
(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
Simplified47.9%
Taylor expanded in x around 0
+-lowering-+.f6412.2%
Simplified12.2%
Final simplification12.2%
(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
Simplified47.9%
Taylor expanded in x around 0
Simplified12.0%
(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 2024161
(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)))