
(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 10 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 (cbrt y)) 3.0)) (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
return (x * (log(cbrt(y)) * 3.0)) + ((log(t) - z) - y);
}
public static double code(double x, double y, double z, double t) {
return (x * (Math.log(Math.cbrt(y)) * 3.0)) + ((Math.log(t) - z) - y);
}
function code(x, y, z, t) return Float64(Float64(x * Float64(log(cbrt(y)) * 3.0)) + Float64(Float64(log(t) - z) - y)) end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[Log[N[Power[y, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\log \left(\sqrt[3]{y}\right) \cdot 3\right) + \left(\left(\log t - z\right) - y\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cube-cbrt99.9%
log-prod99.9%
pow299.9%
Applied egg-rr99.9%
log-pow99.9%
fma-define99.9%
Applied egg-rr99.9%
fma-define99.9%
*-lft-identity99.9%
distribute-rgt-out99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- t_1 y)))
(if (<= t_2 -2e+163)
t_2
(if (<= t_2 -1e+62) (- (log t) (+ y z)) (- (+ (log t) t_1) z)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - y;
double tmp;
if (t_2 <= -2e+163) {
tmp = t_2;
} else if (t_2 <= -1e+62) {
tmp = log(t) - (y + z);
} else {
tmp = (log(t) + t_1) - 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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if (t_2 <= (-2d+163)) then
tmp = t_2
else if (t_2 <= (-1d+62)) then
tmp = log(t) - (y + z)
else
tmp = (log(t) + t_1) - 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 t_2 = t_1 - y;
double tmp;
if (t_2 <= -2e+163) {
tmp = t_2;
} else if (t_2 <= -1e+62) {
tmp = Math.log(t) - (y + z);
} else {
tmp = (Math.log(t) + t_1) - z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if t_2 <= -2e+163: tmp = t_2 elif t_2 <= -1e+62: tmp = math.log(t) - (y + z) else: tmp = (math.log(t) + t_1) - z return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - y) tmp = 0.0 if (t_2 <= -2e+163) tmp = t_2; elseif (t_2 <= -1e+62) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(Float64(log(t) + t_1) - z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - y; tmp = 0.0; if (t_2 <= -2e+163) tmp = t_2; elseif (t_2 <= -1e+62) tmp = log(t) - (y + z); else tmp = (log(t) + t_1) - z; 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 - y), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+163], t$95$2, If[LessEqual[t$95$2, -1e+62], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] + t$95$1), $MachinePrecision] - z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+62}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log t + t\_1\right) - z\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e163Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 92.7%
if -1.9999999999999999e163 < (-.f64 (*.f64 x (log.f64 y)) y) < -1.00000000000000004e62Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in x around 0 92.5%
if -1.00000000000000004e62 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around 0 96.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y))) (t_2 (- t_1 y))) (if (<= t_2 -2e+163) t_2 (if (<= t_2 0.05) (- (log t) (+ y z)) (- t_1 z)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - y;
double tmp;
if (t_2 <= -2e+163) {
tmp = t_2;
} else if (t_2 <= 0.05) {
tmp = log(t) - (y + z);
} else {
tmp = t_1 - 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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if (t_2 <= (-2d+163)) then
tmp = t_2
else if (t_2 <= 0.05d0) then
tmp = log(t) - (y + z)
else
tmp = t_1 - 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 t_2 = t_1 - y;
double tmp;
if (t_2 <= -2e+163) {
tmp = t_2;
} else if (t_2 <= 0.05) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_1 - z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if t_2 <= -2e+163: tmp = t_2 elif t_2 <= 0.05: tmp = math.log(t) - (y + z) else: tmp = t_1 - z return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - y) tmp = 0.0 if (t_2 <= -2e+163) tmp = t_2; elseif (t_2 <= 0.05) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(t_1 - z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - y; tmp = 0.0; if (t_2 <= -2e+163) tmp = t_2; elseif (t_2 <= 0.05) tmp = log(t) - (y + z); else tmp = t_1 - z; 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 - y), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+163], t$95$2, If[LessEqual[t$95$2, 0.05], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0.05:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - z\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e163Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 92.7%
if -1.9999999999999999e163 < (-.f64 (*.f64 x (log.f64 y)) y) < 0.050000000000000003Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 92.1%
if 0.050000000000000003 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.5%
associate-+l-99.5%
associate--l-99.5%
Simplified99.5%
Taylor expanded in z around inf 99.3%
(FPCore (x y z t) :precision binary64 (+ (log t) (- (- (* x (log y)) y) z)))
double code(double x, double y, double z, double t) {
return log(t) + (((x * log(y)) - y) - 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 = log(t) + (((x * log(y)) - y) - z)
end function
public static double code(double x, double y, double z, double t) {
return Math.log(t) + (((x * Math.log(y)) - y) - z);
}
def code(x, y, z, t): return math.log(t) + (((x * math.log(y)) - y) - z)
function code(x, y, z, t) return Float64(log(t) + Float64(Float64(Float64(x * log(y)) - y) - z)) end
function tmp = code(x, y, z, t) tmp = log(t) + (((x * log(y)) - y) - z); end
code[x_, y_, z_, t_] := N[(N[Log[t], $MachinePrecision] + N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log t + \left(\left(x \cdot \log y - y\right) - z\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -9.6e+27) (not (<= x 4e+155))) (- (* x (log y)) y) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.6e+27) || !(x <= 4e+155)) {
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 <= (-9.6d+27)) .or. (.not. (x <= 4d+155))) 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 <= -9.6e+27) || !(x <= 4e+155)) {
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 <= -9.6e+27) or not (x <= 4e+155): 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 <= -9.6e+27) || !(x <= 4e+155)) 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 <= -9.6e+27) || ~((x <= 4e+155))) 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, -9.6e+27], N[Not[LessEqual[x, 4e+155]], $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.6 \cdot 10^{+27} \lor \neg \left(x \leq 4 \cdot 10^{+155}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -9.59999999999999991e27 or 4.00000000000000003e155 < x Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in y around inf 87.8%
if -9.59999999999999991e27 < x < 4.00000000000000003e155Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 93.6%
Final simplification92.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.4e+116) (not (<= x 6.5e+171))) (* x (log y)) (- (log t) (+ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.4e+116) || !(x <= 6.5e+171)) {
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 <= (-2.4d+116)) .or. (.not. (x <= 6.5d+171))) 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 <= -2.4e+116) || !(x <= 6.5e+171)) {
tmp = x * Math.log(y);
} else {
tmp = Math.log(t) - (y + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.4e+116) or not (x <= 6.5e+171): 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 <= -2.4e+116) || !(x <= 6.5e+171)) 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 <= -2.4e+116) || ~((x <= 6.5e+171))) tmp = x * log(y); else tmp = log(t) - (y + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.4e+116], N[Not[LessEqual[x, 6.5e+171]], $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 -2.4 \cdot 10^{+116} \lor \neg \left(x \leq 6.5 \cdot 10^{+171}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\end{array}
\end{array}
if x < -2.4e116 or 6.5e171 < x Initial program 99.5%
associate-+l-99.5%
associate--l-99.5%
Simplified99.5%
Taylor expanded in z around inf 92.6%
Taylor expanded in x around inf 89.2%
if -2.4e116 < x < 6.5e171Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
Taylor expanded in x around 0 89.9%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (<= y 1.15e-248) (- z) (if (<= y 5.8e-91) (* x (log y)) (if (<= y 1.05e+55) (- z) (- y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.15e-248) {
tmp = -z;
} else if (y <= 5.8e-91) {
tmp = x * log(y);
} else if (y <= 1.05e+55) {
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 <= 1.15d-248) then
tmp = -z
else if (y <= 5.8d-91) then
tmp = x * log(y)
else if (y <= 1.05d+55) 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 <= 1.15e-248) {
tmp = -z;
} else if (y <= 5.8e-91) {
tmp = x * Math.log(y);
} else if (y <= 1.05e+55) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 1.15e-248: tmp = -z elif y <= 5.8e-91: tmp = x * math.log(y) elif y <= 1.05e+55: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 1.15e-248) tmp = Float64(-z); elseif (y <= 5.8e-91) tmp = Float64(x * log(y)); elseif (y <= 1.05e+55) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 1.15e-248) tmp = -z; elseif (y <= 5.8e-91) tmp = x * log(y); elseif (y <= 1.05e+55) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.15e-248], (-z), If[LessEqual[y, 5.8e-91], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+55], (-z), (-y)]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.15 \cdot 10^{-248}:\\
\;\;\;\;-z\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+55}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 1.15e-248 or 5.8000000000000001e-91 < y < 1.05e55Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 51.1%
mul-1-neg51.1%
Simplified51.1%
if 1.15e-248 < y < 5.8000000000000001e-91Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in z around inf 74.1%
Taylor expanded in x around inf 50.8%
if 1.05e55 < y Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in y around inf 66.6%
mul-1-neg66.6%
Simplified66.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.4e+88) (not (<= z 3e+18))) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.4e+88) || !(z <= 3e+18)) {
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 <= (-4.4d+88)) .or. (.not. (z <= 3d+18))) 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 <= -4.4e+88) || !(z <= 3e+18)) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.4e+88) or not (z <= 3e+18): tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.4e+88) || !(z <= 3e+18)) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.4e+88) || ~((z <= 3e+18))) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.4e+88], N[Not[LessEqual[z, 3e+18]], $MachinePrecision]], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+88} \lor \neg \left(z \leq 3 \cdot 10^{+18}\right):\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if z < -4.40000000000000017e88 or 3e18 < z Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Taylor expanded in z around inf 72.5%
mul-1-neg72.5%
Simplified72.5%
if -4.40000000000000017e88 < z < 3e18Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 44.0%
mul-1-neg44.0%
Simplified44.0%
Final simplification54.4%
(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 32.3%
mul-1-neg32.3%
Simplified32.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 y around inf 32.3%
mul-1-neg32.3%
Simplified32.3%
neg-sub032.3%
sub-neg32.3%
add-sqr-sqrt0.0%
sqrt-unprod2.3%
sqr-neg2.3%
sqrt-unprod2.3%
add-sqr-sqrt2.3%
Applied egg-rr2.3%
+-lft-identity2.3%
Simplified2.3%
herbie shell --seed 2024145
(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)))