
(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 13 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) (- (* (log t) (- a 0.5)) t))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + (log(z) + ((log(t) * (a - 0.5)) - 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) + ((log(t) * (a - 0.5d0)) - 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) + ((Math.log(t) * (a - 0.5)) - t));
}
def code(x, y, z, t, a): return math.log((x + y)) + (math.log(z) + ((math.log(t) * (a - 0.5)) - t))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(log(z) + Float64(Float64(log(t) * Float64(a - 0.5)) - t))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + (log(z) + ((log(t) * (a - 0.5)) - t)); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\log z + \left(\log t \cdot \left(a - 0.5\right) - t\right)\right)
\end{array}
Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (- a 0.5) -100000.0)
(- (* (log t) (- a 0.5)) t)
(if (<= (- a 0.5) -0.4)
(+ (log y) (- (log z) (+ t (* (log t) 0.5))))
(- (* (log t) a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a - 0.5) <= -100000.0) {
tmp = (log(t) * (a - 0.5)) - t;
} else if ((a - 0.5) <= -0.4) {
tmp = log(y) + (log(z) - (t + (log(t) * 0.5)));
} else {
tmp = (log(t) * a) - 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 - 0.5d0) <= (-100000.0d0)) then
tmp = (log(t) * (a - 0.5d0)) - t
else if ((a - 0.5d0) <= (-0.4d0)) then
tmp = log(y) + (log(z) - (t + (log(t) * 0.5d0)))
else
tmp = (log(t) * a) - 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 - 0.5) <= -100000.0) {
tmp = (Math.log(t) * (a - 0.5)) - t;
} else if ((a - 0.5) <= -0.4) {
tmp = Math.log(y) + (Math.log(z) - (t + (Math.log(t) * 0.5)));
} else {
tmp = (Math.log(t) * a) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a - 0.5) <= -100000.0: tmp = (math.log(t) * (a - 0.5)) - t elif (a - 0.5) <= -0.4: tmp = math.log(y) + (math.log(z) - (t + (math.log(t) * 0.5))) else: tmp = (math.log(t) * a) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a - 0.5) <= -100000.0) tmp = Float64(Float64(log(t) * Float64(a - 0.5)) - t); elseif (Float64(a - 0.5) <= -0.4) tmp = Float64(log(y) + Float64(log(z) - Float64(t + Float64(log(t) * 0.5)))); else tmp = Float64(Float64(log(t) * a) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a - 0.5) <= -100000.0) tmp = (log(t) * (a - 0.5)) - t; elseif ((a - 0.5) <= -0.4) tmp = log(y) + (log(z) - (t + (log(t) * 0.5))); else tmp = (log(t) * a) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a - 0.5), $MachinePrecision], -100000.0], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(t + N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -100000:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) - t\\
\mathbf{elif}\;a - 0.5 \leq -0.4:\\
\;\;\;\;\log y + \left(\log z - \left(t + \log t \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot a - t\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -1e5Initial program 99.7%
Taylor expanded in t around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f6499.7%
Simplified99.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6498.5%
Simplified98.5%
if -1e5 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.5%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in x around 0
log-lowering-log.f6466.2%
Simplified66.2%
Taylor expanded in a around 0
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6465.7%
Simplified65.7%
if -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.7%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.7%
Simplified99.7%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr82.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6498.7%
Simplified98.7%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (+ (+ (log z) (- (* (log t) (- a 0.5)) t)) (log y)))
double code(double x, double y, double z, double t, double a) {
return (log(z) + ((log(t) * (a - 0.5)) - t)) + 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) + ((log(t) * (a - 0.5d0)) - t)) + log(y)
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) + ((Math.log(t) * (a - 0.5)) - t)) + Math.log(y);
}
def code(x, y, z, t, a): return (math.log(z) + ((math.log(t) * (a - 0.5)) - t)) + math.log(y)
function code(x, y, z, t, a) return Float64(Float64(log(z) + Float64(Float64(log(t) * Float64(a - 0.5)) - t)) + log(y)) end
function tmp = code(x, y, z, t, a) tmp = (log(z) + ((log(t) * (a - 0.5)) - t)) + log(y); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z + \left(\log t \cdot \left(a - 0.5\right) - t\right)\right) + \log y
\end{array}
Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in x around 0
log-lowering-log.f6470.6%
Simplified70.6%
Final simplification70.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) (- a 0.5)))) (if (<= t 1.02e-8) (- (+ (log (* (+ x y) z)) t_1) t) (- t_1 t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * (a - 0.5);
double tmp;
if (t <= 1.02e-8) {
tmp = (log(((x + y) * z)) + t_1) - t;
} else {
tmp = t_1 - 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) :: t_1
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
if (t <= 1.02d-8) then
tmp = (log(((x + y) * z)) + t_1) - t
else
tmp = t_1 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log(t) * (a - 0.5);
double tmp;
if (t <= 1.02e-8) {
tmp = (Math.log(((x + y) * z)) + t_1) - t;
} else {
tmp = t_1 - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * (a - 0.5) tmp = 0 if t <= 1.02e-8: tmp = (math.log(((x + y) * z)) + t_1) - t else: tmp = t_1 - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (t <= 1.02e-8) tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + t_1) - t); else tmp = Float64(t_1 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * (a - 0.5); tmp = 0.0; if (t <= 1.02e-8) tmp = (log(((x + y) * z)) + t_1) - t; else tmp = t_1 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.02e-8], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - t), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t \leq 1.02 \cdot 10^{-8}:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + t\_1\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 1.02000000000000003e-8Initial program 99.3%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.3%
Simplified99.3%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr82.7%
if 1.02000000000000003e-8 < t Initial program 99.8%
Taylor expanded in t around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6498.1%
Simplified98.1%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) (- a 0.5)))) (if (<= t 6.2e-9) (+ (log (* (+ x y) z)) t_1) (- t_1 t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * (a - 0.5);
double tmp;
if (t <= 6.2e-9) {
tmp = log(((x + y) * z)) + t_1;
} else {
tmp = t_1 - 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) :: t_1
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
if (t <= 6.2d-9) then
tmp = log(((x + y) * z)) + t_1
else
tmp = t_1 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log(t) * (a - 0.5);
double tmp;
if (t <= 6.2e-9) {
tmp = Math.log(((x + y) * z)) + t_1;
} else {
tmp = t_1 - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * (a - 0.5) tmp = 0 if t <= 6.2e-9: tmp = math.log(((x + y) * z)) + t_1 else: tmp = t_1 - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (t <= 6.2e-9) tmp = Float64(log(Float64(Float64(x + y) * z)) + t_1); else tmp = Float64(t_1 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * (a - 0.5); tmp = 0.0; if (t <= 6.2e-9) tmp = log(((x + y) * z)) + t_1; else tmp = t_1 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 6.2e-9], N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;\log \left(\left(x + y\right) \cdot z\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 6.2000000000000001e-9Initial program 99.3%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.3%
Simplified99.3%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr82.7%
Taylor expanded in t around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6482.6%
Simplified82.6%
if 6.2000000000000001e-9 < t Initial program 99.8%
Taylor expanded in t around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6498.1%
Simplified98.1%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) (- a 0.5)))) (if (<= t 1.65e-10) (+ (log (* y z)) t_1) (- t_1 t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * (a - 0.5);
double tmp;
if (t <= 1.65e-10) {
tmp = log((y * z)) + t_1;
} else {
tmp = t_1 - 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) :: t_1
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
if (t <= 1.65d-10) then
tmp = log((y * z)) + t_1
else
tmp = t_1 - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log(t) * (a - 0.5);
double tmp;
if (t <= 1.65e-10) {
tmp = Math.log((y * z)) + t_1;
} else {
tmp = t_1 - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * (a - 0.5) tmp = 0 if t <= 1.65e-10: tmp = math.log((y * z)) + t_1 else: tmp = t_1 - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (t <= 1.65e-10) tmp = Float64(log(Float64(y * z)) + t_1); else tmp = Float64(t_1 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * (a - 0.5); tmp = 0.0; if (t <= 1.65e-10) tmp = log((y * z)) + t_1; else tmp = t_1 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.65e-10], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t \leq 1.65 \cdot 10^{-10}:\\
\;\;\;\;\log \left(y \cdot z\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 1.65e-10Initial program 99.3%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.3%
Simplified99.3%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr82.7%
Taylor expanded in x around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6448.7%
Simplified48.7%
Taylor expanded in t around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6448.7%
Simplified48.7%
if 1.65e-10 < t Initial program 99.8%
Taylor expanded in t around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6498.1%
Simplified98.1%
Final simplification74.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (* (log t) a) t))) (if (<= a -0.00017) t_1 (if (<= a 0.36) (- (log y) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (log(t) * a) - t;
double tmp;
if (a <= -0.00017) {
tmp = t_1;
} else if (a <= 0.36) {
tmp = log(y) - 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 = (log(t) * a) - t
if (a <= (-0.00017d0)) then
tmp = t_1
else if (a <= 0.36d0) then
tmp = log(y) - 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 = (Math.log(t) * a) - t;
double tmp;
if (a <= -0.00017) {
tmp = t_1;
} else if (a <= 0.36) {
tmp = Math.log(y) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (math.log(t) * a) - t tmp = 0 if a <= -0.00017: tmp = t_1 elif a <= 0.36: tmp = math.log(y) - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(log(t) * a) - t) tmp = 0.0 if (a <= -0.00017) tmp = t_1; elseif (a <= 0.36) tmp = Float64(log(y) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (log(t) * a) - t; tmp = 0.0; if (a <= -0.00017) tmp = t_1; elseif (a <= 0.36) tmp = log(y) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -0.00017], t$95$1, If[LessEqual[a, 0.36], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot a - t\\
\mathbf{if}\;a \leq -0.00017:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 0.36:\\
\;\;\;\;\log y - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.7e-4 or 0.35999999999999999 < a Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
associate-+r-N/A
+-commutativeN/A
associate--r+N/A
flip3-+N/A
div-invN/A
fmm-defN/A
*-commutativeN/A
Applied egg-rr79.1%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6497.8%
Simplified97.8%
if -1.7e-4 < a < 0.35999999999999999Initial program 99.5%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in x around 0
log-lowering-log.f6465.9%
Simplified65.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6446.2%
Simplified46.2%
sub0-negN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6446.2%
Applied egg-rr46.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) a))) (if (<= a -2.8e+78) t_1 (if (<= a 3e+28) (- (log y) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * a;
double tmp;
if (a <= -2.8e+78) {
tmp = t_1;
} else if (a <= 3e+28) {
tmp = log(y) - 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 = log(t) * a
if (a <= (-2.8d+78)) then
tmp = t_1
else if (a <= 3d+28) then
tmp = log(y) - 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 = Math.log(t) * a;
double tmp;
if (a <= -2.8e+78) {
tmp = t_1;
} else if (a <= 3e+28) {
tmp = Math.log(y) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * a tmp = 0 if a <= -2.8e+78: tmp = t_1 elif a <= 3e+28: tmp = math.log(y) - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * a) tmp = 0.0 if (a <= -2.8e+78) tmp = t_1; elseif (a <= 3e+28) tmp = Float64(log(y) - t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * a; tmp = 0.0; if (a <= -2.8e+78) tmp = t_1; elseif (a <= 3e+28) tmp = log(y) - t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -2.8e+78], t$95$1, If[LessEqual[a, 3e+28], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot a\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+28}:\\
\;\;\;\;\log y - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.8000000000000001e78 or 3.0000000000000001e28 < a Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6478.6%
Simplified78.6%
if -2.8000000000000001e78 < a < 3.0000000000000001e28Initial program 99.5%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in x around 0
log-lowering-log.f6468.0%
Simplified68.0%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6446.4%
Simplified46.4%
sub0-negN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6446.4%
Applied egg-rr46.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 6.8e+18) (* (log t) a) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 6.8e+18) {
tmp = log(t) * a;
} else {
tmp = 0.0 - 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 <= 6.8d+18) then
tmp = log(t) * a
else
tmp = 0.0d0 - 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 <= 6.8e+18) {
tmp = Math.log(t) * a;
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 6.8e+18: tmp = math.log(t) * a else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 6.8e+18) tmp = Float64(log(t) * a); else tmp = Float64(0.0 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 6.8e+18) tmp = log(t) * a; else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 6.8e+18], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.8 \cdot 10^{+18}:\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 6.8e18Initial program 99.3%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.4%
Simplified99.4%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6451.4%
Simplified51.4%
if 6.8e18 < t Initial program 99.9%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6475.6%
Simplified75.6%
sub0-negN/A
neg-lowering-neg.f6475.6%
Applied egg-rr75.6%
Final simplification62.8%
(FPCore (x y z t a) :precision binary64 (- (* (log t) (- a 0.5)) t))
double code(double x, double y, double z, double t, double a) {
return (log(t) * (a - 0.5)) - 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(t) * (a - 0.5d0)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(t) * (a - 0.5)) - t;
}
def code(x, y, z, t, a): return (math.log(t) * (a - 0.5)) - t
function code(x, y, z, t, a) return Float64(Float64(log(t) * Float64(a - 0.5)) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(t) * (a - 0.5)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log t \cdot \left(a - 0.5\right) - t
\end{array}
Initial program 99.6%
Taylor expanded in t around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-lowering-neg.f6477.5%
Simplified77.5%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.00115) (log y) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.00115) {
tmp = log(y);
} else {
tmp = 0.0 - 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 <= 0.00115d0) then
tmp = log(y)
else
tmp = 0.0d0 - 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 <= 0.00115) {
tmp = Math.log(y);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.00115: tmp = math.log(y) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.00115) tmp = log(y); else tmp = Float64(0.0 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.00115) tmp = log(y); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.00115], N[Log[y], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.00115:\\
\;\;\;\;\log y\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 0.00115Initial program 99.3%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.4%
Simplified99.4%
Taylor expanded in x around 0
log-lowering-log.f6461.9%
Simplified61.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f646.4%
Simplified6.4%
Taylor expanded in t around 0
log-lowering-log.f646.4%
Simplified6.4%
if 0.00115 < t Initial program 99.9%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6471.5%
Simplified71.5%
sub0-negN/A
neg-lowering-neg.f6471.5%
Applied egg-rr71.5%
Final simplification39.5%
(FPCore (x y z t a) :precision binary64 (- 0.0 t))
double code(double x, double y, double z, double t, double a) {
return 0.0 - 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 = 0.0d0 - t
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0 - t;
}
def code(x, y, z, t, a): return 0.0 - t
function code(x, y, z, t, a) return Float64(0.0 - t) end
function tmp = code(x, y, z, t, a) tmp = 0.0 - t; end
code[x_, y_, z_, t_, a_] := N[(0.0 - t), $MachinePrecision]
\begin{array}{l}
\\
0 - t
\end{array}
Initial program 99.6%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6437.7%
Simplified37.7%
sub0-negN/A
neg-lowering-neg.f6437.7%
Applied egg-rr37.7%
Final simplification37.7%
(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%
associate--l+N/A
associate-+l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
associate-+l-N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-sub0N/A
associate--r-N/A
neg-sub0N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f6499.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6437.7%
Simplified37.7%
flip--N/A
metadata-evalN/A
neg-sub0N/A
+-lft-identityN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f6418.7%
Applied egg-rr18.7%
div-subN/A
flip3--N/A
Applied egg-rr2.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(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 2024152
(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))))