
(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}
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (log t) (- a 0.5))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5));
}
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) + (log(t) * (a - 0.5d0))
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) + (Math.log(t) * (a - 0.5));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + (math.log(t) * (a - 0.5))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(log(t) * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5)); 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[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \log t \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))) (t_2 (- (* (log t) (- a 0.5)) t)))
(if (<= t_1 -750.0)
t_2
(if (<= t_1 695.2)
(+ (log (* (+ x y) z)) (- (* (log t) (+ a -0.5)) t))
t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double t_2 = (log(t) * (a - 0.5)) - t;
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 695.2) {
tmp = log(((x + y) * z)) + ((log(t) * (a + -0.5)) - t);
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = log((x + y)) + log(z)
t_2 = (log(t) * (a - 0.5d0)) - t
if (t_1 <= (-750.0d0)) then
tmp = t_2
else if (t_1 <= 695.2d0) then
tmp = log(((x + y) * z)) + ((log(t) * (a + (-0.5d0))) - t)
else
tmp = t_2
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((x + y)) + Math.log(z);
double t_2 = (Math.log(t) * (a - 0.5)) - t;
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 695.2) {
tmp = Math.log(((x + y) * z)) + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) t_2 = (math.log(t) * (a - 0.5)) - t tmp = 0 if t_1 <= -750.0: tmp = t_2 elif t_1 <= 695.2: tmp = math.log(((x + y) * z)) + ((math.log(t) * (a + -0.5)) - t) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) t_2 = Float64(Float64(log(t) * Float64(a - 0.5)) - t) tmp = 0.0 if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 695.2) tmp = Float64(log(Float64(Float64(x + y) * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); t_2 = (log(t) * (a - 0.5)) - t; tmp = 0.0; if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 695.2) tmp = log(((x + y) * z)) + ((log(t) * (a + -0.5)) - t); else tmp = t_2; end tmp_2 = 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]}, Block[{t$95$2 = N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], t$95$2, If[LessEqual[t$95$1, 695.2], N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
t_2 := \log t \cdot \left(a - 0.5\right) - t\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 695.2:\\
\;\;\;\;\log \left(\left(x + y\right) \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 695.20000000000005 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6479.9%
Simplified79.9%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 695.20000000000005Initial program 99.6%
associate-+l-N/A
--lowering--.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification95.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (log (+ x y)) (log z))) (t_2 (- (* (log t) (- a 0.5)) t))) (if (<= t_1 -750.0) t_2 (if (<= t_1 695.2) (+ t_2 (log (* y z))) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double t_2 = (log(t) * (a - 0.5)) - t;
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 695.2) {
tmp = t_2 + log((y * z));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = log((x + y)) + log(z)
t_2 = (log(t) * (a - 0.5d0)) - t
if (t_1 <= (-750.0d0)) then
tmp = t_2
else if (t_1 <= 695.2d0) then
tmp = t_2 + log((y * z))
else
tmp = t_2
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((x + y)) + Math.log(z);
double t_2 = (Math.log(t) * (a - 0.5)) - t;
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 695.2) {
tmp = t_2 + Math.log((y * z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) t_2 = (math.log(t) * (a - 0.5)) - t tmp = 0 if t_1 <= -750.0: tmp = t_2 elif t_1 <= 695.2: tmp = t_2 + math.log((y * z)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) t_2 = Float64(Float64(log(t) * Float64(a - 0.5)) - t) tmp = 0.0 if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 695.2) tmp = Float64(t_2 + log(Float64(y * z))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); t_2 = (log(t) * (a - 0.5)) - t; tmp = 0.0; if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 695.2) tmp = t_2 + log((y * z)); else tmp = t_2; end tmp_2 = 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]}, Block[{t$95$2 = N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], t$95$2, If[LessEqual[t$95$1, 695.2], N[(t$95$2 + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
t_2 := \log t \cdot \left(a - 0.5\right) - t\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 695.2:\\
\;\;\;\;t\_2 + \log \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 695.20000000000005 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6479.9%
Simplified79.9%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 695.20000000000005Initial 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
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
log-recN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
--lowering--.f6492.0%
Simplified92.0%
associate-+r-N/A
--lowering--.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lft-identityN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
--lowering--.f6492.0%
Applied egg-rr92.0%
Taylor expanded in x around 0
log-lowering-log.f64N/A
*-commutativeN/A
*-lowering-*.f6468.5%
Simplified68.5%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6473.2%
Simplified73.2%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) (- a 0.5)))) (if (<= t 0.33) (+ (+ (log (+ x y)) (log 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 <= 0.33) {
tmp = (log((x + y)) + log(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 <= 0.33d0) then
tmp = (log((x + y)) + log(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 <= 0.33) {
tmp = (Math.log((x + y)) + Math.log(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 <= 0.33: tmp = (math.log((x + y)) + math.log(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 <= 0.33) tmp = Float64(Float64(log(Float64(x + y)) + log(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 <= 0.33) tmp = (log((x + y)) + log(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, 0.33], N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[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 0.33:\\
\;\;\;\;\left(\log \left(x + y\right) + \log z\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 0.330000000000000016Initial program 99.3%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6498.8%
Simplified98.8%
if 0.330000000000000016 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.7%
Simplified98.7%
Final simplification98.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) (- a 0.5)))) (if (<= t 0.33) (+ (log (+ x y)) (+ (log 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 <= 0.33) {
tmp = log((x + y)) + (log(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 <= 0.33d0) then
tmp = log((x + y)) + (log(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 <= 0.33) {
tmp = Math.log((x + y)) + (Math.log(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 <= 0.33: tmp = math.log((x + y)) + (math.log(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 <= 0.33) tmp = Float64(log(Float64(x + y)) + Float64(log(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 <= 0.33) tmp = log((x + y)) + (log(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, 0.33], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $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 0.33:\\
\;\;\;\;\log \left(x + y\right) + \left(\log z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 0.330000000000000016Initial 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%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6498.7%
Simplified98.7%
if 0.330000000000000016 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.33) (+ (log z) (+ (log (+ x y)) (* (log t) (+ a -0.5)))) (- (* (log t) (- a 0.5)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.33) {
tmp = log(z) + (log((x + y)) + (log(t) * (a + -0.5)));
} else {
tmp = (log(t) * (a - 0.5)) - 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.33d0) then
tmp = log(z) + (log((x + y)) + (log(t) * (a + (-0.5d0))))
else
tmp = (log(t) * (a - 0.5d0)) - 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.33) {
tmp = Math.log(z) + (Math.log((x + y)) + (Math.log(t) * (a + -0.5)));
} else {
tmp = (Math.log(t) * (a - 0.5)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.33: tmp = math.log(z) + (math.log((x + y)) + (math.log(t) * (a + -0.5))) else: tmp = (math.log(t) * (a - 0.5)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.33) tmp = Float64(log(z) + Float64(log(Float64(x + y)) + Float64(log(t) * Float64(a + -0.5)))); else tmp = Float64(Float64(log(t) * Float64(a - 0.5)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.33) tmp = log(z) + (log((x + y)) + (log(t) * (a + -0.5))); else tmp = (log(t) * (a - 0.5)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.33], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.33:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot \left(a + -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) - t\\
\end{array}
\end{array}
if t < 0.330000000000000016Initial program 99.3%
Taylor expanded in t around 0
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6498.7%
Simplified98.7%
if 0.330000000000000016 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.7%
Simplified98.7%
Final simplification98.7%
(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.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.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) (- a 0.5)))) (if (<= t 4.8e-11) (+ (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 <= 4.8e-11) {
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 <= 4.8d-11) 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 <= 4.8e-11) {
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 <= 4.8e-11: 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 <= 4.8e-11) 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 <= 4.8e-11) 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, 4.8e-11], 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 4.8 \cdot 10^{-11}:\\
\;\;\;\;\log \left(y \cdot z\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 4.8000000000000002e-11Initial 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%
Taylor expanded in t around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-/l*N/A
associate-*r*N/A
*-lowering-*.f64N/A
log-recN/A
mul-1-negN/A
associate-*r*N/A
metadata-evalN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
--lowering--.f6476.8%
Simplified76.8%
associate-+r-N/A
--lowering--.f64N/A
sum-logN/A
log-lowering-log.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lft-identityN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
--lowering--.f6464.6%
Applied egg-rr64.6%
Taylor expanded in x around 0
log-lowering-log.f64N/A
*-commutativeN/A
*-lowering-*.f6446.3%
Simplified46.3%
Taylor expanded in t around 0
--lowering--.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
--lowering--.f6458.0%
Simplified58.0%
if 4.8000000000000002e-11 < t Initial program 99.9%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6498.1%
Simplified98.1%
Final simplification80.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* a (log t)))) (if (<= a -7e+38) t_1 (if (<= a 1.12e+26) (- (log (+ x y)) 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 <= -7e+38) {
tmp = t_1;
} else if (a <= 1.12e+26) {
tmp = log((x + 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 = a * log(t)
if (a <= (-7d+38)) then
tmp = t_1
else if (a <= 1.12d+26) then
tmp = log((x + 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 = a * Math.log(t);
double tmp;
if (a <= -7e+38) {
tmp = t_1;
} else if (a <= 1.12e+26) {
tmp = Math.log((x + y)) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -7e+38: tmp = t_1 elif a <= 1.12e+26: tmp = math.log((x + y)) - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -7e+38) tmp = t_1; elseif (a <= 1.12e+26) tmp = Float64(log(Float64(x + y)) - 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 <= -7e+38) tmp = t_1; elseif (a <= 1.12e+26) tmp = log((x + y)) - 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[a, -7e+38], t$95$1, If[LessEqual[a, 1.12e+26], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -7 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{+26}:\\
\;\;\;\;\log \left(x + y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.00000000000000003e38 or 1.1200000000000001e26 < a 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%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6473.5%
Simplified73.5%
if -7.00000000000000003e38 < a < 1.1200000000000001e26Initial 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--.f6460.8%
Simplified60.8%
Final simplification66.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* a (log t)))) (if (<= a -2.5e+41) t_1 (if (<= a 2.8e+16) (- (log y) 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 <= -2.5e+41) {
tmp = t_1;
} else if (a <= 2.8e+16) {
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 = a * log(t)
if (a <= (-2.5d+41)) then
tmp = t_1
else if (a <= 2.8d+16) 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 = a * Math.log(t);
double tmp;
if (a <= -2.5e+41) {
tmp = t_1;
} else if (a <= 2.8e+16) {
tmp = Math.log(y) - t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -2.5e+41: tmp = t_1 elif a <= 2.8e+16: tmp = math.log(y) - t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -2.5e+41) tmp = t_1; elseif (a <= 2.8e+16) tmp = Float64(log(y) - 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 <= -2.5e+41) tmp = t_1; elseif (a <= 2.8e+16) tmp = log(y) - 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[a, -2.5e+41], t$95$1, If[LessEqual[a, 2.8e+16], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+16}:\\
\;\;\;\;\log y - t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.50000000000000011e41 or 2.8e16 < a 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%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6473.5%
Simplified73.5%
if -2.50000000000000011e41 < a < 2.8e16Initial 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--.f6460.8%
Simplified60.8%
Taylor expanded in x around 0
remove-double-negN/A
log-recN/A
mul-1-negN/A
--lowering--.f64N/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
log-lowering-log.f6448.2%
Simplified48.2%
Final simplification59.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 240000.0) (* a (log t)) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 240000.0) {
tmp = a * log(t);
} 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 <= 240000.0d0) then
tmp = a * log(t)
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 <= 240000.0) {
tmp = a * Math.log(t);
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 240000.0: tmp = a * math.log(t) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 240000.0) tmp = Float64(a * log(t)); else tmp = Float64(0.0 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 240000.0) tmp = a * log(t); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 240000.0], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 240000:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 2.4e5Initial 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%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6449.9%
Simplified49.9%
if 2.4e5 < 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--.f6477.4%
Simplified77.4%
sub0-negN/A
neg-lowering-neg.f6477.4%
Applied egg-rr77.4%
Final simplification64.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 460.0) (log (+ x y)) (- 0.0 t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 460.0) {
tmp = log((x + 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 <= 460.0d0) then
tmp = log((x + 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 <= 460.0) {
tmp = Math.log((x + y));
} else {
tmp = 0.0 - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 460.0: tmp = math.log((x + y)) else: tmp = 0.0 - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 460.0) tmp = log(Float64(x + 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 <= 460.0) tmp = log((x + y)); else tmp = 0.0 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 460.0], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], N[(0.0 - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 460:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;0 - t\\
\end{array}
\end{array}
if t < 460Initial 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%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f649.2%
Simplified9.2%
Taylor expanded in t around 0
log-lowering-log.f64N/A
+-lowering-+.f649.2%
Simplified9.2%
if 460 < 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--.f6477.4%
Simplified77.4%
sub0-negN/A
neg-lowering-neg.f6477.4%
Applied egg-rr77.4%
Final simplification46.2%
(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.7%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6478.6%
Simplified78.6%
Final simplification78.6%
(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.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.6%
Simplified99.6%
Taylor expanded in t around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6443.4%
Simplified43.4%
sub0-negN/A
neg-lowering-neg.f6443.4%
Applied egg-rr43.4%
Final simplification43.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 2024155
(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))))