
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Initial program 100.0%
(FPCore (x y z) :precision binary64 (if (<= (* y (log y)) 20000000000000.0) (exp (- x z)) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if ((y * log(y)) <= 20000000000000.0) {
tmp = exp((x - z));
} else {
tmp = pow(y, y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y * log(y)) <= 20000000000000.0d0) then
tmp = exp((x - z))
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y * Math.log(y)) <= 20000000000000.0) {
tmp = Math.exp((x - z));
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y * math.log(y)) <= 20000000000000.0: tmp = math.exp((x - z)) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y * log(y)) <= 20000000000000.0) tmp = exp(Float64(x - z)); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y * log(y)) <= 20000000000000.0) tmp = exp((x - z)); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision], 20000000000000.0], N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \cdot \log y \leq 20000000000000:\\
\;\;\;\;e^{x - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if (*.f64 y (log.f64 y)) < 2e13Initial program 100.0%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
neg-mul-1N/A
exp-lowering-exp.f64N/A
neg-mul-1N/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
--lowering--.f6498.0%
Simplified98.0%
if 2e13 < (*.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.f6486.6%
Simplified86.6%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6486.6%
Applied egg-rr86.6%
(FPCore (x y z) :precision binary64 (let* ((t_0 (exp (- 0.0 z)))) (if (<= z -390000.0) t_0 (if (<= z 8.8e+119) (exp x) t_0))))
double code(double x, double y, double z) {
double t_0 = exp((0.0 - z));
double tmp;
if (z <= -390000.0) {
tmp = t_0;
} else if (z <= 8.8e+119) {
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 <= (-390000.0d0)) then
tmp = t_0
else if (z <= 8.8d+119) 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 <= -390000.0) {
tmp = t_0;
} else if (z <= 8.8e+119) {
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 <= -390000.0: tmp = t_0 elif z <= 8.8e+119: 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 <= -390000.0) tmp = t_0; elseif (z <= 8.8e+119) 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 <= -390000.0) tmp = t_0; elseif (z <= 8.8e+119) 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, -390000.0], t$95$0, If[LessEqual[z, 8.8e+119], N[Exp[x], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{0 - z}\\
\mathbf{if}\;z \leq -390000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+119}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if z < -3.9e5 or 8.8000000000000005e119 < z Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6489.4%
Simplified89.4%
sub0-negN/A
neg-lowering-neg.f6489.4%
Applied egg-rr89.4%
if -3.9e5 < z < 8.8000000000000005e119Initial program 100.0%
Taylor expanded in x around inf
Simplified65.4%
Final simplification74.1%
(FPCore (x y z) :precision binary64 (if (<= z -3.3e+129) (* z (* z (* z -0.16666666666666666))) (if (<= z 1.15e+132) (exp x) (* x (* 0.16666666666666666 (* x x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.3e+129) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 1.15e+132) {
tmp = exp(x);
} else {
tmp = x * (0.16666666666666666 * (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 <= (-3.3d+129)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (z <= 1.15d+132) then
tmp = exp(x)
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.3e+129) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 1.15e+132) {
tmp = Math.exp(x);
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.3e+129: tmp = z * (z * (z * -0.16666666666666666)) elif z <= 1.15e+132: tmp = math.exp(x) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.3e+129) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (z <= 1.15e+132) tmp = exp(x); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.3e+129) tmp = z * (z * (z * -0.16666666666666666)); elseif (z <= 1.15e+132) tmp = exp(x); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.3e+129], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+132], N[Exp[x], $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+129}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+132}:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -3.2999999999999999e129Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6497.1%
Simplified97.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-*.f6497.1%
Simplified97.1%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6497.1%
Simplified97.1%
if -3.2999999999999999e129 < z < 1.1500000000000001e132Initial program 100.0%
Taylor expanded in x around inf
Simplified62.9%
if 1.1500000000000001e132 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified27.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f646.0%
Simplified6.0%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.6%
Simplified54.6%
(FPCore (x y z) :precision binary64 (if (<= y 530000000000.0) (exp x) (pow y y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 530000000000.0) {
tmp = exp(x);
} else {
tmp = pow(y, y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 530000000000.0d0) then
tmp = exp(x)
else
tmp = y ** y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 530000000000.0) {
tmp = Math.exp(x);
} else {
tmp = Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 530000000000.0: tmp = math.exp(x) else: tmp = math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 530000000000.0) tmp = exp(x); else tmp = y ^ y; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 530000000000.0) tmp = exp(x); else tmp = y ^ y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 530000000000.0], N[Exp[x], $MachinePrecision], N[Power[y, y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 530000000000:\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y}\\
\end{array}
\end{array}
if y < 5.3e11Initial program 100.0%
Taylor expanded in x around inf
Simplified73.3%
if 5.3e11 < 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.6%
Simplified86.6%
*-commutativeN/A
exp-to-powN/A
pow-lowering-pow.f6486.6%
Applied egg-rr86.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (* x (+ 0.5 (* x 0.16666666666666666))))))
(if (<= x -820.0)
(* z (* z (* z -0.16666666666666666)))
(if (<= x 4.3e+51)
(+ 1.0 (/ (* z (- 1.0 (* 0.25 (* z z)))) (+ -1.0 (* z -0.5))))
(if (<= x 1e+103)
(+ 1.0 (/ (- (* x x) (* t_0 t_0)) (- x t_0)))
(* x (* 0.16666666666666666 (* x x))))))))
double code(double x, double y, double z) {
double t_0 = x * (x * (0.5 + (x * 0.16666666666666666)));
double tmp;
if (x <= -820.0) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (x <= 4.3e+51) {
tmp = 1.0 + ((z * (1.0 - (0.25 * (z * z)))) / (-1.0 + (z * -0.5)));
} else if (x <= 1e+103) {
tmp = 1.0 + (((x * x) - (t_0 * t_0)) / (x - t_0));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (x * (0.5d0 + (x * 0.16666666666666666d0)))
if (x <= (-820.0d0)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (x <= 4.3d+51) then
tmp = 1.0d0 + ((z * (1.0d0 - (0.25d0 * (z * z)))) / ((-1.0d0) + (z * (-0.5d0))))
else if (x <= 1d+103) then
tmp = 1.0d0 + (((x * x) - (t_0 * t_0)) / (x - t_0))
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (x * (0.5 + (x * 0.16666666666666666)));
double tmp;
if (x <= -820.0) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (x <= 4.3e+51) {
tmp = 1.0 + ((z * (1.0 - (0.25 * (z * z)))) / (-1.0 + (z * -0.5)));
} else if (x <= 1e+103) {
tmp = 1.0 + (((x * x) - (t_0 * t_0)) / (x - t_0));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): t_0 = x * (x * (0.5 + (x * 0.16666666666666666))) tmp = 0 if x <= -820.0: tmp = z * (z * (z * -0.16666666666666666)) elif x <= 4.3e+51: tmp = 1.0 + ((z * (1.0 - (0.25 * (z * z)))) / (-1.0 + (z * -0.5))) elif x <= 1e+103: tmp = 1.0 + (((x * x) - (t_0 * t_0)) / (x - t_0)) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))) tmp = 0.0 if (x <= -820.0) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (x <= 4.3e+51) tmp = Float64(1.0 + Float64(Float64(z * Float64(1.0 - Float64(0.25 * Float64(z * z)))) / Float64(-1.0 + Float64(z * -0.5)))); elseif (x <= 1e+103) tmp = Float64(1.0 + Float64(Float64(Float64(x * x) - Float64(t_0 * t_0)) / Float64(x - t_0))); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (x * (0.5 + (x * 0.16666666666666666))); tmp = 0.0; if (x <= -820.0) tmp = z * (z * (z * -0.16666666666666666)); elseif (x <= 4.3e+51) tmp = 1.0 + ((z * (1.0 - (0.25 * (z * z)))) / (-1.0 + (z * -0.5))); elseif (x <= 1e+103) tmp = 1.0 + (((x * x) - (t_0 * t_0)) / (x - t_0)); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -820.0], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.3e+51], N[(1.0 + N[(N[(z * N[(1.0 - N[(0.25 * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+103], N[(1.0 + N[(N[(N[(x * x), $MachinePrecision] - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(x - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;x \leq -820:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+51}:\\
\;\;\;\;1 + \frac{z \cdot \left(1 - 0.25 \cdot \left(z \cdot z\right)\right)}{-1 + z \cdot -0.5}\\
\mathbf{elif}\;x \leq 10^{+103}:\\
\;\;\;\;1 + \frac{x \cdot x - t\_0 \cdot t\_0}{x - t\_0}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -820Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6432.7%
Simplified32.7%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6413.1%
Simplified13.1%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.4%
Simplified29.4%
if -820 < x < 4.2999999999999997e51Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6463.8%
Simplified63.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-*.f6436.7%
Simplified36.7%
*-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-eval40.2%
Applied egg-rr40.2%
if 4.2999999999999997e51 < x < 1e103Initial program 100.0%
Taylor expanded in x around inf
Simplified92.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-*.f645.7%
Simplified5.7%
distribute-rgt-inN/A
*-lft-identityN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr92.4%
if 1e103 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Final simplification50.9%
(FPCore (x y z)
:precision binary64
(if (<= z -1.32e+62)
(* z (* z (* z -0.16666666666666666)))
(if (<= z -8e-163)
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))
(if (<= z -1.1e-308)
(+
1.0
(* z (* z (* z (+ -0.16666666666666666 (/ (- (/ -1.0 z) -0.5) z))))))
(if (<= z 0.0004)
(+ 1.0 (* x (+ 1.0 (* x 0.5))))
(* x (* 0.16666666666666666 (* x x))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.32e+62) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= -8e-163) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else if (z <= -1.1e-308) {
tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z)))));
} else if (z <= 0.0004) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = x * (0.16666666666666666 * (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 <= (-1.32d+62)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (z <= (-8d-163)) then
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
else if (z <= (-1.1d-308)) then
tmp = 1.0d0 + (z * (z * (z * ((-0.16666666666666666d0) + ((((-1.0d0) / z) - (-0.5d0)) / z)))))
else if (z <= 0.0004d0) then
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.32e+62) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= -8e-163) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else if (z <= -1.1e-308) {
tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z)))));
} else if (z <= 0.0004) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.32e+62: tmp = z * (z * (z * -0.16666666666666666)) elif z <= -8e-163: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) elif z <= -1.1e-308: tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z))))) elif z <= 0.0004: tmp = 1.0 + (x * (1.0 + (x * 0.5))) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.32e+62) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (z <= -8e-163) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); elseif (z <= -1.1e-308) tmp = Float64(1.0 + Float64(z * Float64(z * Float64(z * Float64(-0.16666666666666666 + Float64(Float64(Float64(-1.0 / z) - -0.5) / z)))))); elseif (z <= 0.0004) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.32e+62) tmp = z * (z * (z * -0.16666666666666666)); elseif (z <= -8e-163) tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); elseif (z <= -1.1e-308) tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z))))); elseif (z <= 0.0004) tmp = 1.0 + (x * (1.0 + (x * 0.5))); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.32e+62], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e-163], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-308], N[(1.0 + N[(z * N[(z * N[(z * N[(-0.16666666666666666 + N[(N[(N[(-1.0 / z), $MachinePrecision] - -0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0004], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+62}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-163}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-308}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot \left(-0.16666666666666666 + \frac{\frac{-1}{z} - -0.5}{z}\right)\right)\right)\\
\mathbf{elif}\;z \leq 0.0004:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -1.3199999999999999e62Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6489.1%
Simplified89.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-*.f6480.9%
Simplified80.9%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.9%
Simplified80.9%
if -1.3199999999999999e62 < z < -7.99999999999999939e-163Initial program 100.0%
Taylor expanded in x around inf
Simplified66.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-*.f6436.8%
Simplified36.8%
if -7.99999999999999939e-163 < z < -1.1000000000000001e-308Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6421.5%
Simplified21.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-*.f6421.5%
Simplified21.5%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval21.5%
Applied egg-rr21.5%
Taylor expanded in z around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
associate-+l+N/A
neg-sub0N/A
associate--r-N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate--r-N/A
associate-*r/N/A
metadata-evalN/A
unpow2N/A
Simplified65.2%
if -1.1000000000000001e-308 < z < 4.00000000000000019e-4Initial program 100.0%
Taylor expanded in x around inf
Simplified61.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6443.5%
Simplified43.5%
if 4.00000000000000019e-4 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified42.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Simplified17.6%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
Final simplification51.3%
(FPCore (x y z)
:precision binary64
(if (<= z -3.2e-146)
(*
z
(* (* z z) (- (/ (+ 0.5 (/ (+ -1.0 (/ 1.0 z)) z)) z) 0.16666666666666666)))
(if (<= z -2e-307)
(+
1.0
(* z (* z (* z (+ -0.16666666666666666 (/ (- (/ -1.0 z) -0.5) z))))))
(if (<= z 0.00012)
(+ 1.0 (* x (+ 1.0 (* x 0.5))))
(* x (* 0.16666666666666666 (* x x)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e-146) {
tmp = z * ((z * z) * (((0.5 + ((-1.0 + (1.0 / z)) / z)) / z) - 0.16666666666666666));
} else if (z <= -2e-307) {
tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z)))));
} else if (z <= 0.00012) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = x * (0.16666666666666666 * (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 <= (-3.2d-146)) then
tmp = z * ((z * z) * (((0.5d0 + (((-1.0d0) + (1.0d0 / z)) / z)) / z) - 0.16666666666666666d0))
else if (z <= (-2d-307)) then
tmp = 1.0d0 + (z * (z * (z * ((-0.16666666666666666d0) + ((((-1.0d0) / z) - (-0.5d0)) / z)))))
else if (z <= 0.00012d0) then
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.2e-146) {
tmp = z * ((z * z) * (((0.5 + ((-1.0 + (1.0 / z)) / z)) / z) - 0.16666666666666666));
} else if (z <= -2e-307) {
tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z)))));
} else if (z <= 0.00012) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.2e-146: tmp = z * ((z * z) * (((0.5 + ((-1.0 + (1.0 / z)) / z)) / z) - 0.16666666666666666)) elif z <= -2e-307: tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z))))) elif z <= 0.00012: tmp = 1.0 + (x * (1.0 + (x * 0.5))) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.2e-146) tmp = Float64(z * Float64(Float64(z * z) * Float64(Float64(Float64(0.5 + Float64(Float64(-1.0 + Float64(1.0 / z)) / z)) / z) - 0.16666666666666666))); elseif (z <= -2e-307) tmp = Float64(1.0 + Float64(z * Float64(z * Float64(z * Float64(-0.16666666666666666 + Float64(Float64(Float64(-1.0 / z) - -0.5) / z)))))); elseif (z <= 0.00012) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.2e-146) tmp = z * ((z * z) * (((0.5 + ((-1.0 + (1.0 / z)) / z)) / z) - 0.16666666666666666)); elseif (z <= -2e-307) tmp = 1.0 + (z * (z * (z * (-0.16666666666666666 + (((-1.0 / z) - -0.5) / z))))); elseif (z <= 0.00012) tmp = 1.0 + (x * (1.0 + (x * 0.5))); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.2e-146], N[(z * N[(N[(z * z), $MachinePrecision] * N[(N[(N[(0.5 + N[(N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-307], N[(1.0 + N[(z * N[(z * N[(z * N[(-0.16666666666666666 + N[(N[(N[(-1.0 / z), $MachinePrecision] - -0.5), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00012], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{-146}:\\
\;\;\;\;z \cdot \left(\left(z \cdot z\right) \cdot \left(\frac{0.5 + \frac{-1 + \frac{1}{z}}{z}}{z} - 0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-307}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot \left(-0.16666666666666666 + \frac{\frac{-1}{z} - -0.5}{z}\right)\right)\right)\\
\mathbf{elif}\;z \leq 0.00012:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -3.1999999999999999e-146Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6464.1%
Simplified64.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-*.f6443.7%
Simplified43.7%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval43.7%
Applied egg-rr43.7%
Taylor expanded in z around -inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
cube-multN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
mul-1-negN/A
Simplified53.0%
if -3.1999999999999999e-146 < z < -1.99999999999999982e-307Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6426.8%
Simplified26.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-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6426.8%
Simplified26.8%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
metadata-evalN/A
swap-sqrN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-eval26.8%
Applied egg-rr26.8%
Taylor expanded in z around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
associate-+l+N/A
neg-sub0N/A
associate--r-N/A
sub-negN/A
+-commutativeN/A
neg-sub0N/A
associate--r-N/A
associate-*r/N/A
metadata-evalN/A
unpow2N/A
Simplified64.3%
if -1.99999999999999982e-307 < z < 1.20000000000000003e-4Initial program 100.0%
Taylor expanded in x around inf
Simplified61.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6443.5%
Simplified43.5%
if 1.20000000000000003e-4 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified42.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Simplified17.6%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
Final simplification50.2%
(FPCore (x y z)
:precision binary64
(if (<= z -5.6e+63)
(* z (* z (* z -0.16666666666666666)))
(if (<= z 6.6e+32)
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))
(* x (* 0.16666666666666666 (* x x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+63) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 6.6e+32) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = x * (0.16666666666666666 * (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 <= (-5.6d+63)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (z <= 6.6d+32) then
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+63) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 6.6e+32) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.6e+63: tmp = z * (z * (z * -0.16666666666666666)) elif z <= 6.6e+32: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.6e+63) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (z <= 6.6e+32) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.6e+63) tmp = z * (z * (z * -0.16666666666666666)); elseif (z <= 6.6e+32) tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.6e+63], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+32], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+32}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -5.59999999999999974e63Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6489.1%
Simplified89.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-*.f6480.9%
Simplified80.9%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.9%
Simplified80.9%
if -5.59999999999999974e63 < z < 6.60000000000000039e32Initial program 100.0%
Taylor expanded in x around inf
Simplified64.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6438.6%
Simplified38.6%
if 6.60000000000000039e32 < 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6414.0%
Simplified14.0%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.9%
Simplified47.9%
(FPCore (x y z)
:precision binary64
(if (<= z -5.6e+63)
(* z (* z (* z -0.16666666666666666)))
(if (<= z 3.8e+32)
(+ 1.0 (* x (* x (+ 0.5 (* x 0.16666666666666666)))))
(* x (* 0.16666666666666666 (* x x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+63) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 3.8e+32) {
tmp = 1.0 + (x * (x * (0.5 + (x * 0.16666666666666666))));
} else {
tmp = x * (0.16666666666666666 * (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 <= (-5.6d+63)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (z <= 3.8d+32) then
tmp = 1.0d0 + (x * (x * (0.5d0 + (x * 0.16666666666666666d0))))
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.6e+63) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 3.8e+32) {
tmp = 1.0 + (x * (x * (0.5 + (x * 0.16666666666666666))));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.6e+63: tmp = z * (z * (z * -0.16666666666666666)) elif z <= 3.8e+32: tmp = 1.0 + (x * (x * (0.5 + (x * 0.16666666666666666)))) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.6e+63) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (z <= 3.8e+32) tmp = Float64(1.0 + Float64(x * Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666))))); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.6e+63) tmp = z * (z * (z * -0.16666666666666666)); elseif (z <= 3.8e+32) tmp = 1.0 + (x * (x * (0.5 + (x * 0.16666666666666666)))); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.6e+63], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+32], N[(1.0 + N[(x * N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+32}:\\
\;\;\;\;1 + x \cdot \left(x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -5.59999999999999974e63Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6489.1%
Simplified89.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-*.f6480.9%
Simplified80.9%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.9%
Simplified80.9%
if -5.59999999999999974e63 < z < 3.8000000000000003e32Initial program 100.0%
Taylor expanded in x around inf
Simplified64.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6438.6%
Simplified38.6%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
associate-*l*N/A
lft-mult-inverseN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6438.5%
Simplified38.5%
if 3.8000000000000003e32 < 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6414.0%
Simplified14.0%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.9%
Simplified47.9%
(FPCore (x y z)
:precision binary64
(if (<= z -5.1e+63)
(* z (* z (* z -0.16666666666666666)))
(if (<= z 0.000365)
(+ 1.0 (* x (+ 1.0 (* x 0.5))))
(* x (* 0.16666666666666666 (* x x))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.1e+63) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 0.000365) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = x * (0.16666666666666666 * (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 <= (-5.1d+63)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (z <= 0.000365d0) then
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.1e+63) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (z <= 0.000365) {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.1e+63: tmp = z * (z * (z * -0.16666666666666666)) elif z <= 0.000365: tmp = 1.0 + (x * (1.0 + (x * 0.5))) else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.1e+63) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (z <= 0.000365) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.1e+63) tmp = z * (z * (z * -0.16666666666666666)); elseif (z <= 0.000365) tmp = 1.0 + (x * (1.0 + (x * 0.5))); else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.1e+63], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.000365], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;z \leq 0.000365:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -5.0999999999999998e63Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6489.1%
Simplified89.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-*.f6480.9%
Simplified80.9%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.9%
Simplified80.9%
if -5.0999999999999998e63 < z < 3.6499999999999998e-4Initial program 100.0%
Taylor expanded in x around inf
Simplified63.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6436.2%
Simplified36.2%
if 3.6499999999999998e-4 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified42.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6417.6%
Simplified17.6%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
(FPCore (x y z) :precision binary64 (if (<= x -5.4e-6) (* z (* z (* z -0.16666666666666666))) (if (<= x 5.4e+51) (- 1.0 z) (* x (* 0.16666666666666666 (* x x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.4e-6) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (x <= 5.4e+51) {
tmp = 1.0 - z;
} else {
tmp = x * (0.16666666666666666 * (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 <= (-5.4d-6)) then
tmp = z * (z * (z * (-0.16666666666666666d0)))
else if (x <= 5.4d+51) then
tmp = 1.0d0 - z
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.4e-6) {
tmp = z * (z * (z * -0.16666666666666666));
} else if (x <= 5.4e+51) {
tmp = 1.0 - z;
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.4e-6: tmp = z * (z * (z * -0.16666666666666666)) elif x <= 5.4e+51: tmp = 1.0 - z else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.4e-6) tmp = Float64(z * Float64(z * Float64(z * -0.16666666666666666))); elseif (x <= 5.4e+51) tmp = Float64(1.0 - z); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5.4e-6) tmp = z * (z * (z * -0.16666666666666666)); elseif (x <= 5.4e+51) tmp = 1.0 - z; else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.4e-6], N[(z * N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e+51], N[(1.0 - z), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{-6}:\\
\;\;\;\;z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right)\right)\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+51}:\\
\;\;\;\;1 - z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if x < -5.39999999999999997e-6Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6432.8%
Simplified32.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-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6414.0%
Simplified14.0%
Taylor expanded in z around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6429.6%
Simplified29.6%
if -5.39999999999999997e-6 < x < 5.39999999999999983e51Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6464.4%
Simplified64.4%
Taylor expanded in z around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6424.2%
Simplified24.2%
if 5.39999999999999983e51 < x Initial program 100.0%
Taylor expanded in x around inf
Simplified98.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-*.f6479.2%
Simplified79.2%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6479.2%
Simplified79.2%
(FPCore (x y z) :precision binary64 (if (<= z -2.8e+130) (* (* z z) 0.5) (* x (* 0.16666666666666666 (* x x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.8e+130) {
tmp = (z * z) * 0.5;
} else {
tmp = x * (0.16666666666666666 * (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 <= (-2.8d+130)) then
tmp = (z * z) * 0.5d0
else
tmp = x * (0.16666666666666666d0 * (x * x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.8e+130) {
tmp = (z * z) * 0.5;
} else {
tmp = x * (0.16666666666666666 * (x * x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.8e+130: tmp = (z * z) * 0.5 else: tmp = x * (0.16666666666666666 * (x * x)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.8e+130) tmp = Float64(Float64(z * z) * 0.5); else tmp = Float64(x * Float64(0.16666666666666666 * Float64(x * x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.8e+130) tmp = (z * z) * 0.5; else tmp = x * (0.16666666666666666 * (x * x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.8e+130], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], N[(x * N[(0.16666666666666666 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+130}:\\
\;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(0.16666666666666666 \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if z < -2.7999999999999999e130Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6497.1%
Simplified97.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-*.f6488.9%
Simplified88.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6488.9%
Simplified88.9%
if -2.7999999999999999e130 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified58.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-*.f6432.9%
Simplified32.9%
Taylor expanded in x around inf
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6426.9%
Simplified26.9%
Final simplification35.2%
(FPCore (x y z) :precision binary64 (if (<= z -0.245) (* (* z z) 0.5) (+ x 1.0)))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.245) {
tmp = (z * z) * 0.5;
} else {
tmp = x + 1.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-0.245d0)) then
tmp = (z * z) * 0.5d0
else
tmp = x + 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.245) {
tmp = (z * z) * 0.5;
} else {
tmp = x + 1.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.245: tmp = (z * z) * 0.5 else: tmp = x + 1.0 return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.245) tmp = Float64(Float64(z * z) * 0.5); else tmp = Float64(x + 1.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.245) tmp = (z * z) * 0.5; else tmp = x + 1.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.245], N[(N[(z * z), $MachinePrecision] * 0.5), $MachinePrecision], N[(x + 1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.245:\\
\;\;\;\;\left(z \cdot z\right) \cdot 0.5\\
\mathbf{else}:\\
\;\;\;\;x + 1\\
\end{array}
\end{array}
if z < -0.245Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6488.1%
Simplified88.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-*.f6447.6%
Simplified47.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.6%
Simplified47.6%
if -0.245 < z Initial program 100.0%
Taylor expanded in x around inf
Simplified59.0%
Taylor expanded in x around 0
+-lowering-+.f6417.7%
Simplified17.7%
Final simplification25.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
Simplified54.0%
Taylor expanded in x around 0
+-lowering-+.f6414.0%
Simplified14.0%
Final simplification14.0%
(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
Simplified54.0%
Taylor expanded in x around 0
Simplified13.6%
(FPCore (x y z) :precision binary64 (exp (+ (- x z) (* (log y) y))))
double code(double x, double y, double z) {
return exp(((x - z) + (log(y) * y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x - z) + (log(y) * y)))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x - z) + (Math.log(y) * y)));
}
def code(x, y, z): return math.exp(((x - z) + (math.log(y) * y)))
function code(x, y, z) return exp(Float64(Float64(x - z) + Float64(log(y) * y))) end
function tmp = code(x, y, z) tmp = exp(((x - z) + (log(y) * y))); end
code[x_, y_, z_] := N[Exp[N[(N[(x - z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x - z\right) + \log y \cdot y}
\end{array}
herbie shell --seed 2024152
(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)))