
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (fma (+ a -0.5) (log t) (- (log z) t))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + fma((a + -0.5), log(t), (log(z) - t));
}
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + fma(Float64(a + -0.5), log(t), Float64(log(z) - t))) end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \mathsf{fma}\left(a + -0.5, \log t, \log z - t\right)
\end{array}
Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (+ a -0.5) (log t) (- t))))
(if (<= a -1.86e+34)
t_1
(if (<= a -1.7e-125)
(- (+ (* (log t) (- a 0.5)) (log (* y z))) t)
(if (<= a 1.0) (- (+ (log y) (log (* z (pow t -0.5)))) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((a + -0.5), log(t), -t);
double tmp;
if (a <= -1.86e+34) {
tmp = t_1;
} else if (a <= -1.7e-125) {
tmp = ((log(t) * (a - 0.5)) + log((y * z))) - t;
} else if (a <= 1.0) {
tmp = (log(y) + log((z * pow(t, -0.5)))) - t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(a + -0.5), log(t), Float64(-t)) tmp = 0.0 if (a <= -1.86e+34) tmp = t_1; elseif (a <= -1.7e-125) tmp = Float64(Float64(Float64(log(t) * Float64(a - 0.5)) + log(Float64(y * z))) - t); elseif (a <= 1.0) tmp = Float64(Float64(log(y) + log(Float64(z * (t ^ -0.5)))) - t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]}, If[LessEqual[a, -1.86e+34], t$95$1, If[LessEqual[a, -1.7e-125], N[(N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 1.0], N[(N[(N[Log[y], $MachinePrecision] + N[Log[N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\mathbf{if}\;a \leq -1.86 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-125}:\\
\;\;\;\;\left(\log t \cdot \left(a - 0.5\right) + \log \left(y \cdot z\right)\right) - t\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;\left(\log y + \log \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.86e34 or 1 < a Initial program 99.5%
associate--l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
remove-double-neg99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
fma-udef99.5%
associate-+r+99.5%
+-commutative99.5%
fma-def99.5%
associate-+r-99.5%
sum-log74.1%
Applied egg-rr74.1%
Taylor expanded in t around inf 98.9%
neg-mul-198.9%
Simplified98.9%
if -1.86e34 < a < -1.69999999999999988e-125Initial program 99.4%
associate--l+99.5%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
remove-double-neg99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt46.2%
pow246.2%
+-commutative46.2%
fma-udef46.2%
associate-+r+46.2%
+-commutative46.2%
fma-def46.2%
associate-+r-46.0%
sum-log46.2%
Applied egg-rr46.2%
Taylor expanded in x around 0 53.7%
if -1.69999999999999988e-125 < a < 1Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 69.5%
Taylor expanded in a around 0 69.5%
associate-+r+69.5%
log-prod56.5%
*-commutative56.5%
Simplified56.5%
Taylor expanded in z around 0 69.5%
associate-+r+69.5%
+-commutative69.5%
log-prod56.5%
log-pow56.5%
log-prod51.3%
associate-*l*53.9%
Simplified53.9%
*-commutative53.9%
log-prod66.9%
Applied egg-rr66.9%
Final simplification81.4%
(FPCore (x y z t a) :precision binary64 (+ (+ (log (+ x y)) (- (log z) t)) (* (+ a -0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return (log((x + y)) + (log(z) - t)) + ((a + -0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log((x + y)) + (log(z) - t)) + ((a + (-0.5d0)) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log((x + y)) + (Math.log(z) - t)) + ((a + -0.5) * Math.log(t));
}
def code(x, y, z, t, a): return (math.log((x + y)) + (math.log(z) - t)) + ((a + -0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(log(Float64(x + y)) + Float64(log(z) - t)) + Float64(Float64(a + -0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = (log((x + y)) + (log(z) - t)) + ((a + -0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \left(a + -0.5\right) \cdot \log t
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 480.0) (+ (log z) (+ (* (log t) (- a 0.5)) (log y))) (fma (+ a -0.5) (log t) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 480.0) {
tmp = log(z) + ((log(t) * (a - 0.5)) + log(y));
} else {
tmp = fma((a + -0.5), log(t), -t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 480.0) tmp = Float64(log(z) + Float64(Float64(log(t) * Float64(a - 0.5)) + log(y))); else tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 480.0], N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 480:\\
\;\;\;\;\log z + \left(\log t \cdot \left(a - 0.5\right) + \log y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\end{array}
\end{array}
if t < 480Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 62.0%
Taylor expanded in t around 0 61.8%
if 480 < t Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
fma-udef99.8%
associate-+r+99.8%
+-commutative99.8%
fma-def99.8%
associate-+r-99.8%
sum-log73.3%
Applied egg-rr73.3%
Taylor expanded in t around inf 99.6%
neg-mul-199.6%
Simplified99.6%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 220.0) (+ (* (log t) (- a 0.5)) (+ (log z) (log y))) (fma (+ a -0.5) (log t) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 220.0) {
tmp = (log(t) * (a - 0.5)) + (log(z) + log(y));
} else {
tmp = fma((a + -0.5), log(t), -t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 220.0) tmp = Float64(Float64(log(t) * Float64(a - 0.5)) + Float64(log(z) + log(y))); else tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 220.0], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 220:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) + \left(\log z + \log y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\end{array}
\end{array}
if t < 220Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 62.0%
Taylor expanded in t around 0 61.8%
if 220 < t Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
fma-udef99.8%
associate-+r+99.8%
+-commutative99.8%
fma-def99.8%
associate-+r-99.8%
sum-log73.3%
Applied egg-rr73.3%
Taylor expanded in t around inf 99.6%
neg-mul-199.6%
Simplified99.6%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (+ (* (log t) (- a 0.5)) (log y))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + ((log(t) * (a - 0.5)) + log(y));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(z) - t) + ((log(t) * (a - 0.5d0)) + log(y))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + ((Math.log(t) * (a - 0.5)) + Math.log(y));
}
def code(x, y, z, t, a): return (math.log(z) - t) + ((math.log(t) * (a - 0.5)) + math.log(y))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(Float64(log(t) * Float64(a - 0.5)) + log(y))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + ((log(t) * (a - 0.5)) + log(y)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\log t \cdot \left(a - 0.5\right) + \log y\right)
\end{array}
Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 70.1%
Final simplification70.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (+ a -0.5) (log t))) (t_2 (+ t_1 (log (* z (+ x y))))))
(if (<= t 1.16e-142)
t_2
(if (<= t 1e-109)
(+ t_1 (log y))
(if (<= t 2.5e-26) t_2 (fma (+ a -0.5) (log t) (- t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a + -0.5) * log(t);
double t_2 = t_1 + log((z * (x + y)));
double tmp;
if (t <= 1.16e-142) {
tmp = t_2;
} else if (t <= 1e-109) {
tmp = t_1 + log(y);
} else if (t <= 2.5e-26) {
tmp = t_2;
} else {
tmp = fma((a + -0.5), log(t), -t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(a + -0.5) * log(t)) t_2 = Float64(t_1 + log(Float64(z * Float64(x + y)))) tmp = 0.0 if (t <= 1.16e-142) tmp = t_2; elseif (t <= 1e-109) tmp = Float64(t_1 + log(y)); elseif (t <= 2.5e-26) tmp = t_2; else tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.16e-142], t$95$2, If[LessEqual[t, 1e-109], N[(t$95$1 + N[Log[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-26], t$95$2, N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot \log t\\
t_2 := t_1 + \log \left(z \cdot \left(x + y\right)\right)\\
\mathbf{if}\;t \leq 1.16 \cdot 10^{-142}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 10^{-109}:\\
\;\;\;\;t_1 + \log y\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-26}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\end{array}
\end{array}
if t < 1.16e-142 or 9.9999999999999999e-110 < t < 2.5000000000000001e-26Initial program 99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in t around 0 99.3%
+-commutative99.3%
log-prod81.1%
+-commutative81.1%
Simplified81.1%
if 1.16e-142 < t < 9.9999999999999999e-110Initial program 99.0%
associate--l+99.0%
+-commutative99.0%
associate-+l+99.1%
+-commutative99.1%
fma-def99.1%
sub-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 79.2%
add-cube-cbrt79.2%
pow379.2%
Applied egg-rr79.2%
Taylor expanded in t around inf 78.9%
+-commutative78.9%
mul-1-neg78.9%
unsub-neg78.9%
log-rec78.9%
*-commutative78.9%
sub-neg78.9%
metadata-eval78.9%
Simplified78.9%
if 2.5000000000000001e-26 < t Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
fma-udef99.8%
associate-+r+99.8%
+-commutative99.8%
fma-def99.8%
associate-+r-99.8%
sum-log72.0%
Applied egg-rr72.0%
Taylor expanded in t around inf 95.4%
neg-mul-195.4%
Simplified95.4%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* (* y z) (pow t (+ a -0.5))))))
(if (<= t 1.25e-264)
t_1
(if (<= t 3.2e-45)
(+ (log (+ x y)) (* a (log t)))
(if (<= t 3.15e-27) t_1 (fma (+ a -0.5) (log t) (- t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(((y * z) * pow(t, (a + -0.5))));
double tmp;
if (t <= 1.25e-264) {
tmp = t_1;
} else if (t <= 3.2e-45) {
tmp = log((x + y)) + (a * log(t));
} else if (t <= 3.15e-27) {
tmp = t_1;
} else {
tmp = fma((a + -0.5), log(t), -t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = log(Float64(Float64(y * z) * (t ^ Float64(a + -0.5)))) tmp = 0.0 if (t <= 1.25e-264) tmp = t_1; elseif (t <= 3.2e-45) tmp = Float64(log(Float64(x + y)) + Float64(a * log(t))); elseif (t <= 3.15e-27) tmp = t_1; else tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(N[(y * z), $MachinePrecision] * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.25e-264], t$95$1, If[LessEqual[t, 3.2e-45], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.15e-27], t$95$1, N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(\left(y \cdot z\right) \cdot {t}^{\left(a + -0.5\right)}\right)\\
\mathbf{if}\;t \leq 1.25 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-45}:\\
\;\;\;\;\log \left(x + y\right) + a \cdot \log t\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\end{array}
\end{array}
if t < 1.25e-264 or 3.20000000000000007e-45 < t < 3.15000000000000005e-27Initial program 99.2%
associate--l+99.2%
+-commutative99.2%
associate-+l+99.2%
+-commutative99.2%
fma-def99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 57.0%
add-cube-cbrt56.5%
pow356.4%
Applied egg-rr56.4%
Taylor expanded in t around 0 57.1%
+-commutative57.1%
+-commutative57.1%
pow-base-157.1%
*-lft-identity57.1%
log-prod48.9%
log-pow45.5%
log-prod38.5%
sub-neg38.5%
metadata-eval38.5%
Simplified38.5%
if 1.25e-264 < t < 3.20000000000000007e-45Initial program 99.3%
associate--l+99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
remove-double-neg99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in a around inf 61.5%
*-commutative61.5%
Simplified61.5%
if 3.15000000000000005e-27 < t Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
remove-double-neg99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
+-commutative99.8%
fma-udef99.8%
associate-+r+99.8%
+-commutative99.8%
fma-def99.8%
associate-+r-99.8%
sum-log72.0%
Applied egg-rr72.0%
Taylor expanded in t around inf 95.4%
neg-mul-195.4%
Simplified95.4%
Final simplification77.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.2e-8) (not (<= a 4.8e-18))) (fma (+ a -0.5) (log t) (- t)) (- (+ (log (* y z)) (* -0.5 (log t))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.2e-8) || !(a <= 4.8e-18)) {
tmp = fma((a + -0.5), log(t), -t);
} else {
tmp = (log((y * z)) + (-0.5 * log(t))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.2e-8) || !(a <= 4.8e-18)) tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); else tmp = Float64(Float64(log(Float64(y * z)) + Float64(-0.5 * log(t))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9.2e-8], N[Not[LessEqual[a, 4.8e-18]], $MachinePrecision]], N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{-8} \lor \neg \left(a \leq 4.8 \cdot 10^{-18}\right):\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + -0.5 \cdot \log t\right) - t\\
\end{array}
\end{array}
if a < -9.2000000000000003e-8 or 4.79999999999999988e-18 < a Initial program 99.5%
associate--l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
fma-udef99.5%
associate-+r+99.5%
+-commutative99.5%
fma-def99.5%
associate-+r-99.5%
sum-log74.6%
Applied egg-rr74.6%
Taylor expanded in t around inf 96.5%
neg-mul-196.5%
Simplified96.5%
if -9.2000000000000003e-8 < a < 4.79999999999999988e-18Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 69.3%
Taylor expanded in a around 0 69.3%
associate-+r+69.3%
log-prod57.6%
*-commutative57.6%
Simplified57.6%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (<= z 2.4e+75) (- (+ (* (log t) (- a 0.5)) (log (* y z))) t) (fma (+ a -0.5) (log t) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2.4e+75) {
tmp = ((log(t) * (a - 0.5)) + log((y * z))) - t;
} else {
tmp = fma((a + -0.5), log(t), -t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= 2.4e+75) tmp = Float64(Float64(Float64(log(t) * Float64(a - 0.5)) + log(Float64(y * z))) - t); else tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2.4e+75], N[(N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.4 \cdot 10^{+75}:\\
\;\;\;\;\left(\log t \cdot \left(a - 0.5\right) + \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\end{array}
\end{array}
if z < 2.4e75Initial program 99.5%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
add-sqr-sqrt37.2%
pow237.2%
+-commutative37.2%
fma-udef37.2%
associate-+r+37.2%
+-commutative37.2%
fma-def37.2%
associate-+r-37.2%
sum-log34.8%
Applied egg-rr34.8%
Taylor expanded in x around 0 58.8%
if 2.4e75 < z Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
fma-udef99.6%
associate-+r+99.6%
+-commutative99.6%
fma-def99.6%
associate-+r-99.6%
sum-log46.1%
Applied egg-rr46.1%
Taylor expanded in t around inf 82.0%
neg-mul-182.0%
Simplified82.0%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e-160) (not (<= a 4e-18))) (fma (+ a -0.5) (log t) (- t)) (- (log (* y (* z (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e-160) || !(a <= 4e-18)) {
tmp = fma((a + -0.5), log(t), -t);
} else {
tmp = log((y * (z * pow(t, -0.5)))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e-160) || !(a <= 4e-18)) tmp = fma(Float64(a + -0.5), log(t), Float64(-t)); else tmp = Float64(log(Float64(y * Float64(z * (t ^ -0.5)))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e-160], N[Not[LessEqual[a, 4e-18]], $MachinePrecision]], N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{-160} \lor \neg \left(a \leq 4 \cdot 10^{-18}\right):\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, -t\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -1.8999999999999999e-160 or 4.0000000000000003e-18 < a Initial program 99.5%
associate--l+99.5%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
fma-udef99.6%
associate-+r+99.5%
+-commutative99.5%
fma-def99.5%
associate-+r-99.5%
sum-log73.3%
Applied egg-rr73.3%
Taylor expanded in t around inf 91.3%
neg-mul-191.3%
Simplified91.3%
if -1.8999999999999999e-160 < a < 4.0000000000000003e-18Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 69.0%
Taylor expanded in a around 0 69.0%
associate-+r+69.0%
log-prod58.8%
*-commutative58.8%
Simplified58.8%
Taylor expanded in z around 0 69.0%
associate-+r+69.0%
+-commutative69.0%
log-prod58.8%
log-pow58.8%
log-prod53.8%
associate-*l*55.7%
Simplified55.7%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (fma (+ a -0.5) (log t) (- t)))
double code(double x, double y, double z, double t, double a) {
return fma((a + -0.5), log(t), -t);
}
function code(x, y, z, t, a) return fma(Float64(a + -0.5), log(t), Float64(-t)) end
code[x_, y_, z_, t_, a_] := N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + (-t)), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a + -0.5, \log t, -t\right)
\end{array}
Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
+-commutative99.6%
fma-udef99.6%
associate-+r+99.6%
+-commutative99.6%
fma-def99.6%
associate-+r-99.6%
sum-log74.7%
Applied egg-rr74.7%
Taylor expanded in t around inf 75.9%
neg-mul-175.9%
Simplified75.9%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.4e+53) (* a (log t)) (if (<= a 7.8e+72) (- (log y) t) (* (log (/ 1.0 t)) (- a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.4e+53) {
tmp = a * log(t);
} else if (a <= 7.8e+72) {
tmp = log(y) - t;
} else {
tmp = log((1.0 / t)) * -a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.4d+53)) then
tmp = a * log(t)
else if (a <= 7.8d+72) then
tmp = log(y) - t
else
tmp = log((1.0d0 / t)) * -a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.4e+53) {
tmp = a * Math.log(t);
} else if (a <= 7.8e+72) {
tmp = Math.log(y) - t;
} else {
tmp = Math.log((1.0 / t)) * -a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.4e+53: tmp = a * math.log(t) elif a <= 7.8e+72: tmp = math.log(y) - t else: tmp = math.log((1.0 / t)) * -a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.4e+53) tmp = Float64(a * log(t)); elseif (a <= 7.8e+72) tmp = Float64(log(y) - t); else tmp = Float64(log(Float64(1.0 / t)) * Float64(-a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.4e+53) tmp = a * log(t); elseif (a <= 7.8e+72) tmp = log(y) - t; else tmp = log((1.0 / t)) * -a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.4e+53], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e+72], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * (-a)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{+53}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+72}:\\
\;\;\;\;\log y - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{1}{t}\right) \cdot \left(-a\right)\\
\end{array}
\end{array}
if a < -5.40000000000000039e53Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in t around inf 99.5%
Taylor expanded in a around inf 87.7%
mul-1-neg87.7%
log-rec87.7%
distribute-rgt-neg-in87.7%
remove-double-neg87.7%
Simplified87.7%
if -5.40000000000000039e53 < a < 7.79999999999999984e72Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 55.9%
neg-mul-155.9%
Simplified55.9%
Taylor expanded in x around 0 43.8%
if 7.79999999999999984e72 < a Initial program 99.4%
associate--l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-def99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around inf 99.4%
Taylor expanded in a around inf 74.9%
Final simplification58.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.22e+54) (not (<= a 7.8e+72))) (* a (log t)) (- (log y) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.22e+54) || !(a <= 7.8e+72)) {
tmp = a * log(t);
} else {
tmp = log(y) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.22d+54)) .or. (.not. (a <= 7.8d+72))) then
tmp = a * log(t)
else
tmp = log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.22e+54) || !(a <= 7.8e+72)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.22e+54) or not (a <= 7.8e+72): tmp = a * math.log(t) else: tmp = math.log(y) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.22e+54) || !(a <= 7.8e+72)) tmp = Float64(a * log(t)); else tmp = Float64(log(y) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.22e+54) || ~((a <= 7.8e+72))) tmp = a * log(t); else tmp = log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.22e+54], N[Not[LessEqual[a, 7.8e+72]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{+54} \lor \neg \left(a \leq 7.8 \cdot 10^{+72}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log y - t\\
\end{array}
\end{array}
if a < -1.22e54 or 7.79999999999999984e72 < a Initial program 99.4%
associate--l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-def99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around inf 99.5%
Taylor expanded in a around inf 81.8%
mul-1-neg81.8%
log-rec81.7%
distribute-rgt-neg-in81.7%
remove-double-neg81.7%
Simplified81.7%
if -1.22e54 < a < 7.79999999999999984e72Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 55.9%
neg-mul-155.9%
Simplified55.9%
Taylor expanded in x around 0 43.8%
Final simplification58.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 60000000.0) (log (+ x y)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 60000000.0) {
tmp = log((x + y));
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 60000000.0d0) then
tmp = log((x + y))
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 60000000.0) {
tmp = Math.log((x + y));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 60000000.0: tmp = math.log((x + y)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 60000000.0) tmp = log(Float64(x + y)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 60000000.0) tmp = log((x + y)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 60000000.0], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 60000000:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 6e7Initial program 99.3%
associate--l+99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
remove-double-neg99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in t around inf 10.3%
neg-mul-110.3%
Simplified10.3%
Taylor expanded in t around 0 10.3%
if 6e7 < t Initial program 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in t around inf 72.8%
neg-mul-172.8%
Simplified72.8%
Final simplification41.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.6e+42) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.6e+42) {
tmp = a * log(t);
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 1.6d+42) then
tmp = a * log(t)
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.6e+42) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.6e+42: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.6e+42) tmp = Float64(a * log(t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.6e+42) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.6e+42], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.6 \cdot 10^{+42}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.60000000000000001e42Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-def99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in t around inf 99.3%
Taylor expanded in a around inf 48.3%
mul-1-neg48.3%
log-rec48.3%
distribute-rgt-neg-in48.3%
remove-double-neg48.3%
Simplified48.3%
if 1.60000000000000001e42 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 78.4%
neg-mul-178.4%
Simplified78.4%
Final simplification61.2%
(FPCore (x y z t a) :precision binary64 (- t))
double code(double x, double y, double z, double t, double a) {
return -t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -t
end function
public static double code(double x, double y, double z, double t, double a) {
return -t;
}
def code(x, y, z, t, a): return -t
function code(x, y, z, t, a) return Float64(-t) end
function tmp = code(x, y, z, t, a) tmp = -t; end
code[x_, y_, z_, t_, a_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in t around inf 99.5%
Taylor expanded in t around inf 37.8%
neg-mul-137.8%
Simplified37.8%
Final simplification37.8%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = log((x + y)) + ((log(z) - t) + ((a - 0.5d0) * log(t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log((x + y)) + ((Math.log(z) - t) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return math.log((x + y)) + ((math.log(z) - t) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(Float64(log(z) - t) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)
\end{array}
herbie shell --seed 2023171
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))