
(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 14 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))) (t_2 (- t_1 y)))
(if (<= t_2 -5.3e+296)
t_1
(if (<= t_2 -2000.0) (- (- y) z) (if (<= t_2 5e+87) (- (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 <= -5.3e+296) {
tmp = t_1;
} else if (t_2 <= -2000.0) {
tmp = -y - z;
} else if (t_2 <= 5e+87) {
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 <= (-5.3d+296)) then
tmp = t_1
else if (t_2 <= (-2000.0d0)) then
tmp = -y - z
else if (t_2 <= 5d+87) 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 <= -5.3e+296) {
tmp = t_1;
} else if (t_2 <= -2000.0) {
tmp = -y - z;
} else if (t_2 <= 5e+87) {
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 <= -5.3e+296: tmp = t_1 elif t_2 <= -2000.0: tmp = -y - z elif t_2 <= 5e+87: 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 <= -5.3e+296) tmp = t_1; elseif (t_2 <= -2000.0) tmp = Float64(Float64(-y) - z); elseif (t_2 <= 5e+87) 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 <= -5.3e+296) tmp = t_1; elseif (t_2 <= -2000.0) tmp = -y - z; elseif (t_2 <= 5e+87) 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, -5.3e+296], t$95$1, If[LessEqual[t$95$2, -2000.0], N[((-y) - z), $MachinePrecision], If[LessEqual[t$95$2, 5e+87], 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 -5.3 \cdot 10^{+296}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2000:\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+87}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -5.3000000000000004e296 or 4.9999999999999998e87 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6479.5
Simplified79.5%
if -5.3000000000000004e296 < (-.f64 (*.f64 x (log.f64 y)) y) < -2e3Initial 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.2
Simplified98.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.f6471.5
Simplified71.5%
if -2e3 < (-.f64 (*.f64 x (log.f64 y)) y) < 4.9999999999999998e87Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6491.3
Simplified91.3%
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6491.3
Applied egg-rr91.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- (* x (log y)) y) z))) (if (<= t_1 -2000.0) (- (- y) z) (if (<= t_1 4e-9) (log t) (- z)))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * log(y)) - y) - z;
double tmp;
if (t_1 <= -2000.0) {
tmp = -y - z;
} else if (t_1 <= 4e-9) {
tmp = log(t);
} else {
tmp = -z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((x * log(y)) - y) - z
if (t_1 <= (-2000.0d0)) then
tmp = -y - z
else if (t_1 <= 4d-9) then
tmp = log(t)
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = ((x * Math.log(y)) - y) - z;
double tmp;
if (t_1 <= -2000.0) {
tmp = -y - z;
} else if (t_1 <= 4e-9) {
tmp = Math.log(t);
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x * math.log(y)) - y) - z tmp = 0 if t_1 <= -2000.0: tmp = -y - z elif t_1 <= 4e-9: tmp = math.log(t) else: tmp = -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 <= -2000.0) tmp = Float64(Float64(-y) - z); elseif (t_1 <= 4e-9) tmp = log(t); else tmp = Float64(-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 <= -2000.0) tmp = -y - z; elseif (t_1 <= 4e-9) tmp = log(t); else tmp = -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, -2000.0], N[((-y) - z), $MachinePrecision], If[LessEqual[t$95$1, 4e-9], N[Log[t], $MachinePrecision], (-z)]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \log y - y\right) - z\\
\mathbf{if}\;t\_1 \leq -2000:\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-9}:\\
\;\;\;\;\log t\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -2e3Initial 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.4
Simplified98.4%
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.4
Simplified71.4%
if -2e3 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 4.00000000000000025e-9Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6496.9
Simplified96.9%
Taylor expanded in z around 0
log-lowering-log.f6496.8
Simplified96.8%
if 4.00000000000000025e-9 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.7%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6451.0
Simplified51.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (+ -1.0 (/ (- (* x (log y)) y) z)))))
(if (<= z -215.0)
t_1
(if (<= z 3.9e-7) (fma x (log y) (- (log t) y)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = z * (-1.0 + (((x * log(y)) - y) / z));
double tmp;
if (z <= -215.0) {
tmp = t_1;
} else if (z <= 3.9e-7) {
tmp = fma(x, log(y), (log(t) - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(z * Float64(-1.0 + Float64(Float64(Float64(x * log(y)) - y) / z))) tmp = 0.0 if (z <= -215.0) tmp = t_1; elseif (z <= 3.9e-7) 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[(z * N[(-1.0 + N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -215.0], t$95$1, If[LessEqual[z, 3.9e-7], 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 := z \cdot \left(-1 + \frac{x \cdot \log y - y}{z}\right)\\
\mathbf{if}\;z \leq -215:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -215 or 3.90000000000000025e-7 < 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.1
Simplified99.1%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate--r+N/A
div-subN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6499.3
Simplified99.3%
if -215 < z < 3.90000000000000025e-7Initial program 99.8%
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.8
Simplified99.8%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (<= (- (* x (log y)) y) -2000.0) (- (- y) z) (- (log t) z)))
double code(double x, double y, double z, double t) {
double tmp;
if (((x * log(y)) - y) <= -2000.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) <= (-2000.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) <= -2000.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) <= -2000.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) <= -2000.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) <= -2000.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], -2000.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 -2000:\\
\;\;\;\;\left(-y\right) - z\\
\mathbf{else}:\\
\;\;\;\;\log t - z\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -2e3Initial 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.2
Simplified98.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.f6468.3
Simplified68.3%
if -2e3 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6470.8
Simplified70.8%
+-commutativeN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6470.8
Applied egg-rr70.8%
(FPCore (x y z t) :precision binary64 (if (<= y 0.0068) (fma x (log y) (- (log t) z)) (* y (+ (/ (- (* x (log y)) z) y) -1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 0.0068) {
tmp = fma(x, log(y), (log(t) - z));
} else {
tmp = y * ((((x * log(y)) - z) / y) + -1.0);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 0.0068) tmp = fma(x, log(y), Float64(log(t) - z)); else tmp = Float64(y * Float64(Float64(Float64(Float64(x * log(y)) - z) / y) + -1.0)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 0.0068], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.0068:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{x \cdot \log y - z}{y} + -1\right)\\
\end{array}
\end{array}
if y < 0.00679999999999999962Initial 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.4
Simplified99.4%
if 0.00679999999999999962 < y 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.6
Simplified98.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate--r+N/A
associate-*r/N/A
div-subN/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified98.8%
Final simplification99.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (- (log y) (/ (+ y z) x))))) (if (<= x -16800000000000.0) t_1 (if (<= x 1.85) (- (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 <= -16800000000000.0) {
tmp = t_1;
} else if (x <= 1.85) {
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 <= (-16800000000000.0d0)) then
tmp = t_1
else if (x <= 1.85d0) 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 <= -16800000000000.0) {
tmp = t_1;
} else if (x <= 1.85) {
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 <= -16800000000000.0: tmp = t_1 elif x <= 1.85: 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 <= -16800000000000.0) tmp = t_1; elseif (x <= 1.85) 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 <= -16800000000000.0) tmp = t_1; elseif (x <= 1.85) 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, -16800000000000.0], t$95$1, If[LessEqual[x, 1.85], 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 -16800000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.85:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.68e13 or 1.8500000000000001 < 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.0
Simplified99.0%
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
Simplified99.1%
if -1.68e13 < x < 1.8500000000000001Initial 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 (* x (log y))) (t_2 (- t_1 z)))
(if (<= x -3.4e+85)
(- t_1 y)
(if (<= x -2.45e+14) t_2 (if (<= x 3.1e+96) (- (log t) (+ y z)) t_2)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - z;
double tmp;
if (x <= -3.4e+85) {
tmp = t_1 - y;
} else if (x <= -2.45e+14) {
tmp = t_2;
} else if (x <= 3.1e+96) {
tmp = log(t) - (y + z);
} 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)
t_2 = t_1 - z
if (x <= (-3.4d+85)) then
tmp = t_1 - y
else if (x <= (-2.45d+14)) then
tmp = t_2
else if (x <= 3.1d+96) then
tmp = log(t) - (y + z)
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);
double t_2 = t_1 - z;
double tmp;
if (x <= -3.4e+85) {
tmp = t_1 - y;
} else if (x <= -2.45e+14) {
tmp = t_2;
} else if (x <= 3.1e+96) {
tmp = Math.log(t) - (y + z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - z tmp = 0 if x <= -3.4e+85: tmp = t_1 - y elif x <= -2.45e+14: tmp = t_2 elif x <= 3.1e+96: tmp = math.log(t) - (y + z) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - z) tmp = 0.0 if (x <= -3.4e+85) tmp = Float64(t_1 - y); elseif (x <= -2.45e+14) tmp = t_2; elseif (x <= 3.1e+96) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - z; tmp = 0.0; if (x <= -3.4e+85) tmp = t_1 - y; elseif (x <= -2.45e+14) tmp = t_2; elseif (x <= 3.1e+96) tmp = log(t) - (y + z); else tmp = t_2; 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 - z), $MachinePrecision]}, If[LessEqual[x, -3.4e+85], N[(t$95$1 - y), $MachinePrecision], If[LessEqual[x, -2.45e+14], t$95$2, If[LessEqual[x, 3.1e+96], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - z\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+85}:\\
\;\;\;\;t\_1 - y\\
\mathbf{elif}\;x \leq -2.45 \cdot 10^{+14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+96}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -3.4000000000000003e85Initial program 99.6%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3-+N/A
Applied egg-rr99.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6499.4
Simplified99.4%
Taylor expanded in z around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6487.9
Simplified87.9%
if -3.4000000000000003e85 < x < -2.45e14 or 3.0999999999999998e96 < 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.5
Simplified99.5%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6489.8
Simplified89.8%
if -2.45e14 < x < 3.0999999999999998e96Initial program 100.0%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6494.6
Simplified94.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) y))) (if (<= x -2.4e+85) t_1 (if (<= x 1.45e+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 <= -2.4e+85) {
tmp = t_1;
} else if (x <= 1.45e+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 <= (-2.4d+85)) then
tmp = t_1
else if (x <= 1.45d+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 <= -2.4e+85) {
tmp = t_1;
} else if (x <= 1.45e+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 <= -2.4e+85: tmp = t_1 elif x <= 1.45e+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 <= -2.4e+85) tmp = t_1; elseif (x <= 1.45e+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 <= -2.4e+85) tmp = t_1; elseif (x <= 1.45e+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, -2.4e+85], t$95$1, If[LessEqual[x, 1.45e+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 -2.4 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+29}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.39999999999999997e85 or 1.45e29 < 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
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6483.0
Simplified83.0%
if -2.39999999999999997e85 < x < 1.45e29Initial program 100.0%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6493.0
Simplified93.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y)))) (if (<= x -5e+136) t_1 (if (<= x 2.9e+131) (- (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 <= -5e+136) {
tmp = t_1;
} else if (x <= 2.9e+131) {
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 <= (-5d+136)) then
tmp = t_1
else if (x <= 2.9d+131) 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 <= -5e+136) {
tmp = t_1;
} else if (x <= 2.9e+131) {
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 <= -5e+136: tmp = t_1 elif x <= 2.9e+131: 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 <= -5e+136) tmp = t_1; elseif (x <= 2.9e+131) 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 <= -5e+136) tmp = t_1; elseif (x <= 2.9e+131) 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, -5e+136], t$95$1, If[LessEqual[x, 2.9e+131], 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 -5 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+131}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.0000000000000002e136 or 2.9000000000000001e131 < x Initial program 99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6476.3
Simplified76.3%
if -5.0000000000000002e136 < x < 2.9000000000000001e131Initial program 99.9%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6486.2
Simplified86.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- y) z))) (if (<= z -250.0) t_1 (if (<= z 9.2e+16) (- (log t) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = -y - z;
double tmp;
if (z <= -250.0) {
tmp = t_1;
} else if (z <= 9.2e+16) {
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 = -y - z
if (z <= (-250.0d0)) then
tmp = t_1
else if (z <= 9.2d+16) 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 = -y - z;
double tmp;
if (z <= -250.0) {
tmp = t_1;
} else if (z <= 9.2e+16) {
tmp = Math.log(t) - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -y - z tmp = 0 if z <= -250.0: tmp = t_1 elif z <= 9.2e+16: tmp = math.log(t) - y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-y) - z) tmp = 0.0 if (z <= -250.0) tmp = t_1; elseif (z <= 9.2e+16) tmp = Float64(log(t) - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -y - z; tmp = 0.0; if (z <= -250.0) tmp = t_1; elseif (z <= 9.2e+16) tmp = log(t) - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-y) - z), $MachinePrecision]}, If[LessEqual[z, -250.0], t$95$1, If[LessEqual[z, 9.2e+16], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) - z\\
\mathbf{if}\;z \leq -250:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+16}:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -250 or 9.2e16 < 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.1
Simplified99.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.f6480.4
Simplified80.4%
if -250 < z < 9.2e16Initial program 99.8%
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.4
Simplified99.4%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f6459.2
Simplified59.2%
(FPCore (x y z t) :precision binary64 (if (<= y 4e+150) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 4e+150) {
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 <= 4d+150) 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 <= 4e+150) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 4e+150: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 4e+150) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 4e+150) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 4e+150], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4 \cdot 10^{+150}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 3.99999999999999992e150Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
neg-lowering-neg.f6439.0
Simplified39.0%
if 3.99999999999999992e150 < y Initial program 100.0%
Taylor expanded in y around inf
mul-1-negN/A
neg-lowering-neg.f6482.7
Simplified82.7%
(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.f6484.8
Simplified84.8%
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.f6455.6
Simplified55.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%
Taylor expanded in y around inf
mul-1-negN/A
neg-lowering-neg.f6425.0
Simplified25.0%
herbie shell --seed 2024199
(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)))