
(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 8 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%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.55) (not (<= z 2.2e+79))) (- (log t) (+ y z)) (- (+ (log t) (* x (log y))) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.55) || !(z <= 2.2e+79)) {
tmp = log(t) - (y + z);
} else {
tmp = (log(t) + (x * log(y))) - 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 ((z <= (-1.55d0)) .or. (.not. (z <= 2.2d+79))) then
tmp = log(t) - (y + z)
else
tmp = (log(t) + (x * log(y))) - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.55) || !(z <= 2.2e+79)) {
tmp = Math.log(t) - (y + z);
} else {
tmp = (Math.log(t) + (x * Math.log(y))) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.55) or not (z <= 2.2e+79): tmp = math.log(t) - (y + z) else: tmp = (math.log(t) + (x * math.log(y))) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.55) || !(z <= 2.2e+79)) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(Float64(log(t) + Float64(x * log(y))) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.55) || ~((z <= 2.2e+79))) tmp = log(t) - (y + z); else tmp = (log(t) + (x * log(y))) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.55], N[Not[LessEqual[z, 2.2e+79]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \lor \neg \left(z \leq 2.2 \cdot 10^{+79}\right):\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log t + x \cdot \log y\right) - y\\
\end{array}
\end{array}
if z < -1.55000000000000004 or 2.1999999999999999e79 < z Initial program 100.0%
Taylor expanded in x around 0 92.6%
if -1.55000000000000004 < z < 2.1999999999999999e79Initial program 99.8%
Taylor expanded in z around 0 98.4%
Final simplification95.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= z -3.3e+112)
(- z)
(if (<= z -1.6e-97)
(- y)
(if (<= z -1.1e-193)
t_1
(if (<= z -1.9e-244)
(- y)
(if (<= z 1.05e-105) t_1 (if (<= z 4.3e+78) (- y) (- z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (z <= -3.3e+112) {
tmp = -z;
} else if (z <= -1.6e-97) {
tmp = -y;
} else if (z <= -1.1e-193) {
tmp = t_1;
} else if (z <= -1.9e-244) {
tmp = -y;
} else if (z <= 1.05e-105) {
tmp = t_1;
} else if (z <= 4.3e+78) {
tmp = -y;
} else {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (z <= (-3.3d+112)) then
tmp = -z
else if (z <= (-1.6d-97)) then
tmp = -y
else if (z <= (-1.1d-193)) then
tmp = t_1
else if (z <= (-1.9d-244)) then
tmp = -y
else if (z <= 1.05d-105) then
tmp = t_1
else if (z <= 4.3d+78) then
tmp = -y
else
tmp = -z
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 tmp;
if (z <= -3.3e+112) {
tmp = -z;
} else if (z <= -1.6e-97) {
tmp = -y;
} else if (z <= -1.1e-193) {
tmp = t_1;
} else if (z <= -1.9e-244) {
tmp = -y;
} else if (z <= 1.05e-105) {
tmp = t_1;
} else if (z <= 4.3e+78) {
tmp = -y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if z <= -3.3e+112: tmp = -z elif z <= -1.6e-97: tmp = -y elif z <= -1.1e-193: tmp = t_1 elif z <= -1.9e-244: tmp = -y elif z <= 1.05e-105: tmp = t_1 elif z <= 4.3e+78: tmp = -y else: tmp = -z return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (z <= -3.3e+112) tmp = Float64(-z); elseif (z <= -1.6e-97) tmp = Float64(-y); elseif (z <= -1.1e-193) tmp = t_1; elseif (z <= -1.9e-244) tmp = Float64(-y); elseif (z <= 1.05e-105) tmp = t_1; elseif (z <= 4.3e+78) tmp = Float64(-y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (z <= -3.3e+112) tmp = -z; elseif (z <= -1.6e-97) tmp = -y; elseif (z <= -1.1e-193) tmp = t_1; elseif (z <= -1.9e-244) tmp = -y; elseif (z <= 1.05e-105) tmp = t_1; elseif (z <= 4.3e+78) tmp = -y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+112], (-z), If[LessEqual[z, -1.6e-97], (-y), If[LessEqual[z, -1.1e-193], t$95$1, If[LessEqual[z, -1.9e-244], (-y), If[LessEqual[z, 1.05e-105], t$95$1, If[LessEqual[z, 4.3e+78], (-y), (-z)]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+112}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-97}:\\
\;\;\;\;-y\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-193}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-244}:\\
\;\;\;\;-y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+78}:\\
\;\;\;\;-y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if z < -3.2999999999999999e112 or 4.29999999999999981e78 < z Initial program 100.0%
Taylor expanded in z around inf 86.3%
mul-1-neg86.3%
Simplified86.3%
if -3.2999999999999999e112 < z < -1.5999999999999999e-97 or -1.09999999999999988e-193 < z < -1.9e-244 or 1.05e-105 < z < 4.29999999999999981e78Initial program 99.9%
Taylor expanded in y around inf 53.3%
neg-mul-153.3%
Simplified53.3%
if -1.5999999999999999e-97 < z < -1.09999999999999988e-193 or -1.9e-244 < z < 1.05e-105Initial program 99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around inf 55.7%
*-commutative55.7%
Simplified55.7%
Final simplification66.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (log t) y)))
(if (<= z -3.2e+111)
(- z)
(if (<= z -2.3e-246)
t_1
(if (<= z -4.3e-302) (* x (log y)) (if (<= z 3.3e+78) t_1 (- z)))))))
double code(double x, double y, double z, double t) {
double t_1 = log(t) - y;
double tmp;
if (z <= -3.2e+111) {
tmp = -z;
} else if (z <= -2.3e-246) {
tmp = t_1;
} else if (z <= -4.3e-302) {
tmp = x * log(y);
} else if (z <= 3.3e+78) {
tmp = t_1;
} else {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = log(t) - y
if (z <= (-3.2d+111)) then
tmp = -z
else if (z <= (-2.3d-246)) then
tmp = t_1
else if (z <= (-4.3d-302)) then
tmp = x * log(y)
else if (z <= 3.3d+78) then
tmp = t_1
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.log(t) - y;
double tmp;
if (z <= -3.2e+111) {
tmp = -z;
} else if (z <= -2.3e-246) {
tmp = t_1;
} else if (z <= -4.3e-302) {
tmp = x * Math.log(y);
} else if (z <= 3.3e+78) {
tmp = t_1;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(t) - y tmp = 0 if z <= -3.2e+111: tmp = -z elif z <= -2.3e-246: tmp = t_1 elif z <= -4.3e-302: tmp = x * math.log(y) elif z <= 3.3e+78: tmp = t_1 else: tmp = -z return tmp
function code(x, y, z, t) t_1 = Float64(log(t) - y) tmp = 0.0 if (z <= -3.2e+111) tmp = Float64(-z); elseif (z <= -2.3e-246) tmp = t_1; elseif (z <= -4.3e-302) tmp = Float64(x * log(y)); elseif (z <= 3.3e+78) tmp = t_1; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(t) - y; tmp = 0.0; if (z <= -3.2e+111) tmp = -z; elseif (z <= -2.3e-246) tmp = t_1; elseif (z <= -4.3e-302) tmp = x * log(y); elseif (z <= 3.3e+78) tmp = t_1; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[z, -3.2e+111], (-z), If[LessEqual[z, -2.3e-246], t$95$1, If[LessEqual[z, -4.3e-302], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+78], t$95$1, (-z)]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t - y\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+111}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-246}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-302}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+78}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if z < -3.2000000000000001e111 or 3.3e78 < z Initial program 100.0%
Taylor expanded in z around inf 86.3%
mul-1-neg86.3%
Simplified86.3%
if -3.2000000000000001e111 < z < -2.2999999999999998e-246 or -4.3000000000000002e-302 < z < 3.3e78Initial program 99.9%
+-commutative99.9%
add-log-exp19.7%
sum-log19.7%
associate--l-19.7%
exp-diff18.5%
*-commutative18.5%
exp-to-pow18.5%
Applied egg-rr18.5%
Taylor expanded in x around 0 18.0%
Taylor expanded in z around 0 17.8%
log-div17.8%
rem-log-exp61.0%
Simplified61.0%
if -2.2999999999999998e-246 < z < -4.3000000000000002e-302Initial program 99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in x around inf 75.0%
*-commutative75.0%
Simplified75.0%
Final simplification71.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.6e+94) (not (<= x 8.5e+212))) (* x (log y)) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.6e+94) || !(x <= 8.5e+212)) {
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 <= (-5.6d+94)) .or. (.not. (x <= 8.5d+212))) 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 <= -5.6e+94) || !(x <= 8.5e+212)) {
tmp = x * Math.log(y);
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.6e+94) or not (x <= 8.5e+212): 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 <= -5.6e+94) || !(x <= 8.5e+212)) 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 <= -5.6e+94) || ~((x <= 8.5e+212))) tmp = x * log(y); else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.6e+94], N[Not[LessEqual[x, 8.5e+212]], $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 -5.6 \cdot 10^{+94} \lor \neg \left(x \leq 8.5 \cdot 10^{+212}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -5.59999999999999997e94 or 8.49999999999999979e212 < x Initial program 99.7%
Taylor expanded in z around 0 86.4%
Taylor expanded in x around inf 77.8%
*-commutative77.8%
Simplified77.8%
if -5.59999999999999997e94 < x < 8.49999999999999979e212Initial program 100.0%
Taylor expanded in x around 0 91.3%
Final simplification88.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.55e+94) (not (<= x 7e+140))) (- (* x (log y)) z) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.55e+94) || !(x <= 7e+140)) {
tmp = (x * log(y)) - z;
} 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.55d+94)) .or. (.not. (x <= 7d+140))) then
tmp = (x * log(y)) - z
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.55e+94) || !(x <= 7e+140)) {
tmp = (x * Math.log(y)) - z;
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.55e+94) or not (x <= 7e+140): tmp = (x * math.log(y)) - z else: tmp = math.log(t) - (y + z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.55e+94) || !(x <= 7e+140)) tmp = Float64(Float64(x * log(y)) - z); 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.55e+94) || ~((x <= 7e+140))) tmp = (x * log(y)) - z; else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.55e+94], N[Not[LessEqual[x, 7e+140]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+94} \lor \neg \left(x \leq 7 \cdot 10^{+140}\right):\\
\;\;\;\;x \cdot \log y - z\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -1.54999999999999996e94 or 6.99999999999999978e140 < x Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
associate--l+99.7%
add-cube-cbrt98.5%
associate-*r*98.5%
fma-def98.5%
pow298.5%
Applied egg-rr98.5%
Taylor expanded in z around inf 87.2%
neg-mul-187.2%
Simplified87.2%
fma-udef87.2%
unsub-neg87.2%
associate-*r*87.1%
unpow287.1%
add-cube-cbrt88.3%
*-commutative88.3%
Applied egg-rr88.3%
if -1.54999999999999996e94 < x < 6.99999999999999978e140Initial program 100.0%
Taylor expanded in x around 0 94.1%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3.3e+111) (not (<= z 3e+78))) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3.3e+111) || !(z <= 3e+78)) {
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 ((z <= (-3.3d+111)) .or. (.not. (z <= 3d+78))) 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 ((z <= -3.3e+111) || !(z <= 3e+78)) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3.3e+111) or not (z <= 3e+78): tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3.3e+111) || !(z <= 3e+78)) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -3.3e+111) || ~((z <= 3e+78))) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -3.3e+111], N[Not[LessEqual[z, 3e+78]], $MachinePrecision]], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+111} \lor \neg \left(z \leq 3 \cdot 10^{+78}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if z < -3.3000000000000001e111 or 2.99999999999999982e78 < z Initial program 100.0%
Taylor expanded in z around inf 86.3%
mul-1-neg86.3%
Simplified86.3%
if -3.3000000000000001e111 < z < 2.99999999999999982e78Initial program 99.8%
Taylor expanded in y around inf 44.8%
neg-mul-144.8%
Simplified44.8%
Final simplification61.0%
(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%
Taylor expanded in y around inf 31.5%
neg-mul-131.5%
Simplified31.5%
Final simplification31.5%
herbie shell --seed 2023318
(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)))