
(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.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x (log y)) y)) (t_2 (fma x (log y) (- z))))
(if (<= t_1 -5000000000000.0)
(* y (+ (/ t_2 y) -1.0))
(if (<= t_1 4e-13) (- (log t) (+ y z)) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double t_2 = fma(x, log(y), -z);
double tmp;
if (t_1 <= -5000000000000.0) {
tmp = y * ((t_2 / y) + -1.0);
} else if (t_1 <= 4e-13) {
tmp = log(t) - (y + z);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) t_2 = fma(x, log(y), Float64(-z)) tmp = 0.0 if (t_1 <= -5000000000000.0) tmp = Float64(y * Float64(Float64(t_2 / y) + -1.0)); elseif (t_1 <= 4e-13) tmp = Float64(log(t) - Float64(y + z)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision] + (-z)), $MachinePrecision]}, If[LessEqual[t$95$1, -5000000000000.0], N[(y * N[(N[(t$95$2 / y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e-13], 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 - y\\
t_2 := \mathsf{fma}\left(x, \log y, -z\right)\\
\mathbf{if}\;t\_1 \leq -5000000000000:\\
\;\;\;\;y \cdot \left(\frac{t\_2}{y} + -1\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-13}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -5e12Initial program 99.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.7
Simplified99.7%
Taylor expanded in y around inf
lower-*.f64N/A
+-commutativeN/A
associate--r+N/A
Simplified91.9%
if -5e12 < (-.f64 (*.f64 x (log.f64 y)) y) < 4.0000000000000001e-13Initial program 100.0%
Taylor expanded in x around 0
lower--.f64N/A
lower-log.f64N/A
lower-+.f6499.9
Simplified99.9%
if 4.0000000000000001e-13 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.7%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
lower-log.f64N/A
unsub-negN/A
lower--.f64N/A
lower-log.f6499.7
Simplified99.7%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6499.6
Simplified99.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x (log y)) y)))
(if (<= t_1 -5000000000000.0)
(fma (fma (log y) (/ x y) -1.0) y (- z))
(if (<= t_1 4e-13) (- (log t) (+ y z)) (fma x (log y) (- z))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double tmp;
if (t_1 <= -5000000000000.0) {
tmp = fma(fma(log(y), (x / y), -1.0), y, -z);
} else if (t_1 <= 4e-13) {
tmp = log(t) - (y + z);
} else {
tmp = fma(x, log(y), -z);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) tmp = 0.0 if (t_1 <= -5000000000000.0) tmp = fma(fma(log(y), Float64(x / y), -1.0), y, Float64(-z)); elseif (t_1 <= 4e-13) tmp = Float64(log(t) - Float64(y + z)); else tmp = fma(x, log(y), Float64(-z)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, -5000000000000.0], N[(N[(N[Log[y], $MachinePrecision] * N[(x / y), $MachinePrecision] + -1.0), $MachinePrecision] * y + (-z)), $MachinePrecision], If[LessEqual[t$95$1, 4e-13], N[(N[Log[t], $MachinePrecision] - N[(y + z), $MachinePrecision]), $MachinePrecision], N[(x * N[Log[y], $MachinePrecision] + (-z)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;t\_1 \leq -5000000000000:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\log y, \frac{x}{y}, -1\right), y, -z\right)\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-13}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, -z\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -5e12Initial program 99.9%
Taylor expanded in y around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
log-recN/A
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-frac-negN/A
remove-double-negN/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f6492.0
Simplified92.0%
lift-log.f64N/A
lift-/.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
lift-log.f64N/A
sub-negN/A
lift-neg.f64N/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lift-+.f64N/A
lower-fma.f6492.0
Applied egg-rr91.9%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6491.9
Simplified91.9%
if -5e12 < (-.f64 (*.f64 x (log.f64 y)) y) < 4.0000000000000001e-13Initial program 100.0%
Taylor expanded in x around 0
lower--.f64N/A
lower-log.f64N/A
lower-+.f6499.9
Simplified99.9%
if 4.0000000000000001e-13 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.7%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
lower-log.f64N/A
unsub-negN/A
lower--.f64N/A
lower-log.f6499.7
Simplified99.7%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6499.6
Simplified99.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- (* x (log y)) y) z))) (if (<= t_1 -20000000000.0) (- (- z) y) (if (<= t_1 4e-13) (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 <= -20000000000.0) {
tmp = -z - y;
} else if (t_1 <= 4e-13) {
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 <= (-20000000000.0d0)) then
tmp = -z - y
else if (t_1 <= 4d-13) 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 <= -20000000000.0) {
tmp = -z - y;
} else if (t_1 <= 4e-13) {
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 <= -20000000000.0: tmp = -z - y elif t_1 <= 4e-13: 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 <= -20000000000.0) tmp = Float64(Float64(-z) - y); elseif (t_1 <= 4e-13) 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 <= -20000000000.0) tmp = -z - y; elseif (t_1 <= 4e-13) 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, -20000000000.0], N[((-z) - y), $MachinePrecision], If[LessEqual[t$95$1, 4e-13], 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 -20000000000:\\
\;\;\;\;\left(-z\right) - y\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-13}:\\
\;\;\;\;\log t\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < -2e10Initial program 99.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.4
Simplified99.4%
Taylor expanded in x around 0
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
sub-negN/A
lower--.f64N/A
lower-neg.f6474.7
Simplified74.7%
if -2e10 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) < 4.0000000000000001e-13Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6497.6
Simplified97.6%
Taylor expanded in z around 0
lower-log.f6497.0
Simplified97.0%
if 4.0000000000000001e-13 < (-.f64 (-.f64 (*.f64 x (log.f64 y)) y) z) Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6447.5
Simplified47.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- t_1 y)))
(if (<= t_2 -30000000000.0)
(- (- z) y)
(if (<= t_2 1e+111) (- (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 <= -30000000000.0) {
tmp = -z - y;
} else if (t_2 <= 1e+111) {
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 <= (-30000000000.0d0)) then
tmp = -z - y
else if (t_2 <= 1d+111) 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 <= -30000000000.0) {
tmp = -z - y;
} else if (t_2 <= 1e+111) {
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 <= -30000000000.0: tmp = -z - y elif t_2 <= 1e+111: 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 <= -30000000000.0) tmp = Float64(Float64(-z) - y); elseif (t_2 <= 1e+111) 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 <= -30000000000.0) tmp = -z - y; elseif (t_2 <= 1e+111) 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, -30000000000.0], N[((-z) - y), $MachinePrecision], If[LessEqual[t$95$2, 1e+111], 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 -30000000000:\\
\;\;\;\;\left(-z\right) - y\\
\mathbf{elif}\;t\_2 \leq 10^{+111}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -3e10Initial program 99.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.4
Simplified99.4%
Taylor expanded in x around 0
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
sub-negN/A
lower--.f64N/A
lower-neg.f6472.7
Simplified72.7%
if -3e10 < (-.f64 (*.f64 x (log.f64 y)) y) < 9.99999999999999957e110Initial program 100.0%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6495.2
Simplified95.2%
lift-neg.f64N/A
lift-log.f64N/A
+-commutativeN/A
lift-neg.f64N/A
sub-negN/A
lift--.f6495.2
Applied egg-rr95.2%
if 9.99999999999999957e110 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6490.5
Simplified90.5%
(FPCore (x y z t) :precision binary64 (if (<= y 420000000.0) (fma x (log y) (- (log t) z)) (* y (+ (/ (fma x (log y) (- z)) y) -1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 420000000.0) {
tmp = fma(x, log(y), (log(t) - z));
} else {
tmp = y * ((fma(x, log(y), -z) / y) + -1.0);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 420000000.0) tmp = fma(x, log(y), Float64(log(t) - z)); else tmp = Float64(y * Float64(Float64(fma(x, log(y), Float64(-z)) / y) + -1.0)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 420000000.0], N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(x * N[Log[y], $MachinePrecision] + (-z)), $MachinePrecision] / y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 420000000:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, \log t - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{\mathsf{fma}\left(x, \log y, -z\right)}{y} + -1\right)\\
\end{array}
\end{array}
if y < 4.2e8Initial program 99.8%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
associate-+l+N/A
lower-fma.f64N/A
lower-log.f64N/A
unsub-negN/A
lower--.f64N/A
lower-log.f6499.2
Simplified99.2%
if 4.2e8 < y Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.4
Simplified99.4%
Taylor expanded in y around inf
lower-*.f64N/A
+-commutativeN/A
associate--r+N/A
Simplified99.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ 1.0 (/ 1.0 (- (* x (log y)) (+ y z)))))) (if (<= x -19000.0) t_1 (if (<= x 0.98) (- (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 <= -19000.0) {
tmp = t_1;
} else if (x <= 0.98) {
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 <= (-19000.0d0)) then
tmp = t_1
else if (x <= 0.98d0) 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 <= -19000.0) {
tmp = t_1;
} else if (x <= 0.98) {
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 <= -19000.0: tmp = t_1 elif x <= 0.98: 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 <= -19000.0) tmp = t_1; elseif (x <= 0.98) 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 <= -19000.0) tmp = t_1; elseif (x <= 0.98) 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, -19000.0], t$95$1, If[LessEqual[x, 0.98], 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 -19000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 0.98:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -19000 or 0.97999999999999998 < x Initial program 99.8%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.6
Simplified99.6%
if -19000 < x < 0.97999999999999998Initial program 100.0%
Taylor expanded in x around 0
lower--.f64N/A
lower-log.f64N/A
lower-+.f64100.0
Simplified100.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x (log y)) y))) (if (<= x -3.05e+68) t_1 (if (<= x 2.6e+25) (- (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 <= -3.05e+68) {
tmp = t_1;
} else if (x <= 2.6e+25) {
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 <= (-3.05d+68)) then
tmp = t_1
else if (x <= 2.6d+25) 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 <= -3.05e+68) {
tmp = t_1;
} else if (x <= 2.6e+25) {
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 <= -3.05e+68: tmp = t_1 elif x <= 2.6e+25: 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 <= -3.05e+68) tmp = t_1; elseif (x <= 2.6e+25) 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 <= -3.05e+68) tmp = t_1; elseif (x <= 2.6e+25) 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, -3.05e+68], t$95$1, If[LessEqual[x, 2.6e+25], 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 -3.05 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+25}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.05e68 or 2.5999999999999998e25 < x Initial program 99.8%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.6
Simplified99.6%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower-log.f6487.8
Simplified87.8%
if -3.05e68 < x < 2.5999999999999998e25Initial program 100.0%
Taylor expanded in x around 0
lower--.f64N/A
lower-log.f64N/A
lower-+.f6498.2
Simplified98.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y)))) (if (<= x -2.8e+111) t_1 (if (<= x 5e+32) (- (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.8e+111) {
tmp = t_1;
} else if (x <= 5e+32) {
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.8d+111)) then
tmp = t_1
else if (x <= 5d+32) 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.8e+111) {
tmp = t_1;
} else if (x <= 5e+32) {
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.8e+111: tmp = t_1 elif x <= 5e+32: 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.8e+111) tmp = t_1; elseif (x <= 5e+32) 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.8e+111) tmp = t_1; elseif (x <= 5e+32) 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.8e+111], t$95$1, If[LessEqual[x, 5e+32], 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.8 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+32}:\\
\;\;\;\;\log t - \left(y + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.7999999999999999e111 or 4.9999999999999997e32 < x Initial program 99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6469.5
Simplified69.5%
if -2.7999999999999999e111 < x < 4.9999999999999997e32Initial program 100.0%
Taylor expanded in x around 0
lower--.f64N/A
lower-log.f64N/A
lower-+.f6496.1
Simplified96.1%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- z) y))) (if (<= z -8.2e-24) t_1 (if (<= z 4.8e-10) (- (log t) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = -z - y;
double tmp;
if (z <= -8.2e-24) {
tmp = t_1;
} else if (z <= 4.8e-10) {
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 = -z - y
if (z <= (-8.2d-24)) then
tmp = t_1
else if (z <= 4.8d-10) 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 = -z - y;
double tmp;
if (z <= -8.2e-24) {
tmp = t_1;
} else if (z <= 4.8e-10) {
tmp = Math.log(t) - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -z - y tmp = 0 if z <= -8.2e-24: tmp = t_1 elif z <= 4.8e-10: tmp = math.log(t) - y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-z) - y) tmp = 0.0 if (z <= -8.2e-24) tmp = t_1; elseif (z <= 4.8e-10) tmp = Float64(log(t) - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -z - y; tmp = 0.0; if (z <= -8.2e-24) tmp = t_1; elseif (z <= 4.8e-10) tmp = log(t) - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-z) - y), $MachinePrecision]}, If[LessEqual[z, -8.2e-24], t$95$1, If[LessEqual[z, 4.8e-10], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-z\right) - y\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-10}:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.20000000000000029e-24 or 4.8e-10 < z Initial program 99.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.6
Simplified99.6%
Taylor expanded in x around 0
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
sub-negN/A
lower--.f64N/A
lower-neg.f6473.6
Simplified73.6%
if -8.20000000000000029e-24 < z < 4.8e-10Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6468.8
Simplified68.8%
lift-neg.f64N/A
lift-log.f64N/A
+-commutativeN/A
lift-neg.f64N/A
unsub-negN/A
lower--.f6468.8
Applied egg-rr68.8%
(FPCore (x y z t) :precision binary64 (if (<= y 280.0) (- (log t) z) (- (- z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 280.0) {
tmp = log(t) - z;
} else {
tmp = -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) :: tmp
if (y <= 280.0d0) then
tmp = log(t) - z
else
tmp = -z - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 280.0) {
tmp = Math.log(t) - z;
} else {
tmp = -z - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 280.0: tmp = math.log(t) - z else: tmp = -z - y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 280.0) tmp = Float64(log(t) - z); else tmp = Float64(Float64(-z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 280.0) tmp = log(t) - z; else tmp = -z - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 280.0], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[((-z) - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 280:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) - y\\
\end{array}
\end{array}
if y < 280Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6460.7
Simplified60.7%
lift-neg.f64N/A
lift-log.f64N/A
+-commutativeN/A
lift-neg.f64N/A
sub-negN/A
lift--.f6460.7
Applied egg-rr60.7%
if 280 < y Initial program 100.0%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6499.4
Simplified99.4%
Taylor expanded in x around 0
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
sub-negN/A
lower--.f64N/A
lower-neg.f6481.6
Simplified81.6%
(FPCore (x y z t) :precision binary64 (if (<= z -1.25e+17) (- z) (if (<= z 1.7e+45) (- y) (- z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.25e+17) {
tmp = -z;
} else if (z <= 1.7e+45) {
tmp = -y;
} 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) :: tmp
if (z <= (-1.25d+17)) then
tmp = -z
else if (z <= 1.7d+45) then
tmp = -y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.25e+17) {
tmp = -z;
} else if (z <= 1.7e+45) {
tmp = -y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.25e+17: tmp = -z elif z <= 1.7e+45: tmp = -y else: tmp = -z return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.25e+17) tmp = Float64(-z); elseif (z <= 1.7e+45) tmp = Float64(-y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.25e+17) tmp = -z; elseif (z <= 1.7e+45) tmp = -y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.25e+17], (-z), If[LessEqual[z, 1.7e+45], (-y), (-z)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+17}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+45}:\\
\;\;\;\;-y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if z < -1.25e17 or 1.7e45 < z Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6463.4
Simplified63.4%
if -1.25e17 < z < 1.7e45Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6442.4
Simplified42.4%
(FPCore (x y z t) :precision binary64 (- (- z) y))
double code(double x, double y, double z, double t) {
return -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 = -z - y
end function
public static double code(double x, double y, double z, double t) {
return -z - y;
}
def code(x, y, z, t): return -z - y
function code(x, y, z, t) return Float64(Float64(-z) - y) end
function tmp = code(x, y, z, t) tmp = -z - y; end
code[x_, y_, z_, t_] := N[((-z) - y), $MachinePrecision]
\begin{array}{l}
\\
\left(-z\right) - y
\end{array}
Initial program 99.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6485.8
Simplified85.8%
Taylor expanded in x around 0
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
sub-negN/A
lower--.f64N/A
lower-neg.f6457.5
Simplified57.5%
(FPCore (x y z t) :precision binary64 (- y))
double code(double x, double y, double z, double t) {
return -y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -y
end function
public static double code(double x, double y, double z, double t) {
return -y;
}
def code(x, y, z, t): return -y
function code(x, y, z, t) return Float64(-y) end
function tmp = code(x, y, z, t) tmp = -y; end
code[x_, y_, z_, t_] := (-y)
\begin{array}{l}
\\
-y
\end{array}
Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-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.9%
lift-log.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-log.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in y around inf
lower-/.f6429.6
Simplified29.6%
frac-2negN/A
metadata-evalN/A
lift-neg.f64N/A
inv-powN/A
pow-flipN/A
metadata-evalN/A
metadata-evalN/A
pow-divN/A
sqr-powN/A
unpow-prod-downN/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
unpow-prod-downN/A
sqr-powN/A
pow2N/A
lift-neg.f64N/A
lift-neg.f64N/A
sqr-negN/A
pow2N/A
pow-divN/A
metadata-evalN/A
unpow12.0
Applied egg-rr2.0%
herbie shell --seed 2024207
(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)))