
(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 (- (fma x (log y) (- (log t) z)) y))
double code(double x, double y, double z, double t) {
return fma(x, log(y), (log(t) - z)) - y;
}
function code(x, y, z, t) return Float64(fma(x, log(y), Float64(log(t) - z)) - y) end
code[x_, y_, z_, t_] := N[(N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, \log y, \log t - z\right) - y
\end{array}
Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
unsub-neg99.8%
fma-udef99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- (- t_1 y) z)))
(if (<= t_2 -1e+18)
(- (fma (log y) x (- y)) z)
(if (<= t_2 1e+16) (- (+ (log t) t_1) y) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = (t_1 - y) - z;
double tmp;
if (t_2 <= -1e+18) {
tmp = fma(log(y), x, -y) - z;
} else if (t_2 <= 1e+16) {
tmp = (log(t) + t_1) - y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(t_1 - y) - z) tmp = 0.0 if (t_2 <= -1e+18) tmp = Float64(fma(log(y), x, Float64(-y)) - z); elseif (t_2 <= 1e+16) tmp = Float64(Float64(log(t) + t_1) - y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+18], N[(N[(N[Log[y], $MachinePrecision] * x + (-y)), $MachinePrecision] - z), $MachinePrecision], If[LessEqual[t$95$2, 1e+16], N[(N[(N[Log[t], $MachinePrecision] + t$95$1), $MachinePrecision] - y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(t\_1 - y\right) - z\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, -y\right) - z\\
\mathbf{elif}\;t\_2 \leq 10^{+16}:\\
\;\;\;\;\left(\log t + t\_1\right) - y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -1e18Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
add-cbrt-cube66.6%
pow366.6%
Applied egg-rr66.6%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
neg-mul-199.8%
+-commutative99.8%
fma-def99.8%
Simplified99.8%
if -1e18 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 1e16Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
if 1e16 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y))) (t_2 (- (- t_1 y) z))) (if (or (<= t_2 -20000000.0) (not (<= t_2 1e+16))) t_2 (+ (log t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = (t_1 - y) - z;
double tmp;
if ((t_2 <= -20000000.0) || !(t_2 <= 1e+16)) {
tmp = t_2;
} else {
tmp = log(t) + 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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = (t_1 - y) - z
if ((t_2 <= (-20000000.0d0)) .or. (.not. (t_2 <= 1d+16))) then
tmp = t_2
else
tmp = log(t) + t_1
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) - z;
double tmp;
if ((t_2 <= -20000000.0) || !(t_2 <= 1e+16)) {
tmp = t_2;
} else {
tmp = Math.log(t) + t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = (t_1 - y) - z tmp = 0 if (t_2 <= -20000000.0) or not (t_2 <= 1e+16): tmp = t_2 else: tmp = math.log(t) + t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(t_1 - y) - z) tmp = 0.0 if ((t_2 <= -20000000.0) || !(t_2 <= 1e+16)) tmp = t_2; else tmp = Float64(log(t) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = (t_1 - y) - z; tmp = 0.0; if ((t_2 <= -20000000.0) || ~((t_2 <= 1e+16))) tmp = t_2; else tmp = log(t) + t_1; 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[(N[(t$95$1 - y), $MachinePrecision] - z), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -20000000.0], N[Not[LessEqual[t$95$2, 1e+16]], $MachinePrecision]], t$95$2, N[(N[Log[t], $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(t\_1 - y\right) - z\\
\mathbf{if}\;t\_2 \leq -20000000 \lor \neg \left(t\_2 \leq 10^{+16}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\log t + t\_1\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -2e7 or 1e16 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.3%
if -2e7 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 1e16Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in x around inf 98.9%
Final simplification99.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- (- t_1 y) z)))
(if (<= t_2 -20000000.0)
(- (fma (log y) x (- y)) z)
(if (<= t_2 1e+16) (+ (log t) t_1) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = (t_1 - y) - z;
double tmp;
if (t_2 <= -20000000.0) {
tmp = fma(log(y), x, -y) - z;
} else if (t_2 <= 1e+16) {
tmp = log(t) + t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(t_1 - y) - z) tmp = 0.0 if (t_2 <= -20000000.0) tmp = Float64(fma(log(y), x, Float64(-y)) - z); elseif (t_2 <= 1e+16) tmp = Float64(log(t) + t_1); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$1 - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$2, -20000000.0], N[(N[(N[Log[y], $MachinePrecision] * x + (-y)), $MachinePrecision] - z), $MachinePrecision], If[LessEqual[t$95$2, 1e+16], N[(N[Log[t], $MachinePrecision] + t$95$1), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(t\_1 - y\right) - z\\
\mathbf{if}\;t\_2 \leq -20000000:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, -y\right) - z\\
\mathbf{elif}\;t\_2 \leq 10^{+16}:\\
\;\;\;\;\log t + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -2e7Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.1%
add-cbrt-cube66.8%
pow366.8%
Applied egg-rr66.8%
Taylor expanded in x around 0 99.1%
*-commutative99.1%
neg-mul-199.1%
+-commutative99.1%
fma-def99.1%
Simplified99.1%
if -2e7 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 1e16Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in x around inf 98.9%
if 1e16 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.8%
Final simplification99.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- (* x (log y)) y) z))) (if (or (<= t_1 -1e+25) (not (<= t_1 500.0))) t_1 (- (- (log t) z) y))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * log(y)) - y) - z;
double tmp;
if ((t_1 <= -1e+25) || !(t_1 <= 500.0)) {
tmp = t_1;
} else {
tmp = (log(t) - 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) :: t_1
real(8) :: tmp
t_1 = ((x * log(y)) - y) - z
if ((t_1 <= (-1d+25)) .or. (.not. (t_1 <= 500.0d0))) then
tmp = t_1
else
tmp = (log(t) - z) - 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)) - y) - z;
double tmp;
if ((t_1 <= -1e+25) || !(t_1 <= 500.0)) {
tmp = t_1;
} else {
tmp = (Math.log(t) - z) - y;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x * math.log(y)) - y) - z tmp = 0 if (t_1 <= -1e+25) or not (t_1 <= 500.0): tmp = t_1 else: tmp = (math.log(t) - z) - y return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x * log(y)) - y) - z) tmp = 0.0 if ((t_1 <= -1e+25) || !(t_1 <= 500.0)) tmp = t_1; else tmp = Float64(Float64(log(t) - z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x * log(y)) - y) - z; tmp = 0.0; if ((t_1 <= -1e+25) || ~((t_1 <= 500.0))) tmp = t_1; else tmp = (log(t) - z) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+25], N[Not[LessEqual[t$95$1, 500.0]], $MachinePrecision]], t$95$1, N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \log y - y\right) - z\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+25} \lor \neg \left(t\_1 \leq 500\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - z\right) - y\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -1.00000000000000009e25 or 500 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.1%
if -1.00000000000000009e25 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 500Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+100.0%
+-commutative100.0%
unsub-neg100.0%
fma-udef100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 88.7%
Final simplification97.7%
(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.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.2e+14) (not (<= z 1.1e-6))) (- (- y) z) (- (log t) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.2e+14) || !(z <= 1.1e-6)) {
tmp = -y - z;
} else {
tmp = log(t) - 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.2d+14)) .or. (.not. (z <= 1.1d-6))) then
tmp = -y - z
else
tmp = log(t) - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.2e+14) || !(z <= 1.1e-6)) {
tmp = -y - z;
} else {
tmp = Math.log(t) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.2e+14) or not (z <= 1.1e-6): tmp = -y - z else: tmp = math.log(t) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.2e+14) || !(z <= 1.1e-6)) tmp = Float64(Float64(-y) - z); else tmp = Float64(log(t) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.2e+14) || ~((z <= 1.1e-6))) tmp = -y - z; else tmp = log(t) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.2e+14], N[Not[LessEqual[z, 1.1e-6]], $MachinePrecision]], N[((-y) - z), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+14} \lor \neg \left(z \leq 1.1 \cdot 10^{-6}\right):\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{else}:\\
\;\;\;\;\log t - y\\
\end{array}
\end{array}
if z < -1.2e14 or 1.1000000000000001e-6 < z Initial program 99.9%
associate-+l-99.9%
Simplified99.9%
Taylor expanded in z around inf 99.9%
add-cbrt-cube70.8%
pow370.8%
Applied egg-rr70.8%
Taylor expanded in x around 0 79.9%
neg-mul-179.9%
Simplified79.9%
if -1.2e14 < z < 1.1000000000000001e-6Initial program 99.7%
sub-neg99.7%
associate--l+99.7%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around inf 54.5%
mul-1-neg54.5%
Simplified54.5%
Taylor expanded in y around 0 54.5%
mul-1-neg54.5%
sub-neg54.5%
Simplified54.5%
Final simplification66.6%
(FPCore (x y z t) :precision binary64 (if (<= y 0.00165) (- (log t) z) (- (- y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 0.00165) {
tmp = log(t) - z;
} else {
tmp = -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 (y <= 0.00165d0) then
tmp = log(t) - z
else
tmp = -y - z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 0.00165) {
tmp = Math.log(t) - z;
} else {
tmp = -y - z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 0.00165: tmp = math.log(t) - z else: tmp = -y - z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 0.00165) tmp = Float64(log(t) - z); else tmp = Float64(Float64(-y) - z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 0.00165) tmp = log(t) - z; else tmp = -y - z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 0.00165], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[((-y) - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.00165:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) - z\\
\end{array}
\end{array}
if y < 0.00165Initial program 99.8%
sub-neg99.8%
associate--l+99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in x around 0 56.8%
if 0.00165 < y Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 99.0%
add-cbrt-cube66.0%
pow366.0%
Applied egg-rr66.0%
Taylor expanded in x around 0 75.9%
neg-mul-175.9%
Simplified75.9%
Final simplification66.1%
(FPCore (x y z t) :precision binary64 (- (- (log t) z) y))
double code(double x, double y, double z, double t) {
return (log(t) - 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 = (log(t) - z) - y
end function
public static double code(double x, double y, double z, double t) {
return (Math.log(t) - z) - y;
}
def code(x, y, z, t): return (math.log(t) - z) - y
function code(x, y, z, t) return Float64(Float64(log(t) - z) - y) end
function tmp = code(x, y, z, t) tmp = (log(t) - z) - y; end
code[x_, y_, z_, t_] := N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]
\begin{array}{l}
\\
\left(\log t - z\right) - y
\end{array}
Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
unsub-neg99.8%
fma-udef99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 66.6%
Final simplification66.6%
(FPCore (x y z t) :precision binary64 (if (<= y 2.6e+76) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.6e+76) {
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 <= 2.6d+76) 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 <= 2.6e+76) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 2.6e+76: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 2.6e+76) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 2.6e+76) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 2.6e+76], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+76}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 2.5999999999999999e76Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
add-cube-cbrt99.1%
pow399.1%
Applied egg-rr99.1%
Taylor expanded in z around inf 38.0%
neg-mul-138.0%
Simplified38.0%
if 2.5999999999999999e76 < y Initial program 99.9%
associate-+l-99.9%
Simplified99.9%
add-cube-cbrt99.6%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 68.4%
mul-1-neg68.4%
Simplified68.4%
Final simplification49.4%
(FPCore (x y z t) :precision binary64 (- (- y) z))
double code(double x, double y, double z, double t) {
return -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 = -y - z
end function
public static double code(double x, double y, double z, double t) {
return -y - z;
}
def code(x, y, z, t): return -y - z
function code(x, y, z, t) return Float64(Float64(-y) - z) end
function tmp = code(x, y, z, t) tmp = -y - z; end
code[x_, y_, z_, t_] := N[((-y) - z), $MachinePrecision]
\begin{array}{l}
\\
\left(-y\right) - z
\end{array}
Initial program 99.8%
associate-+l-99.8%
Simplified99.8%
Taylor expanded in z around inf 88.0%
add-cbrt-cube56.2%
pow356.2%
Applied egg-rr56.2%
Taylor expanded in x around 0 56.6%
neg-mul-156.6%
Simplified56.6%
Final simplification56.6%
(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.8%
associate-+l-99.8%
Simplified99.8%
add-cube-cbrt99.3%
pow399.3%
Applied egg-rr99.3%
Taylor expanded in y around inf 29.8%
mul-1-neg29.8%
Simplified29.8%
Final simplification29.8%
herbie shell --seed 2024027
(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)))