
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
(FPCore (x y z) :precision binary64 (exp (- (+ x (* y (log y))) z)))
double code(double x, double y, double z) {
return exp(((x + (y * log(y))) - z));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = exp(((x + (y * log(y))) - z))
end function
public static double code(double x, double y, double z) {
return Math.exp(((x + (y * Math.log(y))) - z));
}
def code(x, y, z): return math.exp(((x + (y * math.log(y))) - z))
function code(x, y, z) return exp(Float64(Float64(x + Float64(y * log(y))) - z)) end
function tmp = code(x, y, z) tmp = exp(((x + (y * log(y))) - z)); end
code[x_, y_, z_] := N[Exp[N[(N[(x + N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x + y \cdot \log y\right) - z}
\end{array}
Initial program 100.0%
(FPCore (x y z)
:precision binary64
(if (<= x -7e+47)
(exp x)
(if (<= x -2.6e-139)
(pow y y)
(if (<= x 6.2e-35) (exp (- z)) (* (exp x) (pow y y))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -7e+47) {
tmp = exp(x);
} else if (x <= -2.6e-139) {
tmp = pow(y, y);
} else if (x <= 6.2e-35) {
tmp = exp(-z);
} else {
tmp = exp(x) * 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 (x <= (-7d+47)) then
tmp = exp(x)
else if (x <= (-2.6d-139)) then
tmp = y ** y
else if (x <= 6.2d-35) then
tmp = exp(-z)
else
tmp = exp(x) * (y ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -7e+47) {
tmp = Math.exp(x);
} else if (x <= -2.6e-139) {
tmp = Math.pow(y, y);
} else if (x <= 6.2e-35) {
tmp = Math.exp(-z);
} else {
tmp = Math.exp(x) * Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -7e+47: tmp = math.exp(x) elif x <= -2.6e-139: tmp = math.pow(y, y) elif x <= 6.2e-35: tmp = math.exp(-z) else: tmp = math.exp(x) * math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -7e+47) tmp = exp(x); elseif (x <= -2.6e-139) tmp = y ^ y; elseif (x <= 6.2e-35) tmp = exp(Float64(-z)); else tmp = Float64(exp(x) * (y ^ y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -7e+47) tmp = exp(x); elseif (x <= -2.6e-139) tmp = y ^ y; elseif (x <= 6.2e-35) tmp = exp(-z); else tmp = exp(x) * (y ^ y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -7e+47], N[Exp[x], $MachinePrecision], If[LessEqual[x, -2.6e-139], N[Power[y, y], $MachinePrecision], If[LessEqual[x, 6.2e-35], N[Exp[(-z)], $MachinePrecision], N[(N[Exp[x], $MachinePrecision] * N[Power[y, y], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+47}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-139}:\\
\;\;\;\;{y}^{y}\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-35}:\\
\;\;\;\;e^{-z}\\
\mathbf{else}:\\
\;\;\;\;e^{x} \cdot {y}^{y}\\
\end{array}
\end{array}
if x < -7.00000000000000031e47Initial program 100.0%
Taylor expanded in x around inf 82.8%
if -7.00000000000000031e47 < x < -2.5999999999999998e-139Initial program 100.0%
Taylor expanded in x around 0 97.6%
Taylor expanded in z around 0 71.5%
if -2.5999999999999998e-139 < x < 6.20000000000000024e-35Initial program 100.0%
Taylor expanded in z around inf 76.0%
neg-mul-176.0%
Simplified76.0%
if 6.20000000000000024e-35 < x Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum96.0%
*-commutative96.0%
exp-to-pow96.0%
Simplified96.0%
Taylor expanded in z around 0 94.8%
Final simplification82.5%
(FPCore (x y z)
:precision binary64
(if (<= x -2.9e+127)
(exp x)
(if (<= x 12000000000000.0)
(exp (- (* y (log y)) z))
(* (pow y y) (exp (- x z))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.9e+127) {
tmp = exp(x);
} else if (x <= 12000000000000.0) {
tmp = exp(((y * log(y)) - z));
} else {
tmp = pow(y, y) * exp((x - z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2.9d+127)) then
tmp = exp(x)
else if (x <= 12000000000000.0d0) then
tmp = exp(((y * log(y)) - z))
else
tmp = (y ** y) * exp((x - z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2.9e+127) {
tmp = Math.exp(x);
} else if (x <= 12000000000000.0) {
tmp = Math.exp(((y * Math.log(y)) - z));
} else {
tmp = Math.pow(y, y) * Math.exp((x - z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.9e+127: tmp = math.exp(x) elif x <= 12000000000000.0: tmp = math.exp(((y * math.log(y)) - z)) else: tmp = math.pow(y, y) * math.exp((x - z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.9e+127) tmp = exp(x); elseif (x <= 12000000000000.0) tmp = exp(Float64(Float64(y * log(y)) - z)); else tmp = Float64((y ^ y) * exp(Float64(x - z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2.9e+127) tmp = exp(x); elseif (x <= 12000000000000.0) tmp = exp(((y * log(y)) - z)); else tmp = (y ^ y) * exp((x - z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.9e+127], N[Exp[x], $MachinePrecision], If[LessEqual[x, 12000000000000.0], N[Exp[N[(N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision], N[(N[Power[y, y], $MachinePrecision] * N[Exp[N[(x - z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+127}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq 12000000000000:\\
\;\;\;\;e^{y \cdot \log y - z}\\
\mathbf{else}:\\
\;\;\;\;{y}^{y} \cdot e^{x - z}\\
\end{array}
\end{array}
if x < -2.9000000000000002e127Initial program 100.0%
Taylor expanded in x around inf 94.8%
if -2.9000000000000002e127 < x < 1.2e13Initial program 100.0%
Taylor expanded in x around 0 93.3%
if 1.2e13 < x Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum98.4%
*-commutative98.4%
exp-to-pow98.4%
Simplified98.4%
(FPCore (x y z) :precision binary64 (if (<= x -6.8e+127) (exp x) (if (<= x 2.8e-22) (exp (- (* y (log y)) z)) (* (exp x) (pow y y)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6.8e+127) {
tmp = exp(x);
} else if (x <= 2.8e-22) {
tmp = exp(((y * log(y)) - z));
} else {
tmp = exp(x) * 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 (x <= (-6.8d+127)) then
tmp = exp(x)
else if (x <= 2.8d-22) then
tmp = exp(((y * log(y)) - z))
else
tmp = exp(x) * (y ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6.8e+127) {
tmp = Math.exp(x);
} else if (x <= 2.8e-22) {
tmp = Math.exp(((y * Math.log(y)) - z));
} else {
tmp = Math.exp(x) * Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6.8e+127: tmp = math.exp(x) elif x <= 2.8e-22: tmp = math.exp(((y * math.log(y)) - z)) else: tmp = math.exp(x) * math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6.8e+127) tmp = exp(x); elseif (x <= 2.8e-22) tmp = exp(Float64(Float64(y * log(y)) - z)); else tmp = Float64(exp(x) * (y ^ y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6.8e+127) tmp = exp(x); elseif (x <= 2.8e-22) tmp = exp(((y * log(y)) - z)); else tmp = exp(x) * (y ^ y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6.8e+127], N[Exp[x], $MachinePrecision], If[LessEqual[x, 2.8e-22], N[Exp[N[(N[(y * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]], $MachinePrecision], N[(N[Exp[x], $MachinePrecision] * N[Power[y, y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+127}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;e^{y \cdot \log y - z}\\
\mathbf{else}:\\
\;\;\;\;e^{x} \cdot {y}^{y}\\
\end{array}
\end{array}
if x < -6.79999999999999955e127Initial program 100.0%
Taylor expanded in x around inf 94.8%
if -6.79999999999999955e127 < x < 2.79999999999999995e-22Initial program 100.0%
Taylor expanded in x around 0 93.4%
if 2.79999999999999995e-22 < x Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum97.2%
*-commutative97.2%
exp-to-pow97.2%
Simplified97.2%
Taylor expanded in z around 0 97.2%
Final simplification94.6%
(FPCore (x y z) :precision binary64 (if (<= x -1.2e+88) (exp x) (if (<= x 2.8e-22) (/ (pow y y) (exp z)) (* (exp x) (pow y y)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.2e+88) {
tmp = exp(x);
} else if (x <= 2.8e-22) {
tmp = pow(y, y) / exp(z);
} else {
tmp = exp(x) * 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 (x <= (-1.2d+88)) then
tmp = exp(x)
else if (x <= 2.8d-22) then
tmp = (y ** y) / exp(z)
else
tmp = exp(x) * (y ** y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.2e+88) {
tmp = Math.exp(x);
} else if (x <= 2.8e-22) {
tmp = Math.pow(y, y) / Math.exp(z);
} else {
tmp = Math.exp(x) * Math.pow(y, y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.2e+88: tmp = math.exp(x) elif x <= 2.8e-22: tmp = math.pow(y, y) / math.exp(z) else: tmp = math.exp(x) * math.pow(y, y) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.2e+88) tmp = exp(x); elseif (x <= 2.8e-22) tmp = Float64((y ^ y) / exp(z)); else tmp = Float64(exp(x) * (y ^ y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.2e+88) tmp = exp(x); elseif (x <= 2.8e-22) tmp = (y ^ y) / exp(z); else tmp = exp(x) * (y ^ y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.2e+88], N[Exp[x], $MachinePrecision], If[LessEqual[x, 2.8e-22], N[(N[Power[y, y], $MachinePrecision] / N[Exp[z], $MachinePrecision]), $MachinePrecision], N[(N[Exp[x], $MachinePrecision] * N[Power[y, y], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+88}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{{y}^{y}}{e^{z}}\\
\mathbf{else}:\\
\;\;\;\;e^{x} \cdot {y}^{y}\\
\end{array}
\end{array}
if x < -1.2e88Initial program 100.0%
Taylor expanded in x around inf 90.0%
if -1.2e88 < x < 2.79999999999999995e-22Initial program 100.0%
Taylor expanded in x around 0 95.0%
exp-diff75.9%
*-commutative75.9%
exp-to-pow75.9%
Simplified75.9%
if 2.79999999999999995e-22 < x Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
exp-sum97.2%
*-commutative97.2%
exp-to-pow97.2%
Simplified97.2%
Taylor expanded in z around 0 97.2%
Final simplification84.5%
(FPCore (x y z) :precision binary64 (if (<= x -1.65e+48) (exp x) (if (<= x -2.3e-139) (pow y y) (if (<= x 29.0) (exp (- z)) (exp x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.65e+48) {
tmp = exp(x);
} else if (x <= -2.3e-139) {
tmp = pow(y, y);
} else if (x <= 29.0) {
tmp = exp(-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.65d+48)) then
tmp = exp(x)
else if (x <= (-2.3d-139)) then
tmp = y ** y
else if (x <= 29.0d0) then
tmp = exp(-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.65e+48) {
tmp = Math.exp(x);
} else if (x <= -2.3e-139) {
tmp = Math.pow(y, y);
} else if (x <= 29.0) {
tmp = Math.exp(-z);
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.65e+48: tmp = math.exp(x) elif x <= -2.3e-139: tmp = math.pow(y, y) elif x <= 29.0: tmp = math.exp(-z) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.65e+48) tmp = exp(x); elseif (x <= -2.3e-139) tmp = y ^ y; elseif (x <= 29.0) tmp = exp(Float64(-z)); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.65e+48) tmp = exp(x); elseif (x <= -2.3e-139) tmp = y ^ y; elseif (x <= 29.0) tmp = exp(-z); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.65e+48], N[Exp[x], $MachinePrecision], If[LessEqual[x, -2.3e-139], N[Power[y, y], $MachinePrecision], If[LessEqual[x, 29.0], N[Exp[(-z)], $MachinePrecision], N[Exp[x], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+48}:\\
\;\;\;\;e^{x}\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-139}:\\
\;\;\;\;{y}^{y}\\
\mathbf{elif}\;x \leq 29:\\
\;\;\;\;e^{-z}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if x < -1.65000000000000011e48 or 29 < x Initial program 100.0%
Taylor expanded in x around inf 90.1%
if -1.65000000000000011e48 < x < -2.30000000000000012e-139Initial program 100.0%
Taylor expanded in x around 0 97.6%
Taylor expanded in z around 0 71.5%
if -2.30000000000000012e-139 < x < 29Initial program 100.0%
Taylor expanded in z around inf 75.5%
neg-mul-175.5%
Simplified75.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -1.05e+48) (not (<= x 500.0))) (exp x) (exp (- z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.05e+48) || !(x <= 500.0)) {
tmp = exp(x);
} else {
tmp = exp(-z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1.05d+48)) .or. (.not. (x <= 500.0d0))) then
tmp = exp(x)
else
tmp = exp(-z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.05e+48) || !(x <= 500.0)) {
tmp = Math.exp(x);
} else {
tmp = Math.exp(-z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.05e+48) or not (x <= 500.0): tmp = math.exp(x) else: tmp = math.exp(-z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.05e+48) || !(x <= 500.0)) tmp = exp(x); else tmp = exp(Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.05e+48) || ~((x <= 500.0))) tmp = exp(x); else tmp = exp(-z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.05e+48], N[Not[LessEqual[x, 500.0]], $MachinePrecision]], N[Exp[x], $MachinePrecision], N[Exp[(-z)], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+48} \lor \neg \left(x \leq 500\right):\\
\;\;\;\;e^{x}\\
\mathbf{else}:\\
\;\;\;\;e^{-z}\\
\end{array}
\end{array}
if x < -1.0499999999999999e48 or 500 < x Initial program 100.0%
Taylor expanded in x around inf 90.1%
if -1.0499999999999999e48 < x < 500Initial program 100.0%
Taylor expanded in z around inf 66.9%
neg-mul-166.9%
Simplified66.9%
Final simplification78.6%
(FPCore (x y z) :precision binary64 (if (<= z -1.2e+103) (+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0))) (exp x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.2e+103) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} 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 (z <= (-1.2d+103)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else
tmp = exp(x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.2e+103) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.2e+103: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) else: tmp = math.exp(x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.2e+103) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.2e+103) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.2e+103], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[x], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+103}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if z < -1.1999999999999999e103Initial program 100.0%
Taylor expanded in z around inf 95.0%
neg-mul-195.0%
Simplified95.0%
Taylor expanded in z around 0 95.0%
Taylor expanded in z around inf 95.0%
*-commutative95.0%
Simplified95.0%
if -1.1999999999999999e103 < z Initial program 100.0%
Taylor expanded in x around inf 59.2%
Final simplification64.7%
(FPCore (x y z)
:precision binary64
(if (<= z -1.9e+75)
(+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0)))
(if (<= z 7e+84)
(+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))
(+ 1.0 (* z (+ 1.0 (* z (+ 0.5 (* z 0.16666666666666666)))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.9e+75) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if (z <= 7e+84) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = 1.0 + (z * (1.0 + (z * (0.5 + (z * 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 (z <= (-1.9d+75)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else if (z <= 7d+84) then
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
else
tmp = 1.0d0 + (z * (1.0d0 + (z * (0.5d0 + (z * 0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.9e+75) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else if (z <= 7e+84) {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
} else {
tmp = 1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.9e+75: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) elif z <= 7e+84: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) else: tmp = 1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666))))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.9e+75) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); elseif (z <= 7e+84) tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); else tmp = Float64(1.0 + Float64(z * Float64(1.0 + Float64(z * Float64(0.5 + Float64(z * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.9e+75) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); elseif (z <= 7e+84) tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); else tmp = 1.0 + (z * (1.0 + (z * (0.5 + (z * 0.16666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.9e+75], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+84], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(z * N[(1.0 + N[(z * N[(0.5 + N[(z * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+84}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + z \cdot \left(1 + z \cdot \left(0.5 + z \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if z < -1.9000000000000001e75Initial program 100.0%
Taylor expanded in z around inf 89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in z around 0 78.2%
Taylor expanded in z around inf 78.2%
*-commutative78.2%
Simplified78.2%
if -1.9000000000000001e75 < z < 6.9999999999999998e84Initial program 100.0%
Taylor expanded in x around inf 68.6%
Taylor expanded in x around 0 34.7%
if 6.9999999999999998e84 < z Initial program 100.0%
Taylor expanded in z around inf 78.3%
neg-mul-178.3%
Simplified78.3%
add-sqr-sqrt0.0%
sqrt-unprod23.2%
sqr-neg23.2%
sqrt-unprod23.2%
add-sqr-sqrt23.2%
expm1-log1p-u23.2%
expm1-undefine23.2%
Applied egg-rr23.2%
log1p-undefine23.2%
rem-exp-log23.2%
associate-+r-23.2%
expm1-undefine23.2%
rem-exp-log23.2%
log1p-define23.2%
log1p-expm123.2%
Simplified23.2%
Taylor expanded in z around 0 19.6%
*-commutative19.6%
Simplified19.6%
Final simplification39.9%
(FPCore (x y z) :precision binary64 (if (<= z -1.25e+75) (+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0))) (+ 1.0 (* x (+ 1.0 (* x (+ 0.5 (* x 0.16666666666666666))))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+75) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.25d+75)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * (0.5d0 + (x * 0.16666666666666666d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.25e+75) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666)))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.25e+75: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.25e+75) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(0.5 + Float64(x * 0.16666666666666666)))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.25e+75) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * (0.5 + (x * 0.16666666666666666))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.25e+75], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(0.5 + N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+75}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if z < -1.2500000000000001e75Initial program 100.0%
Taylor expanded in z around inf 89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in z around 0 78.2%
Taylor expanded in z around inf 78.2%
*-commutative78.2%
Simplified78.2%
if -1.2500000000000001e75 < z Initial program 100.0%
Taylor expanded in x around inf 59.8%
Taylor expanded in x around 0 28.4%
Final simplification37.8%
(FPCore (x y z) :precision binary64 (if (<= z -1.9e+75) (+ 1.0 (* z (+ (* z (* z -0.16666666666666666)) -1.0))) (+ 1.0 (* x (+ 1.0 (* x (* x 0.16666666666666666)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.9e+75) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (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 (z <= (-1.9d+75)) then
tmp = 1.0d0 + (z * ((z * (z * (-0.16666666666666666d0))) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * (x * 0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.9e+75) {
tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (x * 0.16666666666666666))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.9e+75: tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * (x * 0.16666666666666666)))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.9e+75) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * Float64(z * -0.16666666666666666)) + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(x * 0.16666666666666666))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.9e+75) tmp = 1.0 + (z * ((z * (z * -0.16666666666666666)) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * (x * 0.16666666666666666)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.9e+75], N[(1.0 + N[(z * N[(N[(z * N[(z * -0.16666666666666666), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;1 + z \cdot \left(z \cdot \left(z \cdot -0.16666666666666666\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(x \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if z < -1.9000000000000001e75Initial program 100.0%
Taylor expanded in z around inf 89.7%
neg-mul-189.7%
Simplified89.7%
Taylor expanded in z around 0 78.2%
Taylor expanded in z around inf 78.2%
*-commutative78.2%
Simplified78.2%
if -1.9000000000000001e75 < z Initial program 100.0%
Taylor expanded in x around inf 59.8%
Taylor expanded in x around 0 28.4%
Taylor expanded in x around inf 28.4%
*-commutative28.4%
Simplified28.4%
Final simplification37.8%
(FPCore (x y z) :precision binary64 (if (<= x 3.3e+98) (+ 1.0 (* z (+ (* z 0.5) -1.0))) (+ 1.0 (* x (+ 1.0 (* x (* x 0.16666666666666666)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.3e+98) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (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 <= 3.3d+98) then
tmp = 1.0d0 + (z * ((z * 0.5d0) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * (x * 0.16666666666666666d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3.3e+98) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * (x * 0.16666666666666666))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.3e+98: tmp = 1.0 + (z * ((z * 0.5) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * (x * 0.16666666666666666)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.3e+98) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * 0.5) + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * Float64(x * 0.16666666666666666))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3.3e+98) tmp = 1.0 + (z * ((z * 0.5) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * (x * 0.16666666666666666)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.3e+98], N[(1.0 + N[(z * N[(N[(z * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * N[(x * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.3 \cdot 10^{+98}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot \left(x \cdot 0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if x < 3.30000000000000028e98Initial program 100.0%
Taylor expanded in z around inf 57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in z around 0 25.7%
if 3.30000000000000028e98 < x Initial program 100.0%
Taylor expanded in x around inf 97.7%
Taylor expanded in x around 0 91.4%
Taylor expanded in x around inf 91.4%
*-commutative91.4%
Simplified91.4%
Final simplification36.5%
(FPCore (x y z) :precision binary64 (if (<= x 7.8e+96) (+ 1.0 (* z (+ (* z 0.5) -1.0))) (+ 1.0 (* x (+ 1.0 (* x 0.5))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 7.8e+96) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 7.8d+96) then
tmp = 1.0d0 + (z * ((z * 0.5d0) + (-1.0d0)))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 7.8e+96) {
tmp = 1.0 + (z * ((z * 0.5) + -1.0));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 7.8e+96: tmp = 1.0 + (z * ((z * 0.5) + -1.0)) else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 7.8e+96) tmp = Float64(1.0 + Float64(z * Float64(Float64(z * 0.5) + -1.0))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 7.8e+96) tmp = 1.0 + (z * ((z * 0.5) + -1.0)); else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 7.8e+96], N[(1.0 + N[(z * N[(N[(z * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.8 \cdot 10^{+96}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < 7.8e96Initial program 100.0%
Taylor expanded in z around inf 57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in z around 0 25.7%
if 7.8e96 < x Initial program 100.0%
Taylor expanded in x around inf 97.7%
Taylor expanded in x around 0 64.7%
Final simplification32.1%
(FPCore (x y z) :precision binary64 (if (<= x 2.65e+98) (+ 1.0 (* z (* z 0.5))) (+ 1.0 (* x (+ 1.0 (* x 0.5))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.65e+98) {
tmp = 1.0 + (z * (z * 0.5));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= 2.65d+98) then
tmp = 1.0d0 + (z * (z * 0.5d0))
else
tmp = 1.0d0 + (x * (1.0d0 + (x * 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.65e+98) {
tmp = 1.0 + (z * (z * 0.5));
} else {
tmp = 1.0 + (x * (1.0 + (x * 0.5)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.65e+98: tmp = 1.0 + (z * (z * 0.5)) else: tmp = 1.0 + (x * (1.0 + (x * 0.5))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.65e+98) tmp = Float64(1.0 + Float64(z * Float64(z * 0.5))); else tmp = Float64(1.0 + Float64(x * Float64(1.0 + Float64(x * 0.5)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.65e+98) tmp = 1.0 + (z * (z * 0.5)); else tmp = 1.0 + (x * (1.0 + (x * 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.65e+98], N[(1.0 + N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(x * N[(1.0 + N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.65 \cdot 10^{+98}:\\
\;\;\;\;1 + z \cdot \left(z \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;1 + x \cdot \left(1 + x \cdot 0.5\right)\\
\end{array}
\end{array}
if x < 2.64999999999999999e98Initial program 100.0%
Taylor expanded in z around inf 57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in z around 0 25.7%
Taylor expanded in z around inf 25.5%
*-commutative25.5%
Simplified25.5%
if 2.64999999999999999e98 < x Initial program 100.0%
Taylor expanded in x around inf 97.7%
Taylor expanded in x around 0 64.7%
Final simplification31.9%
(FPCore (x y z) :precision binary64 (+ 1.0 (* z (* z 0.5))))
double code(double x, double y, double z) {
return 1.0 + (z * (z * 0.5));
}
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 * (z * 0.5d0))
end function
public static double code(double x, double y, double z) {
return 1.0 + (z * (z * 0.5));
}
def code(x, y, z): return 1.0 + (z * (z * 0.5))
function code(x, y, z) return Float64(1.0 + Float64(z * Float64(z * 0.5))) end
function tmp = code(x, y, z) tmp = 1.0 + (z * (z * 0.5)); end
code[x_, y_, z_] := N[(1.0 + N[(z * N[(z * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + z \cdot \left(z \cdot 0.5\right)
\end{array}
Initial program 100.0%
Taylor expanded in z around inf 50.9%
neg-mul-150.9%
Simplified50.9%
Taylor expanded in z around 0 23.6%
Taylor expanded in z around inf 23.4%
*-commutative23.4%
Simplified23.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 55.5%
Taylor expanded in x around 0 10.8%
Final simplification10.8%
(FPCore (x y z) :precision binary64 1.0)
double code(double x, double y, double z) {
return 1.0;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0
end function
public static double code(double x, double y, double z) {
return 1.0;
}
def code(x, y, z): return 1.0
function code(x, y, z) return 1.0 end
function tmp = code(x, y, z) tmp = 1.0; end
code[x_, y_, z_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Taylor expanded in x around inf 55.5%
Taylor expanded in x around 0 10.4%
(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 2024163
(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)))