
(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 15 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.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- (* x (log y)) y) z))) (if (<= t_1 -500.0) (- (- y) z) (if (<= t_1 40000000.0) (log t) (- y z)))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * log(y)) - y) - z;
double tmp;
if (t_1 <= -500.0) {
tmp = -y - z;
} else if (t_1 <= 40000000.0) {
tmp = log(t);
} 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) :: t_1
real(8) :: tmp
t_1 = ((x * log(y)) - y) - z
if (t_1 <= (-500.0d0)) then
tmp = -y - z
else if (t_1 <= 40000000.0d0) then
tmp = log(t)
else
tmp = y - 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)) - y) - z;
double tmp;
if (t_1 <= -500.0) {
tmp = -y - z;
} else if (t_1 <= 40000000.0) {
tmp = Math.log(t);
} else {
tmp = y - z;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x * math.log(y)) - y) - z tmp = 0 if t_1 <= -500.0: tmp = -y - z elif t_1 <= 40000000.0: tmp = math.log(t) else: tmp = y - z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x * log(y)) - y) - z) tmp = 0.0 if (t_1 <= -500.0) tmp = Float64(Float64(-y) - z); elseif (t_1 <= 40000000.0) tmp = log(t); else tmp = Float64(y - z); 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 <= -500.0) tmp = -y - z; elseif (t_1 <= 40000000.0) tmp = log(t); else tmp = y - z; 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[LessEqual[t$95$1, -500.0], N[((-y) - z), $MachinePrecision], If[LessEqual[t$95$1, 40000000.0], N[Log[t], $MachinePrecision], N[(y - z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \log y - y\right) - z\\
\mathbf{if}\;t\_1 \leq -500:\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{elif}\;t\_1 \leq 40000000:\\
\;\;\;\;\log t\\
\mathbf{else}:\\
\;\;\;\;y - z\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -500Initial program 99.8%
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.1
Simplified98.1%
Taylor expanded in x around 0
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6471.8
Simplified71.8%
if -500 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 4e7Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6492.0
Simplified92.0%
Taylor expanded in z around 0
log-lowering-log.f6489.6
Simplified89.6%
if 4e7 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.2
Simplified99.2%
Taylor expanded in x around 0
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6450.9
Simplified50.9%
neg-sub0N/A
flip3--N/A
metadata-evalN/A
cube-unmultN/A
neg-sub0N/A
cube-unmultN/A
cube-negN/A
sqr-powN/A
unpow-prod-downN/A
sqr-negN/A
unpow-prod-downN/A
sqr-powN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
sub-negN/A
+-lft-identityN/A
mul0-lftN/A
--rgt-identityN/A
pow2N/A
pow-divN/A
metadata-evalN/A
unpow1N/A
Applied egg-rr51.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y))) (t_2 (- t_1 y))) (if (<= t_2 -500.0) (- (- y) z) (if (<= t_2 2e+28) (- (log t) z) t_1))))
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 <= -500.0) {
tmp = -y - z;
} else if (t_2 <= 2e+28) {
tmp = log(t) - 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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if (t_2 <= (-500.0d0)) then
tmp = -y - z
else if (t_2 <= 2d+28) then
tmp = log(t) - 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 t_2 = t_1 - y;
double tmp;
if (t_2 <= -500.0) {
tmp = -y - z;
} else if (t_2 <= 2e+28) {
tmp = Math.log(t) - z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if t_2 <= -500.0: tmp = -y - z elif t_2 <= 2e+28: tmp = math.log(t) - z else: tmp = t_1 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 <= -500.0) tmp = Float64(Float64(-y) - z); elseif (t_2 <= 2e+28) tmp = Float64(log(t) - z); else tmp = t_1; 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 <= -500.0) tmp = -y - z; elseif (t_2 <= 2e+28) tmp = log(t) - 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]}, Block[{t$95$2 = N[(t$95$1 - y), $MachinePrecision]}, If[LessEqual[t$95$2, -500.0], N[((-y) - z), $MachinePrecision], If[LessEqual[t$95$2, 2e+28], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -500:\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+28}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -500Initial program 99.8%
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.0
Simplified98.0%
Taylor expanded in x around 0
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6469.8
Simplified69.8%
if -500 < (-.f64 (*.f64 x (log.f64 y)) y) < 1.99999999999999992e28Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6494.6
Simplified94.6%
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6494.6
Applied egg-rr94.6%
if 1.99999999999999992e28 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6486.2
Simplified86.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (/ 1.0 (- (* x (log y)) (+ y z))))))
(if (<= z -6500000.0)
t_1
(if (<= z 120.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 <= -6500000.0) {
tmp = t_1;
} else if (z <= 120.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 <= -6500000.0) tmp = t_1; elseif (z <= 120.0) tmp = fma(x, log(y), Float64(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, -6500000.0], t$95$1, If[LessEqual[z, 120.0], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - y), $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}\;z \leq -6500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 120:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.5e6 or 120 < z Initial program 99.9%
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.f6499.6
Simplified99.6%
if -6.5e6 < z < 120Initial program 99.7%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
--lowering--.f64N/A
log-lowering-log.f6499.1
Simplified99.1%
(FPCore (x y z t) :precision binary64 (if (<= (- (* x (log y)) y) -500.0) (- (- y) z) (- (log t) z)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x * log(y)) - y) <= -500.0) {
tmp = -y - z;
} else {
tmp = log(t) - 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 * log(y)) - y) <= (-500.0d0)) then
tmp = -y - z
else
tmp = log(t) - z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x * Math.log(y)) - y) <= -500.0) {
tmp = -y - z;
} else {
tmp = Math.log(t) - z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x * math.log(y)) - y) <= -500.0: tmp = -y - z else: tmp = math.log(t) - z return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x * log(y)) - y) <= -500.0) tmp = Float64(Float64(-y) - z); else tmp = Float64(log(t) - z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x * log(y)) - y) <= -500.0) tmp = -y - z; else tmp = log(t) - z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], -500.0], N[((-y) - z), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot \log y - y \leq -500:\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{else}:\\
\;\;\;\;\log t - z\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -500Initial program 99.8%
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.0
Simplified98.0%
Taylor expanded in x around 0
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6469.8
Simplified69.8%
if -500 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6468.4
Simplified68.4%
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6468.4
Applied egg-rr68.4%
(FPCore (x y z t) :precision binary64 (if (<= y 2.2) (fma x (log y) (- (log t) z)) (* y (fma x (/ (log y) y) (- -1.0 (/ z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.2) {
tmp = fma(x, log(y), (log(t) - z));
} else {
tmp = y * fma(x, (log(y) / y), (-1.0 - (z / y)));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 2.2) tmp = fma(x, log(y), Float64(log(t) - z)); else tmp = Float64(y * fma(x, Float64(log(y) / y), Float64(-1.0 - Float64(z / y)))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 2.2], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(N[Log[y], $MachinePrecision] / y), $MachinePrecision] + N[(-1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.2:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \mathsf{fma}\left(x, \frac{\log y}{y}, -1 - \frac{z}{y}\right)\\
\end{array}
\end{array}
if y < 2.2000000000000002Initial 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.3
Simplified99.3%
if 2.2000000000000002 < y Initial program 99.9%
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.3
Simplified98.3%
Taylor expanded in y around inf
*-lowering-*.f64N/A
associate--r+N/A
sub-negN/A
metadata-evalN/A
associate--l+N/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
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
--lowering--.f64N/A
Simplified98.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (- (log y) (/ (+ y z) x))))) (if (<= x -1.2) t_1 (if (<= x 0.0085) (- (log t) (+ y z)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (log(y) - ((y + z) / x));
double tmp;
if (x <= -1.2) {
tmp = t_1;
} else if (x <= 0.0085) {
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 + z) / x))
if (x <= (-1.2d0)) then
tmp = t_1
else if (x <= 0.0085d0) 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 + z) / x));
double tmp;
if (x <= -1.2) {
tmp = t_1;
} else if (x <= 0.0085) {
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 + z) / x)) tmp = 0 if x <= -1.2: tmp = t_1 elif x <= 0.0085: tmp = math.log(t) - (y + z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(log(y) - Float64(Float64(y + z) / x))) tmp = 0.0 if (x <= -1.2) tmp = t_1; elseif (x <= 0.0085) 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 + z) / x)); tmp = 0.0; if (x <= -1.2) tmp = t_1; elseif (x <= 0.0085) 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[(N[Log[y], $MachinePrecision] - N[(N[(y + z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2], t$95$1, If[LessEqual[x, 0.0085], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\log y - \frac{y + z}{x}\right)\\
\mathbf{if}\;x \leq -1.2:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 0.0085:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.19999999999999996 or 0.0085000000000000006 < x Initial program 99.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6498.4
Simplified98.4%
Taylor expanded in x around inf
associate-*r/N/A
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
div-subN/A
associate-*r/N/A
associate--l+N/A
*-lowering-*.f64N/A
associate--l+N/A
associate-*r/N/A
div-subN/A
sub-negN/A
mul-1-negN/A
distribute-lft-inN/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
Simplified98.5%
if -1.19999999999999996 < x < 0.0085000000000000006Initial 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 (if (<= x -1.7e+27) (fma x (log y) (- y)) (if (<= x 6.2e+36) (- (log t) (+ y z)) (fma x (log y) (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.7e+27) {
tmp = fma(x, log(y), -y);
} else if (x <= 6.2e+36) {
tmp = log(t) - (y + z);
} else {
tmp = fma(x, log(y), -z);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (x <= -1.7e+27) tmp = fma(x, log(y), Float64(-y)); elseif (x <= 6.2e+36) tmp = Float64(log(t) - Float64(y + z)); else tmp = fma(x, log(y), Float64(-z)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.7e+27], N[(x * N[Log[y], $MachinePrecision] + (-y)), $MachinePrecision], If[LessEqual[x, 6.2e+36], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[y], $MachinePrecision] + (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, -y\right)\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+36}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, -z\right)\\
\end{array}
\end{array}
if x < -1.7e27Initial 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 z around 0
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
neg-lowering-neg.f6489.8
Simplified89.8%
if -1.7e27 < x < 6.1999999999999999e36Initial program 99.9%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6496.3
Simplified96.3%
if 6.1999999999999999e36 < x Initial program 99.6%
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.f6488.1
Simplified88.1%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6488.1
Simplified88.1%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma x (log y) (- y)))) (if (<= x -2e+32) t_1 (if (<= x 2.3e+38) (- (log t) (+ y z)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(x, log(y), -y);
double tmp;
if (x <= -2e+32) {
tmp = t_1;
} else if (x <= 2.3e+38) {
tmp = log(t) - (y + z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(x, log(y), Float64(-y)) tmp = 0.0 if (x <= -2e+32) tmp = t_1; elseif (x <= 2.3e+38) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision] + (-y)), $MachinePrecision]}, If[LessEqual[x, -2e+32], t$95$1, If[LessEqual[x, 2.3e+38], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \log y, -y\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.00000000000000011e32 or 2.3000000000000001e38 < x Initial program 99.7%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.5
Simplified99.5%
Taylor expanded in z around 0
sub-negN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
neg-lowering-neg.f6485.2
Simplified85.2%
if -2.00000000000000011e32 < x < 2.3000000000000001e38Initial program 99.9%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6496.4
Simplified96.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y)))) (if (<= x -1.95e+123) t_1 (if (<= x 8.5e+38) (- (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 <= -1.95e+123) {
tmp = t_1;
} else if (x <= 8.5e+38) {
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 <= (-1.95d+123)) then
tmp = t_1
else if (x <= 8.5d+38) 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 <= -1.95e+123) {
tmp = t_1;
} else if (x <= 8.5e+38) {
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 <= -1.95e+123: tmp = t_1 elif x <= 8.5e+38: 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 <= -1.95e+123) tmp = t_1; elseif (x <= 8.5e+38) 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 <= -1.95e+123) tmp = t_1; elseif (x <= 8.5e+38) 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, -1.95e+123], t$95$1, If[LessEqual[x, 8.5e+38], 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 -1.95 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+38}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.94999999999999996e123 or 8.4999999999999997e38 < x Initial program 99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6475.1
Simplified75.1%
if -1.94999999999999996e123 < x < 8.4999999999999997e38Initial program 99.9%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6494.0
Simplified94.0%
(FPCore (x y z t) :precision binary64 (if (<= y 5.1e+51) (- y z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 5.1e+51) {
tmp = y - 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 <= 5.1d+51) then
tmp = y - 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 <= 5.1e+51) {
tmp = y - z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 5.1e+51: tmp = y - z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 5.1e+51) tmp = Float64(y - z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 5.1e+51) tmp = y - z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 5.1e+51], N[(y - z), $MachinePrecision], (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.1 \cdot 10^{+51}:\\
\;\;\;\;y - z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 5.1000000000000001e51Initial program 99.8%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6479.2
Simplified79.2%
Taylor expanded in x around 0
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6441.3
Simplified41.3%
neg-sub0N/A
flip3--N/A
metadata-evalN/A
cube-unmultN/A
neg-sub0N/A
cube-unmultN/A
cube-negN/A
sqr-powN/A
unpow-prod-downN/A
sqr-negN/A
unpow-prod-downN/A
sqr-powN/A
metadata-evalN/A
mul0-lftN/A
metadata-evalN/A
mul0-lftN/A
sub-negN/A
+-lft-identityN/A
mul0-lftN/A
--rgt-identityN/A
pow2N/A
pow-divN/A
metadata-evalN/A
unpow1N/A
Applied egg-rr39.3%
if 5.1000000000000001e51 < y Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
neg-lowering-neg.f6474.0
Simplified74.0%
(FPCore (x y z t) :precision binary64 (if (<= y 3.6e+49) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 3.6e+49) {
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 <= 3.6d+49) 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 <= 3.6e+49) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 3.6e+49: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 3.6e+49) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 3.6e+49) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 3.6e+49], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.6 \cdot 10^{+49}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 3.59999999999999996e49Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6439.2
Simplified39.2%
if 3.59999999999999996e49 < y Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
neg-lowering-neg.f6474.0
Simplified74.0%
(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%
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.f6486.6
Simplified86.6%
Taylor expanded in x around 0
distribute-lft-inN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-lowering-neg.f6457.7
Simplified57.7%
(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%
Taylor expanded in y around inf
mul-1-negN/A
neg-lowering-neg.f6429.6
Simplified29.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 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%
Taylor expanded in y around inf
mul-1-negN/A
neg-lowering-neg.f6429.6
Simplified29.6%
neg-sub0N/A
sub-negN/A
flip3-+N/A
/-lowering-/.f64N/A
metadata-evalN/A
sqr-powN/A
pow-prod-downN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
sqr-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
neg-lowering-neg.f641.5
Applied egg-rr1.5%
+-lft-identityN/A
cube-unmultN/A
+-lft-identityN/A
mul0-lftN/A
--rgt-identityN/A
pow2N/A
pow-divN/A
metadata-evalN/A
unpow12.3
Applied egg-rr2.3%
herbie shell --seed 2024205
(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)))