
(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 14 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}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(-
(+
(fma
(+ -0.5 a)
(log t)
(fma
(pow (/ x y) 3.0)
0.3333333333333333
(/ (fma (* x (/ x y)) -0.5 x) y)))
(+ (log z) (log y)))
t))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return (fma((-0.5 + a), log(t), fma(pow((x / y), 3.0), 0.3333333333333333, (fma((x * (x / y)), -0.5, x) / y))) + (log(z) + log(y))) - t;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(Float64(fma(Float64(-0.5 + a), log(t), fma((Float64(x / y) ^ 3.0), 0.3333333333333333, Float64(fma(Float64(x * Float64(x / y)), -0.5, x) / y))) + Float64(log(z) + log(y))) - t) end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(N[(N[(N[(-0.5 + a), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Power[N[(x / y), $MachinePrecision], 3.0], $MachinePrecision] * 0.3333333333333333 + N[(N[(N[(x * N[(x / y), $MachinePrecision]), $MachinePrecision] * -0.5 + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\left(\mathsf{fma}\left(-0.5 + a, \log t, \mathsf{fma}\left({\left(\frac{x}{y}\right)}^{3}, 0.3333333333333333, \frac{\mathsf{fma}\left(x \cdot \frac{x}{y}, -0.5, x\right)}{y}\right)\right) + \left(\log z + \log y\right)\right) - t
\end{array}
Initial program 99.6%
Taylor expanded in y around inf
Applied rewrites48.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t)))))
(if (<= t_1 -500.0)
(- t)
(if (<= t_1 700.0) (log (/ (* (+ y x) z) (sqrt t))) (* (log t) a)))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
double tmp;
if (t_1 <= -500.0) {
tmp = -t;
} else if (t_1 <= 700.0) {
tmp = log((((y + x) * z) / sqrt(t)));
} else {
tmp = log(t) * a;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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) :: t_1
real(8) :: tmp
t_1 = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
if (t_1 <= (-500.0d0)) then
tmp = -t
else if (t_1 <= 700.0d0) then
tmp = log((((y + x) * z) / sqrt(t)))
else
tmp = log(t) * a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
double tmp;
if (t_1 <= -500.0) {
tmp = -t;
} else if (t_1 <= 700.0) {
tmp = Math.log((((y + x) * z) / Math.sqrt(t)));
} else {
tmp = Math.log(t) * a;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t)) tmp = 0 if t_1 <= -500.0: tmp = -t elif t_1 <= 700.0: tmp = math.log((((y + x) * z) / math.sqrt(t))) else: tmp = math.log(t) * a return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) tmp = 0.0 if (t_1 <= -500.0) tmp = Float64(-t); elseif (t_1 <= 700.0) tmp = log(Float64(Float64(Float64(y + x) * z) / sqrt(t))); else tmp = Float64(log(t) * a); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
tmp = 0.0;
if (t_1 <= -500.0)
tmp = -t;
elseif (t_1 <= 700.0)
tmp = log((((y + x) * z) / sqrt(t)));
else
tmp = log(t) * a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -500.0], (-t), If[LessEqual[t$95$1, 700.0], N[Log[N[(N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\\
\mathbf{if}\;t\_1 \leq -500:\\
\;\;\;\;-t\\
\mathbf{elif}\;t\_1 \leq 700:\\
\;\;\;\;\log \left(\frac{\left(y + x\right) \cdot z}{\sqrt{t}}\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot a\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) t) (*.f64 (-.f64 a #s(literal 1/2 binary64)) (log.f64 t))) < -500Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6462.5
Applied rewrites62.5%
if -500 < (+.f64 (-.f64 (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) t) (*.f64 (-.f64 a #s(literal 1/2 binary64)) (log.f64 t))) < 700Initial program 98.8%
Taylor expanded in a around 0
associate-+r+N/A
fp-cancel-sign-sub-invN/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.3
Applied rewrites98.3%
Taylor expanded in t around 0
Applied rewrites97.1%
Applied rewrites98.3%
if 700 < (+.f64 (-.f64 (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) t) (*.f64 (-.f64 a #s(literal 1/2 binary64)) (log.f64 t))) Initial program 99.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6468.2
Applied rewrites68.2%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (+ (log (+ x y)) (log z)) 680.0) (fma (- a 0.5) (log t) (- (log (* z (+ y x))) t)) (fma (- a 0.5) (log t) (+ (log z) (log y)))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((log((x + y)) + log(z)) <= 680.0) {
tmp = fma((a - 0.5), log(t), (log((z * (y + x))) - t));
} else {
tmp = fma((a - 0.5), log(t), (log(z) + log(y)));
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(log(Float64(x + y)) + log(z)) <= 680.0) tmp = fma(Float64(a - 0.5), log(t), Float64(log(Float64(z * Float64(y + x))) - t)); else tmp = fma(Float64(a - 0.5), log(t), Float64(log(z) + log(y))); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision], 680.0], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;\log \left(x + y\right) + \log z \leq 680:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot \left(y + x\right)\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log z + \log y\right)\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 680Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.6
lift-+.f64N/A
lift-log.f64N/A
lift-log.f64N/A
sum-logN/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f6496.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.7
Applied rewrites96.7%
if 680 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.6%
Taylor expanded in x around 0
lower-log.f6464.1
Applied rewrites64.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6464.1
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6464.1
Applied rewrites64.1%
Taylor expanded in t around 0
lower-log.f6450.1
Applied rewrites50.1%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (+ (log (+ x y)) (log z)) 700.0) (fma (- a 0.5) (log t) (- (log (* z (+ y x))) t)) (* (log t) a)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((log((x + y)) + log(z)) <= 700.0) {
tmp = fma((a - 0.5), log(t), (log((z * (y + x))) - t));
} else {
tmp = log(t) * a;
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(log(Float64(x + y)) + log(z)) <= 700.0) tmp = fma(Float64(a - 0.5), log(t), Float64(log(Float64(z * Float64(y + x))) - t)); else tmp = Float64(log(t) * a); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision], 700.0], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;\log \left(x + y\right) + \log z \leq 700:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot \left(y + x\right)\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot a\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.6
lift-+.f64N/A
lift-log.f64N/A
lift-log.f64N/A
sum-logN/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f6496.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6496.7
Applied rewrites96.7%
if 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6445.6
Applied rewrites45.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) a)))
(if (<= a -1e+20)
t_1
(if (<= a 5e-6)
(- (+ (log y) (log z)) (fma 0.5 (log t) t))
(if (<= a 2.9e+91)
(fma (- a 0.5) (log t) (- (log (* z (+ y x))) t))
t_1)))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * a;
double tmp;
if (a <= -1e+20) {
tmp = t_1;
} else if (a <= 5e-6) {
tmp = (log(y) + log(z)) - fma(0.5, log(t), t);
} else if (a <= 2.9e+91) {
tmp = fma((a - 0.5), log(t), (log((z * (y + x))) - t));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(log(t) * a) tmp = 0.0 if (a <= -1e+20) tmp = t_1; elseif (a <= 5e-6) tmp = Float64(Float64(log(y) + log(z)) - fma(0.5, log(t), t)); elseif (a <= 2.9e+91) tmp = fma(Float64(a - 0.5), log(t), Float64(log(Float64(z * Float64(y + x))) - t)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1e+20], t$95$1, If[LessEqual[a, 5e-6], N[(N[(N[Log[y], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - N[(0.5 * N[Log[t], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e+91], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \log t \cdot a\\
\mathbf{if}\;a \leq -1 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(\log y + \log z\right) - \mathsf{fma}\left(0.5, \log t, t\right)\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot \left(y + x\right)\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1e20 or 2.90000000000000014e91 < a Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6490.5
Applied rewrites90.5%
if -1e20 < a < 5.00000000000000041e-6Initial program 99.5%
Taylor expanded in a around 0
associate-+r+N/A
fp-cancel-sign-sub-invN/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.3
Applied rewrites98.3%
Taylor expanded in x around 0
Applied rewrites60.0%
if 5.00000000000000041e-6 < a < 2.90000000000000014e91Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-+.f64N/A
lift-log.f64N/A
lift-log.f64N/A
sum-logN/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f6486.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6486.2
Applied rewrites86.2%
Final simplification74.0%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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
assert x < y && y < z && z < t && t < a;
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));
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
x, y, z, t, a = sort([x, y, z, t, a]) 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
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. 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}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Initial program 99.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (fma (- a 0.5) (log t) (+ (- (log z) t) (log y))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return fma((a - 0.5), log(t), ((log(z) - t) + log(y)));
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return fma(Float64(a - 0.5), log(t), Float64(Float64(log(z) - t) + log(y))) end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\mathsf{fma}\left(a - 0.5, \log t, \left(\log z - t\right) + \log y\right)
\end{array}
Initial program 99.6%
Taylor expanded in x around 0
lower-log.f6465.3
Applied rewrites65.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6465.3
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift--.f64N/A
+-commutativeN/A
lower-+.f6465.3
Applied rewrites65.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (+ (fma (+ -0.5 a) (log t) (log z)) (- (log y) t)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return fma((-0.5 + a), log(t), log(z)) + (log(y) - t);
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(fma(Float64(-0.5 + a), log(t), log(z)) + Float64(log(y) - t)) end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(N[(N[(-0.5 + a), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\mathsf{fma}\left(-0.5 + a, \log t, \log z\right) + \left(\log y - t\right)
\end{array}
Initial program 99.6%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
+-commutativeN/A
distribute-rgt-out--N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
distribute-rgt-outN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
lower-log.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-log.f6465.3
Applied rewrites65.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) a)))
(if (<= a -1e+20)
t_1
(if (<= a 2.8e-6)
(+ (- (log (/ z (sqrt t))) t) (log (+ y x)))
(if (<= a 2.9e+91)
(fma (- a 0.5) (log t) (- (log (* z (+ y x))) t))
t_1)))))assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * a;
double tmp;
if (a <= -1e+20) {
tmp = t_1;
} else if (a <= 2.8e-6) {
tmp = (log((z / sqrt(t))) - t) + log((y + x));
} else if (a <= 2.9e+91) {
tmp = fma((a - 0.5), log(t), (log((z * (y + x))) - t));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(log(t) * a) tmp = 0.0 if (a <= -1e+20) tmp = t_1; elseif (a <= 2.8e-6) tmp = Float64(Float64(log(Float64(z / sqrt(t))) - t) + log(Float64(y + x))); elseif (a <= 2.9e+91) tmp = fma(Float64(a - 0.5), log(t), Float64(log(Float64(z * Float64(y + x))) - t)); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -1e+20], t$95$1, If[LessEqual[a, 2.8e-6], N[(N[(N[Log[N[(z / N[Sqrt[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.9e+91], N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := \log t \cdot a\\
\mathbf{if}\;a \leq -1 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-6}:\\
\;\;\;\;\left(\log \left(\frac{z}{\sqrt{t}}\right) - t\right) + \log \left(y + x\right)\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+91}:\\
\;\;\;\;\mathsf{fma}\left(a - 0.5, \log t, \log \left(z \cdot \left(y + x\right)\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1e20 or 2.90000000000000014e91 < a Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6490.5
Applied rewrites90.5%
if -1e20 < a < 2.79999999999999987e-6Initial program 99.5%
Taylor expanded in a around 0
associate-+r+N/A
fp-cancel-sign-sub-invN/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.3
Applied rewrites98.3%
Applied rewrites89.3%
if 2.79999999999999987e-6 < a < 2.90000000000000014e91Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-+.f64N/A
lift-log.f64N/A
lift-log.f64N/A
sum-logN/A
lower-log.f64N/A
*-commutativeN/A
lower-*.f6486.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6486.2
Applied rewrites86.2%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -4e+14) (not (<= (- a 0.5) -0.4))) (* (log t) a) (- (log (* (+ y x) z)) (fma (log t) 0.5 t))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -4e+14) || !((a - 0.5) <= -0.4)) {
tmp = log(t) * a;
} else {
tmp = log(((y + x) * z)) - fma(log(t), 0.5, t);
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -4e+14) || !(Float64(a - 0.5) <= -0.4)) tmp = Float64(log(t) * a); else tmp = Float64(log(Float64(Float64(y + x) * z)) - fma(log(t), 0.5, t)); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -4e+14], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[Log[N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * 0.5 + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -4 \cdot 10^{+14} \lor \neg \left(a - 0.5 \leq -0.4\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\log \left(\left(y + x\right) \cdot z\right) - \mathsf{fma}\left(\log t, 0.5, t\right)\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -4e14 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6484.8
Applied rewrites84.8%
if -4e14 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.5%
Taylor expanded in a around 0
associate-+r+N/A
fp-cancel-sign-sub-invN/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.3
Applied rewrites98.3%
Applied rewrites74.3%
Final simplification79.2%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -4e+14) (not (<= (- a 0.5) -0.4))) (* (log t) a) (- (log (* y z)) (fma (log t) 0.5 t))))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -4e+14) || !((a - 0.5) <= -0.4)) {
tmp = log(t) * a;
} else {
tmp = log((y * z)) - fma(log(t), 0.5, t);
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -4e+14) || !(Float64(a - 0.5) <= -0.4)) tmp = Float64(log(t) * a); else tmp = Float64(log(Float64(y * z)) - fma(log(t), 0.5, t)); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -4e+14], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * 0.5 + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -4 \cdot 10^{+14} \lor \neg \left(a - 0.5 \leq -0.4\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5, t\right)\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -4e14 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6484.8
Applied rewrites84.8%
if -4e14 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.5%
Taylor expanded in a around 0
associate-+r+N/A
fp-cancel-sign-sub-invN/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.3
Applied rewrites98.3%
Applied rewrites74.3%
Taylor expanded in x around 0
Applied rewrites46.3%
Final simplification64.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -4e+14) (not (<= (- a 0.5) -0.4))) (* (log t) a) (- (log (/ (* (+ y x) z) (sqrt t))) t)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -4e+14) || !((a - 0.5) <= -0.4)) {
tmp = log(t) * a;
} else {
tmp = log((((y + x) * z) / sqrt(t))) - t;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 - 0.5d0) <= (-4d+14)) .or. (.not. ((a - 0.5d0) <= (-0.4d0)))) then
tmp = log(t) * a
else
tmp = log((((y + x) * z) / sqrt(t))) - t
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -4e+14) || !((a - 0.5) <= -0.4)) {
tmp = Math.log(t) * a;
} else {
tmp = Math.log((((y + x) * z) / Math.sqrt(t))) - t;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if ((a - 0.5) <= -4e+14) or not ((a - 0.5) <= -0.4): tmp = math.log(t) * a else: tmp = math.log((((y + x) * z) / math.sqrt(t))) - t return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -4e+14) || !(Float64(a - 0.5) <= -0.4)) tmp = Float64(log(t) * a); else tmp = Float64(log(Float64(Float64(Float64(y + x) * z) / sqrt(t))) - t); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (((a - 0.5) <= -4e+14) || ~(((a - 0.5) <= -0.4)))
tmp = log(t) * a;
else
tmp = log((((y + x) * z) / sqrt(t))) - t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -4e+14], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[Log[N[(N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -4 \cdot 10^{+14} \lor \neg \left(a - 0.5 \leq -0.4\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\log \left(\frac{\left(y + x\right) \cdot z}{\sqrt{t}}\right) - t\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -4e14 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6484.8
Applied rewrites84.8%
if -4e14 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.5%
Taylor expanded in a around 0
associate-+r+N/A
fp-cancel-sign-sub-invN/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-log.f64N/A
metadata-evalN/A
lower-fma.f64N/A
lower-log.f6498.3
Applied rewrites98.3%
Applied rewrites70.3%
Final simplification77.1%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= a -5e+14) (not (<= a 710000000000.0))) (* (log t) a) (- t)))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5e+14) || !(a <= 710000000000.0)) {
tmp = log(t) * a;
} else {
tmp = -t;
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 <= (-5d+14)) .or. (.not. (a <= 710000000000.0d0))) then
tmp = log(t) * a
else
tmp = -t
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5e+14) || !(a <= 710000000000.0)) {
tmp = Math.log(t) * a;
} else {
tmp = -t;
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (a <= -5e+14) or not (a <= 710000000000.0): tmp = math.log(t) * a else: tmp = -t return tmp
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5e+14) || !(a <= 710000000000.0)) tmp = Float64(log(t) * a); else tmp = Float64(-t); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((a <= -5e+14) || ~((a <= 710000000000.0)))
tmp = log(t) * a;
else
tmp = -t;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5e+14], N[Not[LessEqual[a, 710000000000.0]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], (-t)]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+14} \lor \neg \left(a \leq 710000000000\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if a < -5e14 or 7.1e11 < a Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6485.5
Applied rewrites85.5%
if -5e14 < a < 7.1e11Initial program 99.5%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6453.9
Applied rewrites53.9%
Final simplification68.7%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (- t))
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return -t;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return -t;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return -t
x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(-t) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = -t;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := (-t)
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
-t
\end{array}
Initial program 99.6%
Taylor expanded in t around inf
mul-1-negN/A
lower-neg.f6435.8
Applied rewrites35.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 2024338
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (+ (log (+ x y)) (+ (- (log z) t) (* (- a 1/2) (log t)))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))