
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
Initial program 99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- t_1 z)))
(if (<= x -1.2e+40)
t_2
(if (<= x 1.2e+72)
(- (log t) (+ y z))
(if (<= x 8.3e+99) t_2 (- t_1 y))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - z;
double tmp;
if (x <= -1.2e+40) {
tmp = t_2;
} else if (x <= 1.2e+72) {
tmp = log(t) - (y + z);
} else if (x <= 8.3e+99) {
tmp = t_2;
} else {
tmp = t_1 - y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - z
if (x <= (-1.2d+40)) then
tmp = t_2
else if (x <= 1.2d+72) then
tmp = log(t) - (y + z)
else if (x <= 8.3d+99) then
tmp = t_2
else
tmp = t_1 - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * Math.log(y);
double t_2 = t_1 - z;
double tmp;
if (x <= -1.2e+40) {
tmp = t_2;
} else if (x <= 1.2e+72) {
tmp = Math.log(t) - (y + z);
} else if (x <= 8.3e+99) {
tmp = t_2;
} else {
tmp = t_1 - y;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - z tmp = 0 if x <= -1.2e+40: tmp = t_2 elif x <= 1.2e+72: tmp = math.log(t) - (y + z) elif x <= 8.3e+99: tmp = t_2 else: tmp = t_1 - y return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - z) tmp = 0.0 if (x <= -1.2e+40) tmp = t_2; elseif (x <= 1.2e+72) tmp = Float64(log(t) - Float64(y + z)); elseif (x <= 8.3e+99) tmp = t_2; else tmp = Float64(t_1 - y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - z; tmp = 0.0; if (x <= -1.2e+40) tmp = t_2; elseif (x <= 1.2e+72) tmp = log(t) - (y + z); elseif (x <= 8.3e+99) tmp = t_2; else tmp = t_1 - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - z), $MachinePrecision]}, If[LessEqual[x, -1.2e+40], t$95$2, If[LessEqual[x, 1.2e+72], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.3e+99], t$95$2, N[(t$95$1 - y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - z\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+72}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{elif}\;x \leq 8.3 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 - y\\
\end{array}
\end{array}
if x < -1.2e40 or 1.20000000000000005e72 < x < 8.3e99Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in z around inf 85.5%
if -1.2e40 < x < 1.20000000000000005e72Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 99.0%
if 8.3e99 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 91.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (- z) y)))
(if (<= z -1.2e+15)
t_1
(if (<= z 4.6e+45) (- (log t) y) (if (<= z 3.3e+76) (* x (log y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = -z - y;
double tmp;
if (z <= -1.2e+15) {
tmp = t_1;
} else if (z <= 4.6e+45) {
tmp = log(t) - y;
} else if (z <= 3.3e+76) {
tmp = x * log(y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = -z - y
if (z <= (-1.2d+15)) then
tmp = t_1
else if (z <= 4.6d+45) then
tmp = log(t) - y
else if (z <= 3.3d+76) then
tmp = x * log(y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -z - y;
double tmp;
if (z <= -1.2e+15) {
tmp = t_1;
} else if (z <= 4.6e+45) {
tmp = Math.log(t) - y;
} else if (z <= 3.3e+76) {
tmp = x * Math.log(y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -z - y tmp = 0 if z <= -1.2e+15: tmp = t_1 elif z <= 4.6e+45: tmp = math.log(t) - y elif z <= 3.3e+76: tmp = x * math.log(y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-z) - y) tmp = 0.0 if (z <= -1.2e+15) tmp = t_1; elseif (z <= 4.6e+45) tmp = Float64(log(t) - y); elseif (z <= 3.3e+76) tmp = Float64(x * log(y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -z - y; tmp = 0.0; if (z <= -1.2e+15) tmp = t_1; elseif (z <= 4.6e+45) tmp = log(t) - y; elseif (z <= 3.3e+76) tmp = x * log(y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-z) - y), $MachinePrecision]}, If[LessEqual[z, -1.2e+15], t$95$1, If[LessEqual[z, 4.6e+45], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], If[LessEqual[z, 3.3e+76], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-z\right) - y\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+45}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2e15 or 3.3000000000000001e76 < z Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 81.9%
Taylor expanded in y around -inf 56.8%
associate-*r*56.8%
neg-mul-156.8%
+-commutative56.8%
distribute-lft-in56.8%
*-rgt-identity56.8%
unsub-neg56.8%
distribute-lft-neg-in56.8%
mul-1-neg56.8%
distribute-rgt-neg-out56.8%
remove-double-neg56.8%
Simplified56.8%
Taylor expanded in z around inf 81.8%
neg-mul-181.8%
Simplified81.8%
if -1.2e15 < z < 4.60000000000000025e45Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 98.5%
associate--l+98.5%
div-sub98.5%
Simplified98.5%
Taylor expanded in z around 0 96.4%
Taylor expanded in x around 0 66.5%
neg-mul-166.5%
distribute-rgt-neg-in66.5%
neg-sub066.5%
associate--r-66.5%
metadata-eval66.5%
Simplified66.5%
Taylor expanded in y around 0 67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified67.2%
if 4.60000000000000025e45 < z < 3.3000000000000001e76Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
*-commutative99.7%
add-cube-cbrt98.7%
associate-*l*98.7%
fma-neg98.7%
pow298.7%
associate-+r-98.7%
Applied egg-rr98.7%
Taylor expanded in x around inf 83.3%
*-commutative83.3%
Simplified83.3%
Final simplification73.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -9e+116) (not (<= x 4.65e-60))) (- (* x (log y)) y) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9e+116) || !(x <= 4.65e-60)) {
tmp = (x * log(y)) - y;
} else {
tmp = log(t) - (y + z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-9d+116)) .or. (.not. (x <= 4.65d-60))) then
tmp = (x * log(y)) - y
else
tmp = log(t) - (y + z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9e+116) || !(x <= 4.65e-60)) {
tmp = (x * Math.log(y)) - y;
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -9e+116) or not (x <= 4.65e-60): tmp = (x * math.log(y)) - y else: tmp = math.log(t) - (y + z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -9e+116) || !(x <= 4.65e-60)) tmp = Float64(Float64(x * log(y)) - y); else tmp = Float64(log(t) - Float64(y + z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -9e+116) || ~((x <= 4.65e-60))) tmp = (x * log(y)) - y; else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -9e+116], N[Not[LessEqual[x, 4.65e-60]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+116} \lor \neg \left(x \leq 4.65 \cdot 10^{-60}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -9.00000000000000032e116 or 4.6500000000000001e-60 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 83.6%
if -9.00000000000000032e116 < x < 4.6500000000000001e-60Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in x around 0 94.0%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.42e+88) (not (<= x 1.1e+74))) (* x (log y)) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.42e+88) || !(x <= 1.1e+74)) {
tmp = x * log(y);
} else {
tmp = log(t) - (y + z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-1.42d+88)) .or. (.not. (x <= 1.1d+74))) then
tmp = x * log(y)
else
tmp = log(t) - (y + z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.42e+88) || !(x <= 1.1e+74)) {
tmp = x * Math.log(y);
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.42e+88) or not (x <= 1.1e+74): tmp = x * math.log(y) else: tmp = math.log(t) - (y + z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.42e+88) || !(x <= 1.1e+74)) tmp = Float64(x * log(y)); else tmp = Float64(log(t) - Float64(y + z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.42e+88) || ~((x <= 1.1e+74))) tmp = x * log(y); else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.42e+88], N[Not[LessEqual[x, 1.1e+74]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.42 \cdot 10^{+88} \lor \neg \left(x \leq 1.1 \cdot 10^{+74}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -1.41999999999999996e88 or 1.1000000000000001e74 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
*-commutative99.8%
add-cube-cbrt98.7%
associate-*l*98.7%
fma-neg98.7%
pow298.7%
associate-+r-98.7%
Applied egg-rr98.7%
Taylor expanded in x around inf 64.7%
*-commutative64.7%
Simplified64.7%
if -1.41999999999999996e88 < x < 1.1000000000000001e74Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 97.2%
Final simplification84.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.8e+87) (not (<= x 4.8e+73))) (* x (log y)) (- (- z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.8e+87) || !(x <= 4.8e+73)) {
tmp = x * log(y);
} else {
tmp = -z - y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.8d+87)) .or. (.not. (x <= 4.8d+73))) then
tmp = x * log(y)
else
tmp = -z - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.8e+87) || !(x <= 4.8e+73)) {
tmp = x * Math.log(y);
} else {
tmp = -z - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.8e+87) or not (x <= 4.8e+73): tmp = x * math.log(y) else: tmp = -z - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.8e+87) || !(x <= 4.8e+73)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(-z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.8e+87) || ~((x <= 4.8e+73))) tmp = x * log(y); else tmp = -z - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.8e+87], N[Not[LessEqual[x, 4.8e+73]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-z) - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+87} \lor \neg \left(x \leq 4.8 \cdot 10^{+73}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\end{array}
if x < -2.80000000000000015e87 or 4.80000000000000004e73 < x Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
*-commutative99.8%
add-cube-cbrt98.7%
associate-*l*98.7%
fma-neg98.7%
pow298.7%
associate-+r-98.7%
Applied egg-rr98.7%
Taylor expanded in x around inf 64.7%
*-commutative64.7%
Simplified64.7%
if -2.80000000000000015e87 < x < 4.80000000000000004e73Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 97.2%
Taylor expanded in y around -inf 83.0%
associate-*r*83.0%
neg-mul-183.0%
+-commutative83.0%
distribute-lft-in83.0%
*-rgt-identity83.0%
unsub-neg83.0%
distribute-lft-neg-in83.0%
mul-1-neg83.0%
distribute-rgt-neg-out83.0%
remove-double-neg83.0%
Simplified83.0%
Taylor expanded in z around inf 71.6%
neg-mul-171.6%
Simplified71.6%
Final simplification69.0%
(FPCore (x y z t) :precision binary64 (if (<= y 1.25e-7) (- (log t) z) (- (- z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.25e-7) {
tmp = log(t) - z;
} else {
tmp = -z - y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 1.25d-7) then
tmp = log(t) - z
else
tmp = -z - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.25e-7) {
tmp = Math.log(t) - z;
} else {
tmp = -z - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 1.25e-7: tmp = math.log(t) - z else: tmp = -z - y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 1.25e-7) tmp = Float64(log(t) - z); else tmp = Float64(Float64(-z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 1.25e-7) tmp = log(t) - z; else tmp = -z - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.25e-7], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[((-z) - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.25 \cdot 10^{-7}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\end{array}
if y < 1.24999999999999994e-7Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in x around 0 68.2%
Taylor expanded in y around 0 68.1%
if 1.24999999999999994e-7 < y Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 80.6%
Taylor expanded in y around -inf 80.5%
associate-*r*80.5%
neg-mul-180.5%
+-commutative80.5%
distribute-lft-in80.5%
*-rgt-identity80.5%
unsub-neg80.5%
distribute-lft-neg-in80.5%
mul-1-neg80.5%
distribute-rgt-neg-out80.5%
remove-double-neg80.5%
Simplified80.5%
Taylor expanded in z around inf 78.8%
neg-mul-178.8%
Simplified78.8%
(FPCore (x y z t) :precision binary64 (if (<= y 230000000.0) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 230000000.0) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 230000000.0d0) then
tmp = -z
else
tmp = -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 230000000.0) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 230000000.0: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 230000000.0) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 230000000.0) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 230000000.0], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 230000000:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 2.3e8Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in z around inf 40.7%
mul-1-neg40.7%
Simplified40.7%
if 2.3e8 < y Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in y around inf 67.8%
mul-1-neg67.8%
Simplified67.8%
(FPCore (x y z t) :precision binary64 (- (- z) y))
double code(double x, double y, double z, double t) {
return -z - y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -z - y
end function
public static double code(double x, double y, double z, double t) {
return -z - y;
}
def code(x, y, z, t): return -z - y
function code(x, y, z, t) return Float64(Float64(-z) - y) end
function tmp = code(x, y, z, t) tmp = -z - y; end
code[x_, y_, z_, t_] := N[((-z) - y), $MachinePrecision]
\begin{array}{l}
\\
\left(-z\right) - y
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in x around 0 73.9%
Taylor expanded in y around -inf 62.6%
associate-*r*62.6%
neg-mul-162.6%
+-commutative62.6%
distribute-lft-in62.6%
*-rgt-identity62.6%
unsub-neg62.6%
distribute-lft-neg-in62.6%
mul-1-neg62.6%
distribute-rgt-neg-out62.6%
remove-double-neg62.6%
Simplified62.6%
Taylor expanded in z around inf 58.1%
neg-mul-158.1%
Simplified58.1%
(FPCore (x y z t) :precision binary64 (- y))
double code(double x, double y, double z, double t) {
return -y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -y
end function
public static double code(double x, double y, double z, double t) {
return -y;
}
def code(x, y, z, t): return -y
function code(x, y, z, t) return Float64(-y) end
function tmp = code(x, y, z, t) tmp = -y; end
code[x_, y_, z_, t_] := (-y)
\begin{array}{l}
\\
-y
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 31.3%
mul-1-neg31.3%
Simplified31.3%
(FPCore (x y z t) :precision binary64 z)
double code(double x, double y, double z, double t) {
return z;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = z
end function
public static double code(double x, double y, double z, double t) {
return z;
}
def code(x, y, z, t): return z
function code(x, y, z, t) return z end
function tmp = code(x, y, z, t) tmp = z; end
code[x_, y_, z_, t_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 82.1%
associate--l+82.1%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in y around inf 72.0%
Simplified62.1%
Taylor expanded in z around inf 17.8%
associate-*r/17.8%
neg-mul-117.8%
Simplified17.8%
associate-*r/25.8%
Applied egg-rr25.8%
associate-/l*17.8%
add-sqr-sqrt9.6%
sqrt-unprod7.4%
sqr-neg7.4%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
Applied egg-rr2.2%
associate-*r/2.4%
*-commutative2.4%
associate-*r/2.3%
*-inverses2.3%
*-rgt-identity2.3%
Simplified2.3%
(FPCore (x y z t) :precision binary64 y)
double code(double x, double y, double z, double t) {
return y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y
end function
public static double code(double x, double y, double z, double t) {
return y;
}
def code(x, y, z, t): return y
function code(x, y, z, t) return y end
function tmp = code(x, y, z, t) tmp = y; end
code[x_, y_, z_, t_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 82.1%
associate--l+82.1%
associate-/l*82.1%
Simplified82.1%
clear-num82.1%
inv-pow82.1%
Applied egg-rr82.1%
distribute-lft-in82.1%
associate--r+82.1%
fma-neg82.1%
unpow-182.1%
metadata-eval82.1%
Applied egg-rr82.1%
distribute-lft-in82.1%
+-commutative82.1%
associate-+l-82.1%
fma-undefine82.1%
associate-*r/82.1%
*-rgt-identity82.1%
Simplified82.1%
Taylor expanded in y around inf 22.1%
neg-mul-122.1%
distribute-neg-frac222.1%
Simplified22.1%
clear-num22.0%
un-div-inv22.8%
add-sqr-sqrt10.2%
sqrt-unprod7.6%
sqr-neg7.6%
sqrt-unprod0.9%
add-sqr-sqrt2.1%
Applied egg-rr2.1%
associate-/r/2.1%
*-inverses2.1%
*-lft-identity2.1%
Simplified2.1%
herbie shell --seed 2024105
(FPCore (x y z t)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
:precision binary64
(+ (- (- (* x (log y)) y) z) (log t)))