
(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 13 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)) y) z)) (t_2 (- (- 0.0 y) z))) (if (<= t_1 -2e+18) t_2 (if (<= t_1 1.0) (- (log t) y) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * log(y)) - y) - z;
double t_2 = (0.0 - y) - z;
double tmp;
if (t_1 <= -2e+18) {
tmp = t_2;
} else if (t_1 <= 1.0) {
tmp = log(t) - y;
} else {
tmp = t_2;
}
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)) - y) - z
t_2 = (0.0d0 - y) - z
if (t_1 <= (-2d+18)) then
tmp = t_2
else if (t_1 <= 1.0d0) then
tmp = log(t) - y
else
tmp = t_2
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 t_2 = (0.0 - y) - z;
double tmp;
if (t_1 <= -2e+18) {
tmp = t_2;
} else if (t_1 <= 1.0) {
tmp = Math.log(t) - y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x * math.log(y)) - y) - z t_2 = (0.0 - y) - z tmp = 0 if t_1 <= -2e+18: tmp = t_2 elif t_1 <= 1.0: tmp = math.log(t) - y else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x * log(y)) - y) - z) t_2 = Float64(Float64(0.0 - y) - z) tmp = 0.0 if (t_1 <= -2e+18) tmp = t_2; elseif (t_1 <= 1.0) tmp = Float64(log(t) - y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x * log(y)) - y) - z; t_2 = (0.0 - y) - z; tmp = 0.0; if (t_1 <= -2e+18) tmp = t_2; elseif (t_1 <= 1.0) tmp = log(t) - y; else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+18], t$95$2, If[LessEqual[t$95$1, 1.0], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \log y - y\right) - z\\
t_2 := \left(0 - y\right) - z\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 1:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -2e18 or 1 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.4
Simplified99.4%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f6472.5
Simplified72.5%
if -2e18 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 1Initial program 99.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
sub-negN/A
associate-*r/N/A
mul-1-negN/A
log-recN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-/l*N/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6497.5
Simplified97.5%
Taylor expanded in z around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
distribute-rgt-neg-inN/A
distribute-frac-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified95.7%
Taylor expanded in x around 0
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6492.8
Simplified92.8%
Final simplification75.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ 1.0 (/ 1.0 (- (* x (log y)) (+ y z)))))) (if (<= z -470.0) t_1 (if (<= z 420.0) (- (fma x (log y) (log t)) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (1.0 / ((x * log(y)) - (y + z)));
double tmp;
if (z <= -470.0) {
tmp = t_1;
} else if (z <= 420.0) {
tmp = fma(x, log(y), log(t)) - y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(1.0 / Float64(1.0 / Float64(Float64(x * log(y)) - Float64(y + z)))) tmp = 0.0 if (z <= -470.0) tmp = t_1; elseif (z <= 420.0) tmp = Float64(fma(x, log(y), log(t)) - y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(1.0 / N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -470.0], t$95$1, If[LessEqual[z, 420.0], N[(N[(x * N[Log[y], $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{1}{x \cdot \log y - \left(y + z\right)}}\\
\mathbf{if}\;z \leq -470:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 420:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t\right) - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -470 or 420 < z Initial program 99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.2
Simplified99.2%
if -470 < z < 420Initial program 99.9%
Taylor expanded in z around 0
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f6499.3
Simplified99.3%
(FPCore (x y z t) :precision binary64 (if (<= y 53.0) (fma x (log y) (- (log t) z)) (/ 1.0 (/ 1.0 (- (* x (log y)) (+ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 53.0) {
tmp = fma(x, log(y), (log(t) - z));
} else {
tmp = 1.0 / (1.0 / ((x * log(y)) - (y + z)));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 53.0) tmp = fma(x, log(y), Float64(log(t) - z)); else tmp = Float64(1.0 / Float64(1.0 / Float64(Float64(x * log(y)) - Float64(y + z)))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 53.0], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 53:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{1}{x \cdot \log y - \left(y + z\right)}}\\
\end{array}
\end{array}
if y < 53Initial program 99.8%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6499.2
Simplified99.2%
if 53 < y Initial program 100.0%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6498.6
Simplified98.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ 1.0 (/ 1.0 (- (* x (log y)) (+ y z)))))) (if (<= x -2.6e+27) t_1 (if (<= x 0.11) (- (log t) (+ y z)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / (1.0 / ((x * log(y)) - (y + z)));
double tmp;
if (x <= -2.6e+27) {
tmp = t_1;
} else if (x <= 0.11) {
tmp = log(t) - (y + z);
} 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 = 1.0d0 / (1.0d0 / ((x * log(y)) - (y + z)))
if (x <= (-2.6d+27)) then
tmp = t_1
else if (x <= 0.11d0) then
tmp = log(t) - (y + z)
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 = 1.0 / (1.0 / ((x * Math.log(y)) - (y + z)));
double tmp;
if (x <= -2.6e+27) {
tmp = t_1;
} else if (x <= 0.11) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 / (1.0 / ((x * math.log(y)) - (y + z))) tmp = 0 if x <= -2.6e+27: tmp = t_1 elif x <= 0.11: tmp = math.log(t) - (y + z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 / Float64(1.0 / Float64(Float64(x * log(y)) - Float64(y + z)))) tmp = 0.0 if (x <= -2.6e+27) tmp = t_1; elseif (x <= 0.11) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 / (1.0 / ((x * log(y)) - (y + z))); tmp = 0.0; if (x <= -2.6e+27) tmp = t_1; elseif (x <= 0.11) tmp = log(t) - (y + z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(1.0 / N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+27], t$95$1, If[LessEqual[x, 0.11], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{1}{x \cdot \log y - \left(y + z\right)}}\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 0.11:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.60000000000000009e27 or 0.110000000000000001 < x Initial program 99.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.4
Simplified99.4%
if -2.60000000000000009e27 < x < 0.110000000000000001Initial program 100.0%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6499.1
Simplified99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (- 0.0 y) z)))
(if (<= z -2.45e-21)
t_1
(if (<= z -2.6e-30) (* x (log y)) (if (<= z 390.0) (- (log t) y) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (0.0 - y) - z;
double tmp;
if (z <= -2.45e-21) {
tmp = t_1;
} else if (z <= -2.6e-30) {
tmp = x * log(y);
} else if (z <= 390.0) {
tmp = log(t) - 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 = (0.0d0 - y) - z
if (z <= (-2.45d-21)) then
tmp = t_1
else if (z <= (-2.6d-30)) then
tmp = x * log(y)
else if (z <= 390.0d0) then
tmp = log(t) - 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 = (0.0 - y) - z;
double tmp;
if (z <= -2.45e-21) {
tmp = t_1;
} else if (z <= -2.6e-30) {
tmp = x * Math.log(y);
} else if (z <= 390.0) {
tmp = Math.log(t) - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (0.0 - y) - z tmp = 0 if z <= -2.45e-21: tmp = t_1 elif z <= -2.6e-30: tmp = x * math.log(y) elif z <= 390.0: tmp = math.log(t) - y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(0.0 - y) - z) tmp = 0.0 if (z <= -2.45e-21) tmp = t_1; elseif (z <= -2.6e-30) tmp = Float64(x * log(y)); elseif (z <= 390.0) tmp = Float64(log(t) - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (0.0 - y) - z; tmp = 0.0; if (z <= -2.45e-21) tmp = t_1; elseif (z <= -2.6e-30) tmp = x * log(y); elseif (z <= 390.0) tmp = log(t) - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[z, -2.45e-21], t$95$1, If[LessEqual[z, -2.6e-30], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 390.0], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(0 - y\right) - z\\
\mathbf{if}\;z \leq -2.45 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{elif}\;z \leq 390:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.4500000000000001e-21 or 390 < z Initial program 99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6498.5
Simplified98.5%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f6483.8
Simplified83.8%
if -2.4500000000000001e-21 < z < -2.59999999999999987e-30Initial program 99.7%
Taylor expanded in x around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6499.7
Simplified99.7%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.7
Applied egg-rr99.7%
if -2.59999999999999987e-30 < z < 390Initial program 99.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
sub-negN/A
associate-*r/N/A
mul-1-negN/A
log-recN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-/l*N/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6488.0
Simplified88.0%
Taylor expanded in z around 0
+-commutativeN/A
remove-double-negN/A
log-recN/A
distribute-rgt-neg-inN/A
distribute-frac-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified87.8%
Taylor expanded in x around 0
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6469.2
Simplified69.2%
Final simplification77.4%
(FPCore (x y z t) :precision binary64 (if (<= x -5e+28) (fma x (log y) (- 0.0 z)) (if (<= x 2.4e+28) (- (log t) (+ y z)) (- (* x (log y)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5e+28) {
tmp = fma(x, log(y), (0.0 - z));
} else if (x <= 2.4e+28) {
tmp = log(t) - (y + z);
} else {
tmp = (x * log(y)) - y;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (x <= -5e+28) tmp = fma(x, log(y), Float64(0.0 - z)); elseif (x <= 2.4e+28) tmp = Float64(log(t) - Float64(y + z)); else tmp = Float64(Float64(x * log(y)) - y); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[x, -5e+28], N[(x * N[Log[y], $MachinePrecision] + N[(0.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.4e+28], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, 0 - z\right)\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y - y\\
\end{array}
\end{array}
if x < -4.99999999999999957e28Initial program 99.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.6
Simplified99.6%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
--lowering--.f6484.3
Simplified84.3%
if -4.99999999999999957e28 < x < 2.39999999999999981e28Initial program 100.0%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6498.4
Simplified98.4%
if 2.39999999999999981e28 < x Initial program 99.8%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.6
Simplified99.6%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6483.2
Simplified83.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) y))) (if (<= x -5.8e+62) t_1 (if (<= x 3.4e+29) (- (log t) (+ y z)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double tmp;
if (x <= -5.8e+62) {
tmp = t_1;
} else if (x <= 3.4e+29) {
tmp = log(t) - (y + z);
} 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 = (x * log(y)) - y
if (x <= (-5.8d+62)) then
tmp = t_1
else if (x <= 3.4d+29) then
tmp = log(t) - (y + z)
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 = (x * Math.log(y)) - y;
double tmp;
if (x <= -5.8e+62) {
tmp = t_1;
} else if (x <= 3.4e+29) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - y tmp = 0 if x <= -5.8e+62: tmp = t_1 elif x <= 3.4e+29: tmp = math.log(t) - (y + z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) tmp = 0.0 if (x <= -5.8e+62) tmp = t_1; elseif (x <= 3.4e+29) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * log(y)) - y; tmp = 0.0; if (x <= -5.8e+62) tmp = t_1; elseif (x <= 3.4e+29) tmp = log(t) - (y + z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[x, -5.8e+62], t$95$1, If[LessEqual[x, 3.4e+29], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+29}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.79999999999999968e62 or 3.39999999999999981e29 < x Initial program 99.8%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.6
Simplified99.6%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6484.5
Simplified84.5%
if -5.79999999999999968e62 < x < 3.39999999999999981e29Initial program 100.0%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6496.7
Simplified96.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y)))) (if (<= x -2.6e+145) t_1 (if (<= x 1.7e+140) (- (log t) (+ y z)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -2.6e+145) {
tmp = t_1;
} else if (x <= 1.7e+140) {
tmp = log(t) - (y + z);
} 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 = x * log(y)
if (x <= (-2.6d+145)) then
tmp = t_1
else if (x <= 1.7d+140) then
tmp = log(t) - (y + z)
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 = x * Math.log(y);
double tmp;
if (x <= -2.6e+145) {
tmp = t_1;
} else if (x <= 1.7e+140) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -2.6e+145: tmp = t_1 elif x <= 1.7e+140: tmp = math.log(t) - (y + z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -2.6e+145) tmp = t_1; elseif (x <= 1.7e+140) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -2.6e+145) tmp = t_1; elseif (x <= 1.7e+140) tmp = log(t) - (y + z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+145], t$95$1, If[LessEqual[x, 1.7e+140], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+140}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.60000000000000003e145 or 1.7e140 < x Initial program 99.6%
Taylor expanded in x around inf
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6476.9
Simplified76.9%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6476.9
Applied egg-rr76.9%
if -2.60000000000000003e145 < x < 1.7e140Initial program 99.9%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6490.0
Simplified90.0%
Final simplification87.3%
(FPCore (x y z t) :precision binary64 (if (<= y 400000000000.0) (- 0.0 z) (- 0.0 y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 400000000000.0) {
tmp = 0.0 - z;
} else {
tmp = 0.0 - 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 <= 400000000000.0d0) then
tmp = 0.0d0 - z
else
tmp = 0.0d0 - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 400000000000.0) {
tmp = 0.0 - z;
} else {
tmp = 0.0 - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 400000000000.0: tmp = 0.0 - z else: tmp = 0.0 - y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 400000000000.0) tmp = Float64(0.0 - z); else tmp = Float64(0.0 - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 400000000000.0) tmp = 0.0 - z; else tmp = 0.0 - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 400000000000.0], N[(0.0 - z), $MachinePrecision], N[(0.0 - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 400000000000:\\
\;\;\;\;0 - z\\
\mathbf{else}:\\
\;\;\;\;0 - y\\
\end{array}
\end{array}
if y < 4e11Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6444.9
Simplified44.9%
sub0-negN/A
neg-lowering-neg.f6444.9
Applied egg-rr44.9%
if 4e11 < y Initial program 100.0%
Taylor expanded in y around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6464.1
Simplified64.1%
sub0-negN/A
neg-lowering-neg.f6464.1
Applied egg-rr64.1%
Final simplification53.7%
(FPCore (x y z t) :precision binary64 (- (- 0.0 y) z))
double code(double x, double y, double z, double t) {
return (0.0 - 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 = (0.0d0 - y) - z
end function
public static double code(double x, double y, double z, double t) {
return (0.0 - y) - z;
}
def code(x, y, z, t): return (0.0 - y) - z
function code(x, y, z, t) return Float64(Float64(0.0 - y) - z) end
function tmp = code(x, y, z, t) tmp = (0.0 - y) - z; end
code[x_, y_, z_, t_] := N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(0 - y\right) - z
\end{array}
Initial program 99.9%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6485.4
Simplified85.4%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
+-lowering-+.f6462.4
Simplified62.4%
Final simplification62.4%
(FPCore (x y z t) :precision binary64 (- 0.0 y))
double code(double x, double y, double z, double t) {
return 0.0 - 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 = 0.0d0 - y
end function
public static double code(double x, double y, double z, double t) {
return 0.0 - y;
}
def code(x, y, z, t): return 0.0 - y
function code(x, y, z, t) return Float64(0.0 - y) end
function tmp = code(x, y, z, t) tmp = 0.0 - y; end
code[x_, y_, z_, t_] := N[(0.0 - y), $MachinePrecision]
\begin{array}{l}
\\
0 - y
\end{array}
Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6430.9
Simplified30.9%
sub0-negN/A
neg-lowering-neg.f6430.9
Applied egg-rr30.9%
Final simplification30.9%
(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%
Taylor expanded in y around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6430.9
Simplified30.9%
flip3--N/A
div-invN/A
metadata-evalN/A
sub0-negN/A
cube-negN/A
*-lowering-*.f64N/A
cube-negN/A
sub0-negN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
mul0-lftN/A
accelerator-lowering-fma.f64N/A
metadata-evalN/A
+-lft-identityN/A
distribute-rgt-outN/A
+-commutativeN/A
+-lft-identityN/A
/-lowering-/.f64N/A
+-lft-identityN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied egg-rr6.9%
un-div-invN/A
sub0-negN/A
+-rgt-identityN/A
cube-unmultN/A
cube-negN/A
sub0-negN/A
sqr-powN/A
unpow-prod-downN/A
sub0-negN/A
sub0-negN/A
sqr-negN/A
unpow-prod-downN/A
sqr-powN/A
+-rgt-identityN/A
pow2N/A
pow-divN/A
metadata-evalN/A
unpow12.2
Applied egg-rr2.2%
herbie shell --seed 2024196
(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)))