
(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 15 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)) (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}
Initial program 99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- a 0.5) (log t)))
(t_2 (+ (- (+ (log (+ x y)) (log z)) t) t_1)))
(if (<= t_2 -2000.0)
(- t_1 t)
(if (<= t_2 2000.0)
(+ (log y) (fma (log t) -0.5 (log z)))
(- (* a (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 = ((log((x + y)) + log(z)) - t) + t_1;
double tmp;
if (t_2 <= -2000.0) {
tmp = t_1 - t;
} else if (t_2 <= 2000.0) {
tmp = log(y) + fma(log(t), -0.5, log(z));
} else {
tmp = (a * log(t)) - t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(a - 0.5) * log(t)) t_2 = Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + t_1) tmp = 0.0 if (t_2 <= -2000.0) tmp = Float64(t_1 - t); elseif (t_2 <= 2000.0) tmp = Float64(log(y) + fma(log(t), -0.5, log(z))); else tmp = Float64(Float64(a * log(t)) - 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[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -2000.0], N[(t$95$1 - t), $MachinePrecision], If[LessEqual[t$95$2, 2000.0], N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5 + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot \log t\\
t_2 := \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + t\_1\\
\mathbf{if}\;t\_2 \leq -2000:\\
\;\;\;\;t\_1 - t\\
\mathbf{elif}\;t\_2 \leq 2000:\\
\;\;\;\;\log y + \mathsf{fma}\left(\log t, -0.5, \log z\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\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))) < -2e3Initial program 99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6497.4
Simplified97.4%
if -2e3 < (+.f64 (-.f64 (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) t) (*.f64 (-.f64 a #s(literal 1/2 binary64)) (log.f64 t))) < 2e3Initial program 99.2%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6497.8
Simplified97.8%
Taylor expanded in y around inf
associate-+r+N/A
+-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f6450.4
Simplified50.4%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f6450.0
Simplified50.0%
if 2e3 < (+.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 t around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified60.3%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr60.3%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.4
Simplified99.4%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- a 0.5) (log t)))
(t_2 (+ (- (+ (log (+ x y)) (log z)) t) t_1)))
(if (<= t_2 -1e+32)
(- (* a (log t)) t)
(if (<= t_2 880.0)
(- (fma (log t) -0.5 (log (* z (+ x y)))) t)
(- t_1 t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a - 0.5) * log(t);
double t_2 = ((log((x + y)) + log(z)) - t) + t_1;
double tmp;
if (t_2 <= -1e+32) {
tmp = (a * log(t)) - t;
} else if (t_2 <= 880.0) {
tmp = fma(log(t), -0.5, log((z * (x + y)))) - t;
} else {
tmp = t_1 - t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(a - 0.5) * log(t)) t_2 = Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + t_1) tmp = 0.0 if (t_2 <= -1e+32) tmp = Float64(Float64(a * log(t)) - t); elseif (t_2 <= 880.0) tmp = Float64(fma(log(t), -0.5, log(Float64(z * Float64(x + y)))) - t); else tmp = Float64(t_1 - 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[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+32], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$2, 880.0], N[(N[(N[Log[t], $MachinePrecision] * -0.5 + N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot \log t\\
t_2 := \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + t\_1\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \log t - t\\
\mathbf{elif}\;t\_2 \leq 880:\\
\;\;\;\;\mathsf{fma}\left(\log t, -0.5, \log \left(z \cdot \left(x + y\right)\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\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))) < -1.00000000000000005e32Initial program 99.8%
Taylor expanded in t around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified91.1%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr91.1%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.8
Simplified99.8%
if -1.00000000000000005e32 < (+.f64 (-.f64 (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) t) (*.f64 (-.f64 a #s(literal 1/2 binary64)) (log.f64 t))) < 880Initial program 99.2%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr96.2%
Taylor expanded in a around 0
--lowering--.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6494.5
Simplified94.5%
if 880 < (+.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 t around inf
mul-1-negN/A
neg-lowering-neg.f6484.3
Simplified84.3%
Final simplification95.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- a 0.5) (log t)))
(t_2 (+ (- (+ (log (+ x y)) (log z)) t) t_1)))
(if (<= t_2 -1e+32)
(- (* a (log t)) t)
(if (<= t_2 880.0) (- (fma (log t) -0.5 (log (* y z))) t) (- t_1 t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a - 0.5) * log(t);
double t_2 = ((log((x + y)) + log(z)) - t) + t_1;
double tmp;
if (t_2 <= -1e+32) {
tmp = (a * log(t)) - t;
} else if (t_2 <= 880.0) {
tmp = fma(log(t), -0.5, log((y * z))) - t;
} else {
tmp = t_1 - t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(a - 0.5) * log(t)) t_2 = Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + t_1) tmp = 0.0 if (t_2 <= -1e+32) tmp = Float64(Float64(a * log(t)) - t); elseif (t_2 <= 880.0) tmp = Float64(fma(log(t), -0.5, log(Float64(y * z))) - t); else tmp = Float64(t_1 - 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[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+32], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$2, 880.0], N[(N[(N[Log[t], $MachinePrecision] * -0.5 + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot \log t\\
t_2 := \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + t\_1\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \log t - t\\
\mathbf{elif}\;t\_2 \leq 880:\\
\;\;\;\;\mathsf{fma}\left(\log t, -0.5, \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\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))) < -1.00000000000000005e32Initial program 99.8%
Taylor expanded in t around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified91.1%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr91.1%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6499.8
Simplified99.8%
if -1.00000000000000005e32 < (+.f64 (-.f64 (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) t) (*.f64 (-.f64 a #s(literal 1/2 binary64)) (log.f64 t))) < 880Initial program 99.2%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr96.2%
Taylor expanded in a around 0
--lowering--.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6494.5
Simplified94.5%
Taylor expanded in x around 0
--lowering--.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
*-lowering-*.f6452.0
Simplified52.0%
if 880 < (+.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 t around inf
mul-1-negN/A
neg-lowering-neg.f6484.3
Simplified84.3%
Final simplification85.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))))
(if (<= t_1 -800.0)
(- (/ (log t) (/ 1.0 (+ a -0.5))) t)
(if (<= t_1 660.0)
(fma (+ a -0.5) (log t) (- (log (* z (+ x y))) t))
(- (* (- a 0.5) (log t)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double tmp;
if (t_1 <= -800.0) {
tmp = (log(t) / (1.0 / (a + -0.5))) - t;
} else if (t_1 <= 660.0) {
tmp = fma((a + -0.5), log(t), (log((z * (x + y))) - t));
} else {
tmp = ((a - 0.5) * log(t)) - t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) tmp = 0.0 if (t_1 <= -800.0) tmp = Float64(Float64(log(t) / Float64(1.0 / Float64(a + -0.5))) - t); elseif (t_1 <= 660.0) tmp = fma(Float64(a + -0.5), log(t), Float64(log(Float64(z * Float64(x + y))) - t)); else tmp = Float64(Float64(Float64(a - 0.5) * log(t)) - t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -800.0], N[(N[(N[Log[t], $MachinePrecision] / N[(1.0 / N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 660.0], N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -800:\\
\;\;\;\;\frac{\log t}{\frac{1}{a + -0.5}} - t\\
\mathbf{elif}\;t\_1 \leq 660:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, \log t, \log \left(z \cdot \left(x + y\right)\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -800Initial program 98.8%
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.1
Applied egg-rr99.1%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6499.1
Simplified99.1%
if -800 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 660Initial program 99.5%
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
log-lowering-log.f64N/A
--lowering--.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6499.2
Applied egg-rr99.2%
if 660 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6484.6
Simplified84.6%
Final simplification95.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))))
(if (<= t_1 -800.0)
(- (/ (log t) (/ 1.0 (+ a -0.5))) t)
(if (<= t_1 660.0)
(- (fma (log t) (+ a -0.5) (log (* y z))) t)
(- (* (- a 0.5) (log t)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double tmp;
if (t_1 <= -800.0) {
tmp = (log(t) / (1.0 / (a + -0.5))) - t;
} else if (t_1 <= 660.0) {
tmp = fma(log(t), (a + -0.5), log((y * z))) - t;
} else {
tmp = ((a - 0.5) * log(t)) - t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) tmp = 0.0 if (t_1 <= -800.0) tmp = Float64(Float64(log(t) / Float64(1.0 / Float64(a + -0.5))) - t); elseif (t_1 <= 660.0) tmp = Float64(fma(log(t), Float64(a + -0.5), log(Float64(y * z))) - t); else tmp = Float64(Float64(Float64(a - 0.5) * log(t)) - t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -800.0], N[(N[(N[Log[t], $MachinePrecision] / N[(1.0 / N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 660.0], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -800:\\
\;\;\;\;\frac{\log t}{\frac{1}{a + -0.5}} - t\\
\mathbf{elif}\;t\_1 \leq 660:\\
\;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -800Initial program 98.8%
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.1
Applied egg-rr99.1%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6499.1
Simplified99.1%
if -800 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 660Initial program 99.5%
flip3-+N/A
clear-numN/A
/-lowering-/.f64N/A
Applied egg-rr99.0%
Taylor expanded in x around 0
--lowering--.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f6458.8
Simplified58.8%
if 660 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6484.6
Simplified84.6%
Final simplification65.6%
(FPCore (x y z t a) :precision binary64 (if (<= (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))) -2000.0) (- t) (log z)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t))) <= -2000.0) {
tmp = -t;
} else {
tmp = log(z);
}
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 ((((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))) <= (-2000.0d0)) then
tmp = -t
else
tmp = log(z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t))) <= -2000.0) {
tmp = -t;
} else {
tmp = Math.log(z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))) <= -2000.0: tmp = -t else: tmp = math.log(z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) <= -2000.0) tmp = Float64(-t); else tmp = log(z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t))) <= -2000.0) tmp = -t; else tmp = log(z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[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], -2000.0], (-t), N[Log[z], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t \leq -2000:\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;\log z\\
\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))) < -2e3Initial program 99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6461.0
Simplified61.0%
if -2e3 < (+.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.3%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6498.2
Simplified98.2%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6449.0
Simplified49.0%
Taylor expanded in a around 0
log-lowering-log.f649.4
Simplified9.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 3000.0) (+ (log z) (fma (log t) (+ a -0.5) (log (+ x y)))) (- (/ (log t) (/ 1.0 (+ a -0.5))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3000.0) {
tmp = log(z) + fma(log(t), (a + -0.5), log((x + y)));
} else {
tmp = (log(t) / (1.0 / (a + -0.5))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3000.0) tmp = Float64(log(z) + fma(log(t), Float64(a + -0.5), log(Float64(x + y)))); else tmp = Float64(Float64(log(t) / Float64(1.0 / Float64(a + -0.5))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3000.0], N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] / N[(1.0 / N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3000:\\
\;\;\;\;\log z + \mathsf{fma}\left(\log t, a + -0.5, \log \left(x + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\log t}{\frac{1}{a + -0.5}} - t\\
\end{array}
\end{array}
if t < 3e3Initial program 99.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6498.7
Simplified98.7%
if 3e3 < t Initial program 99.8%
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.8
Applied egg-rr99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6497.5
Simplified97.5%
Final simplification98.1%
(FPCore (x y z t a) :precision binary64 (if (<= t 3000.0) (+ (log z) (fma (log t) (+ a -0.5) (log y))) (- (/ (log t) (/ 1.0 (+ a -0.5))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3000.0) {
tmp = log(z) + fma(log(t), (a + -0.5), log(y));
} else {
tmp = (log(t) / (1.0 / (a + -0.5))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3000.0) tmp = Float64(log(z) + fma(log(t), Float64(a + -0.5), log(y))); else tmp = Float64(Float64(log(t) / Float64(1.0 / Float64(a + -0.5))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3000.0], N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] / N[(1.0 / N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3000:\\
\;\;\;\;\log z + \mathsf{fma}\left(\log t, a + -0.5, \log y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\log t}{\frac{1}{a + -0.5}} - t\\
\end{array}
\end{array}
if t < 3e3Initial program 99.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6498.7
Simplified98.7%
Taylor expanded in y around inf
+-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f6459.3
Simplified59.3%
if 3e3 < t Initial program 99.8%
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.8
Applied egg-rr99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6497.5
Simplified97.5%
Final simplification78.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 3000.0) (+ (log y) (fma (log t) (+ a -0.5) (log z))) (- (/ (log t) (/ 1.0 (+ a -0.5))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3000.0) {
tmp = log(y) + fma(log(t), (a + -0.5), log(z));
} else {
tmp = (log(t) / (1.0 / (a + -0.5))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3000.0) tmp = Float64(log(y) + fma(log(t), Float64(a + -0.5), log(z))); else tmp = Float64(Float64(log(t) / Float64(1.0 / Float64(a + -0.5))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3000.0], N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] / N[(1.0 / N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3000:\\
\;\;\;\;\log y + \mathsf{fma}\left(\log t, a + -0.5, \log z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\log t}{\frac{1}{a + -0.5}} - t\\
\end{array}
\end{array}
if t < 3e3Initial program 99.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6498.7
Simplified98.7%
Taylor expanded in y around inf
associate-+r+N/A
+-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
associate-+r+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
log-lowering-log.f6459.3
Simplified59.3%
if 3e3 < t Initial program 99.8%
*-commutativeN/A
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.8
Applied egg-rr99.8%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6497.5
Simplified97.5%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= (- a 0.5) -0.5000000000000001)
t_1
(if (<= (- a 0.5) 5e+26) (- t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if ((a - 0.5) <= -0.5000000000000001) {
tmp = t_1;
} else if ((a - 0.5) <= 5e+26) {
tmp = -t;
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = a * log(t)
if ((a - 0.5d0) <= (-0.5000000000000001d0)) then
tmp = t_1
else if ((a - 0.5d0) <= 5d+26) then
tmp = -t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a * Math.log(t);
double tmp;
if ((a - 0.5) <= -0.5000000000000001) {
tmp = t_1;
} else if ((a - 0.5) <= 5e+26) {
tmp = -t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if (a - 0.5) <= -0.5000000000000001: tmp = t_1 elif (a - 0.5) <= 5e+26: tmp = -t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (Float64(a - 0.5) <= -0.5000000000000001) tmp = t_1; elseif (Float64(a - 0.5) <= 5e+26) tmp = Float64(-t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); tmp = 0.0; if ((a - 0.5) <= -0.5000000000000001) tmp = t_1; elseif ((a - 0.5) <= 5e+26) tmp = -t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.5000000000000001], t$95$1, If[LessEqual[N[(a - 0.5), $MachinePrecision], 5e+26], (-t), t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a - 0.5 \leq -0.5000000000000001:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a - 0.5 \leq 5 \cdot 10^{+26}:\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -0.500000000000000111 or 5.0000000000000001e26 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6480.0
Simplified80.0%
if -0.500000000000000111 < (-.f64 a #s(literal 1/2 binary64)) < 5.0000000000000001e26Initial program 99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6451.3
Simplified51.3%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (- (* (- a 0.5) (log t)) t))
double code(double x, double y, double z, double t, double a) {
return ((a - 0.5) * log(t)) - 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 = ((a - 0.5d0) * log(t)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return ((a - 0.5) * Math.log(t)) - t;
}
def code(x, y, z, t, a): return ((a - 0.5) * math.log(t)) - t
function code(x, y, z, t, a) return Float64(Float64(Float64(a - 0.5) * log(t)) - t) end
function tmp = code(x, y, z, t, a) tmp = ((a - 0.5) * log(t)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(a - 0.5\right) \cdot \log t - t
\end{array}
Initial program 99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6476.9
Simplified76.9%
Final simplification76.9%
(FPCore (x y z t a) :precision binary64 (- (* a (log t)) t))
double code(double x, double y, double z, double t, double a) {
return (a * log(t)) - 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 = (a * log(t)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * Math.log(t)) - t;
}
def code(x, y, z, t, a): return (a * math.log(t)) - t
function code(x, y, z, t, a) return Float64(Float64(a * log(t)) - t) end
function tmp = code(x, y, z, t, a) tmp = (a * log(t)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \log t - t
\end{array}
Initial program 99.6%
Taylor expanded in t around inf
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
*-commutativeN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified87.8%
unsub-negN/A
--lowering--.f64N/A
Applied egg-rr87.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6474.3
Simplified74.3%
Final simplification74.3%
(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%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6436.1
Simplified36.1%
(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 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%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6436.1
Simplified36.1%
neg-sub0N/A
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6418.0
Applied egg-rr18.0%
metadata-evalN/A
flip--N/A
neg-sub0N/A
+-lft-identityN/A
flip3-+N/A
distribute-neg-fracN/A
metadata-evalN/A
+-lft-identityN/A
cube-negN/A
sqr-powN/A
unpow-prod-downN/A
sqr-negN/A
unpow-prod-downN/A
sqr-powN/A
+-lft-identityN/A
metadata-evalN/A
flip3-+N/A
+-lft-identity2.2
Applied egg-rr2.2%
(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 2024199
(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))))