
(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 22 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 z) t) (fma (+ a -0.5) (log t) (log (+ x y)))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + fma((a + -0.5), log(t), log((x + y)));
}
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + fma(Float64(a + -0.5), log(t), log(Float64(x + y)))) end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \mathsf{fma}\left(a + -0.5, \log t, \log \left(x + y\right)\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log z) (log (+ x y))))
(t_2 (+ (log y) (- (log (* z (pow t -0.5))) t))))
(if (<= t_1 -750.0)
t_2
(if (<= t_1 710.0)
(+ (* (log t) (- a 0.5)) (- (log (* z (+ x y))) t))
(if (<= t_1 858.0) t_2 (* a (log t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(z) + log((x + y));
double t_2 = log(y) + (log((z * pow(t, -0.5))) - t);
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 710.0) {
tmp = (log(t) * (a - 0.5)) + (log((z * (x + y))) - t);
} else if (t_1 <= 858.0) {
tmp = t_2;
} else {
tmp = a * log(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) :: t_2
real(8) :: tmp
t_1 = log(z) + log((x + y))
t_2 = log(y) + (log((z * (t ** (-0.5d0)))) - t)
if (t_1 <= (-750.0d0)) then
tmp = t_2
else if (t_1 <= 710.0d0) then
tmp = (log(t) * (a - 0.5d0)) + (log((z * (x + y))) - t)
else if (t_1 <= 858.0d0) then
tmp = t_2
else
tmp = a * log(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(z) + Math.log((x + y));
double t_2 = Math.log(y) + (Math.log((z * Math.pow(t, -0.5))) - t);
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 710.0) {
tmp = (Math.log(t) * (a - 0.5)) + (Math.log((z * (x + y))) - t);
} else if (t_1 <= 858.0) {
tmp = t_2;
} else {
tmp = a * Math.log(t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(z) + math.log((x + y)) t_2 = math.log(y) + (math.log((z * math.pow(t, -0.5))) - t) tmp = 0 if t_1 <= -750.0: tmp = t_2 elif t_1 <= 710.0: tmp = (math.log(t) * (a - 0.5)) + (math.log((z * (x + y))) - t) elif t_1 <= 858.0: tmp = t_2 else: tmp = a * math.log(t) return tmp
function code(x, y, z, t, a) t_1 = Float64(log(z) + log(Float64(x + y))) t_2 = Float64(log(y) + Float64(log(Float64(z * (t ^ -0.5))) - t)) tmp = 0.0 if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 710.0) tmp = Float64(Float64(log(t) * Float64(a - 0.5)) + Float64(log(Float64(z * Float64(x + y))) - t)); elseif (t_1 <= 858.0) tmp = t_2; else tmp = Float64(a * log(t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(z) + log((x + y)); t_2 = log(y) + (log((z * (t ^ -0.5))) - t); tmp = 0.0; if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 710.0) tmp = (log(t) * (a - 0.5)) + (log((z * (x + y))) - t); elseif (t_1 <= 858.0) tmp = t_2; else tmp = a * log(t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[y], $MachinePrecision] + N[(N[Log[N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], t$95$2, If[LessEqual[t$95$1, 710.0], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 858.0], t$95$2, N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log z + \log \left(x + y\right)\\
t_2 := \log y + \left(\log \left(z \cdot {t}^{-0.5}\right) - t\right)\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 710:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) + \left(\log \left(z \cdot \left(x + y\right)\right) - t\right)\\
\mathbf{elif}\;t\_1 \leq 858:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 710 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 858Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 66.7%
associate--l+66.7%
sub-neg66.7%
metadata-eval66.7%
Simplified66.7%
+-commutative66.7%
*-un-lft-identity66.7%
fma-define66.7%
add-log-exp34.2%
sum-log34.2%
exp-to-pow34.2%
Applied egg-rr34.2%
fma-undefine34.2%
*-lft-identity34.2%
Simplified34.2%
Taylor expanded in a around 0 34.1%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 710Initial program 99.5%
*-un-lft-identity99.5%
+-commutative99.5%
sum-log99.6%
Applied egg-rr99.6%
*-lft-identity99.6%
Simplified99.6%
if 858 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around inf 55.4%
*-commutative55.4%
Simplified55.4%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) (- a 0.5))) (t_2 (+ (log z) (log (+ x y)))))
(if (or (<= t_2 -750.0) (not (<= t_2 710.0)))
(+ (log y) (+ (log z) t_1))
(+ t_1 (- (log (* z (+ x y))) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * (a - 0.5);
double t_2 = log(z) + log((x + y));
double tmp;
if ((t_2 <= -750.0) || !(t_2 <= 710.0)) {
tmp = log(y) + (log(z) + t_1);
} else {
tmp = t_1 + (log((z * (x + y))) - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
t_2 = log(z) + log((x + y))
if ((t_2 <= (-750.0d0)) .or. (.not. (t_2 <= 710.0d0))) then
tmp = log(y) + (log(z) + t_1)
else
tmp = t_1 + (log((z * (x + y))) - 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 t_2 = Math.log(z) + Math.log((x + y));
double tmp;
if ((t_2 <= -750.0) || !(t_2 <= 710.0)) {
tmp = Math.log(y) + (Math.log(z) + t_1);
} else {
tmp = t_1 + (Math.log((z * (x + y))) - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * (a - 0.5) t_2 = math.log(z) + math.log((x + y)) tmp = 0 if (t_2 <= -750.0) or not (t_2 <= 710.0): tmp = math.log(y) + (math.log(z) + t_1) else: tmp = t_1 + (math.log((z * (x + y))) - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * Float64(a - 0.5)) t_2 = Float64(log(z) + log(Float64(x + y))) tmp = 0.0 if ((t_2 <= -750.0) || !(t_2 <= 710.0)) tmp = Float64(log(y) + Float64(log(z) + t_1)); else tmp = Float64(t_1 + Float64(log(Float64(z * Float64(x + y))) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * (a - 0.5); t_2 = log(z) + log((x + y)); tmp = 0.0; if ((t_2 <= -750.0) || ~((t_2 <= 710.0))) tmp = log(y) + (log(z) + t_1); else tmp = t_1 + (log((z * (x + y))) - 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]}, Block[{t$95$2 = N[(N[Log[z], $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -750.0], N[Not[LessEqual[t$95$2, 710.0]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot \left(a - 0.5\right)\\
t_2 := \log z + \log \left(x + y\right)\\
\mathbf{if}\;t\_2 \leq -750 \lor \neg \left(t\_2 \leq 710\right):\\
\;\;\;\;\log y + \left(\log z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(\log \left(z \cdot \left(x + y\right)\right) - t\right)\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 710 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 72.1%
associate--l+72.1%
sub-neg72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in t around 0 54.2%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 710Initial program 99.5%
*-un-lft-identity99.5%
+-commutative99.5%
sum-log99.6%
Applied egg-rr99.6%
*-lft-identity99.6%
Simplified99.6%
Final simplification88.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log z) (log (+ x y)))))
(if (or (<= t_1 -750.0) (not (<= t_1 710.0)))
(* a (log t))
(+ (* (log t) (- a 0.5)) (- (log (* z (+ x y))) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(z) + log((x + y));
double tmp;
if ((t_1 <= -750.0) || !(t_1 <= 710.0)) {
tmp = a * log(t);
} else {
tmp = (log(t) * (a - 0.5)) + (log((z * (x + y))) - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = log(z) + log((x + y))
if ((t_1 <= (-750.0d0)) .or. (.not. (t_1 <= 710.0d0))) then
tmp = a * log(t)
else
tmp = (log(t) * (a - 0.5d0)) + (log((z * (x + y))) - 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(z) + Math.log((x + y));
double tmp;
if ((t_1 <= -750.0) || !(t_1 <= 710.0)) {
tmp = a * Math.log(t);
} else {
tmp = (Math.log(t) * (a - 0.5)) + (Math.log((z * (x + y))) - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(z) + math.log((x + y)) tmp = 0 if (t_1 <= -750.0) or not (t_1 <= 710.0): tmp = a * math.log(t) else: tmp = (math.log(t) * (a - 0.5)) + (math.log((z * (x + y))) - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(log(z) + log(Float64(x + y))) tmp = 0.0 if ((t_1 <= -750.0) || !(t_1 <= 710.0)) tmp = Float64(a * log(t)); else tmp = Float64(Float64(log(t) * Float64(a - 0.5)) + Float64(log(Float64(z * Float64(x + y))) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(z) + log((x + y)); tmp = 0.0; if ((t_1 <= -750.0) || ~((t_1 <= 710.0))) tmp = a * log(t); else tmp = (log(t) * (a - 0.5)) + (log((z * (x + y))) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -750.0], N[Not[LessEqual[t$95$1, 710.0]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log z + \log \left(x + y\right)\\
\mathbf{if}\;t\_1 \leq -750 \lor \neg \left(t\_1 \leq 710\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) + \left(\log \left(z \cdot \left(x + y\right)\right) - t\right)\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 710 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around inf 49.3%
*-commutative49.3%
Simplified49.3%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 710Initial program 99.5%
*-un-lft-identity99.5%
+-commutative99.5%
sum-log99.6%
Applied egg-rr99.6%
*-lft-identity99.6%
Simplified99.6%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log z) (log (+ x y)))))
(if (or (<= t_1 -750.0) (not (<= t_1 710.0)))
(* a (log t))
(- (+ (* (log t) (- a 0.5)) (log (* z y))) t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(z) + log((x + y));
double tmp;
if ((t_1 <= -750.0) || !(t_1 <= 710.0)) {
tmp = a * log(t);
} else {
tmp = ((log(t) * (a - 0.5)) + log((z * y))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = log(z) + log((x + y))
if ((t_1 <= (-750.0d0)) .or. (.not. (t_1 <= 710.0d0))) then
tmp = a * log(t)
else
tmp = ((log(t) * (a - 0.5d0)) + log((z * y))) - 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(z) + Math.log((x + y));
double tmp;
if ((t_1 <= -750.0) || !(t_1 <= 710.0)) {
tmp = a * Math.log(t);
} else {
tmp = ((Math.log(t) * (a - 0.5)) + Math.log((z * y))) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(z) + math.log((x + y)) tmp = 0 if (t_1 <= -750.0) or not (t_1 <= 710.0): tmp = a * math.log(t) else: tmp = ((math.log(t) * (a - 0.5)) + math.log((z * y))) - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(z) + log(Float64(x + y))) tmp = 0.0 if ((t_1 <= -750.0) || !(t_1 <= 710.0)) tmp = Float64(a * log(t)); else tmp = Float64(Float64(Float64(log(t) * Float64(a - 0.5)) + log(Float64(z * y))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(z) + log((x + y)); tmp = 0.0; if ((t_1 <= -750.0) || ~((t_1 <= 710.0))) tmp = a * log(t); else tmp = ((log(t) * (a - 0.5)) + log((z * y))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -750.0], N[Not[LessEqual[t$95$1, 710.0]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log z + \log \left(x + y\right)\\
\mathbf{if}\;t\_1 \leq -750 \lor \neg \left(t\_1 \leq 710\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log t \cdot \left(a - 0.5\right) + \log \left(z \cdot y\right)\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 710 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around inf 49.3%
*-commutative49.3%
Simplified49.3%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 710Initial program 99.5%
+-commutative99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
associate--l+99.5%
Simplified99.5%
fma-undefine99.5%
+-commutative99.5%
add-sqr-sqrt49.5%
pow249.5%
+-commutative49.5%
fma-undefine49.5%
associate-+r-49.5%
+-commutative49.5%
sum-log49.6%
Applied egg-rr49.6%
Taylor expanded in x around 0 62.7%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (- (log z) (fma (log t) (- 0.5 a) t))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + (log(z) - fma(log(t), (0.5 - a), t));
}
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(log(z) - fma(log(t), Float64(0.5 - a), t))) end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)
\end{array}
Initial program 99.5%
associate-+l-99.5%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-undefine99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.038) (+ (log y) (+ (log z) (* (log t) (- a 0.5)))) (+ (log y) (- (+ (log z) (* a (log t))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.038) {
tmp = log(y) + (log(z) + (log(t) * (a - 0.5)));
} else {
tmp = log(y) + ((log(z) + (a * log(t))) - 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.038d0) then
tmp = log(y) + (log(z) + (log(t) * (a - 0.5d0)))
else
tmp = log(y) + ((log(z) + (a * log(t))) - 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.038) {
tmp = Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)));
} else {
tmp = Math.log(y) + ((Math.log(z) + (a * Math.log(t))) - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.038: tmp = math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5))) else: tmp = math.log(y) + ((math.log(z) + (a * math.log(t))) - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.038) tmp = Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(log(y) + Float64(Float64(log(z) + Float64(a * log(t))) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.038) tmp = log(y) + (log(z) + (log(t) * (a - 0.5))); else tmp = log(y) + ((log(z) + (a * log(t))) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.038], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.038:\\
\;\;\;\;\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log y + \left(\left(\log z + a \cdot \log t\right) - t\right)\\
\end{array}
\end{array}
if t < 0.0379999999999999991Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-define99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 65.2%
associate--l+65.2%
sub-neg65.2%
metadata-eval65.2%
Simplified65.2%
Taylor expanded in t around 0 64.8%
if 0.0379999999999999991 < t Initial program 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 68.8%
associate--l+68.8%
sub-neg68.8%
metadata-eval68.8%
Simplified68.8%
Taylor expanded in a around inf 68.8%
*-commutative68.8%
Simplified68.8%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (+ (+ (- (log z) t) (log (+ x y))) (* (+ a -0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log(z) - t) + log((x + y))) + ((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(z) - t) + log((x + y))) + ((a + (-0.5d0)) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log(z) - t) + Math.log((x + y))) + ((a + -0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log(z) - t) + math.log((x + y))) + ((a + -0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(z) - t) + log(Float64(x + y))) + Float64(Float64(a + -0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log(z) - t) + log((x + y))) + ((a + -0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log z - t\right) + \log \left(x + y\right)\right) + \left(a + -0.5\right) \cdot \log t
\end{array}
Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (+ (* (+ a -0.5) (log t)) (log y))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (((a + -0.5) * log(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) - t) + (((a + (-0.5d0)) * log(t)) + log(y))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + (((a + -0.5) * Math.log(t)) + Math.log(y));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (((a + -0.5) * math.log(t)) + math.log(y))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(Float64(Float64(a + -0.5) * log(t)) + log(y))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (((a + -0.5) * log(t)) + log(y)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\left(a + -0.5\right) \cdot \log t + \log y\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 66.8%
+-commutative66.8%
sub-neg66.8%
metadata-eval66.8%
Simplified66.8%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (+ (log y) (- (+ (log z) (* (+ a -0.5) (log t))) t)))
double code(double x, double y, double z, double t, double a) {
return log(y) + ((log(z) + ((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 = log(y) + ((log(z) + ((a + (-0.5d0)) * log(t))) - t)
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log(y) + ((Math.log(z) + ((a + -0.5) * Math.log(t))) - t);
}
def code(x, y, z, t, a): return math.log(y) + ((math.log(z) + ((a + -0.5) * math.log(t))) - t)
function code(x, y, z, t, a) return Float64(log(y) + Float64(Float64(log(z) + Float64(Float64(a + -0.5) * log(t))) - t)) end
function tmp = code(x, y, z, t, a) tmp = log(y) + ((log(z) + ((a + -0.5) * log(t))) - t); end
code[x_, y_, z_, t_, a_] := N[(N[Log[y], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log y + \left(\left(\log z + \left(a + -0.5\right) \cdot \log t\right) - t\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 66.8%
associate--l+66.8%
sub-neg66.8%
metadata-eval66.8%
Simplified66.8%
Final simplification66.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= a -2600.0)
t_1
(if (<= a 7.8e-67)
(+ (- (log z) t) (log (+ x y)))
(if (<= a 2.8) (log (* y (* z (pow t (+ a -0.5))))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (a <= -2600.0) {
tmp = t_1;
} else if (a <= 7.8e-67) {
tmp = (log(z) - t) + log((x + y));
} else if (a <= 2.8) {
tmp = log((y * (z * pow(t, (a + -0.5)))));
} 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 <= (-2600.0d0)) then
tmp = t_1
else if (a <= 7.8d-67) then
tmp = (log(z) - t) + log((x + y))
else if (a <= 2.8d0) then
tmp = log((y * (z * (t ** (a + (-0.5d0))))))
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 <= -2600.0) {
tmp = t_1;
} else if (a <= 7.8e-67) {
tmp = (Math.log(z) - t) + Math.log((x + y));
} else if (a <= 2.8) {
tmp = Math.log((y * (z * Math.pow(t, (a + -0.5)))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -2600.0: tmp = t_1 elif a <= 7.8e-67: tmp = (math.log(z) - t) + math.log((x + y)) elif a <= 2.8: tmp = math.log((y * (z * math.pow(t, (a + -0.5))))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -2600.0) tmp = t_1; elseif (a <= 7.8e-67) tmp = Float64(Float64(log(z) - t) + log(Float64(x + y))); elseif (a <= 2.8) tmp = log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))); 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 <= -2600.0) tmp = t_1; elseif (a <= 7.8e-67) tmp = (log(z) - t) + log((x + y)); elseif (a <= 2.8) tmp = log((y * (z * (t ^ (a + -0.5))))); 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, -2600.0], t$95$1, If[LessEqual[a, 7.8e-67], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8], N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -2600:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-67}:\\
\;\;\;\;\left(\log z - t\right) + \log \left(x + y\right)\\
\mathbf{elif}\;a \leq 2.8:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2600 or 2.7999999999999998 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -2600 < a < 7.7999999999999997e-67Initial program 99.4%
associate-+l-99.4%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-undefine99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in t around inf 51.4%
if 7.7999999999999997e-67 < a < 2.7999999999999998Initial program 98.7%
associate--l+98.7%
+-commutative98.7%
associate-+l+99.1%
+-commutative99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 54.4%
associate--l+54.4%
sub-neg54.4%
metadata-eval54.4%
Simplified54.4%
+-commutative54.4%
*-un-lft-identity54.4%
fma-define54.4%
add-log-exp54.4%
sum-log45.8%
exp-to-pow45.8%
Applied egg-rr45.8%
fma-undefine45.8%
*-lft-identity45.8%
Simplified45.8%
Taylor expanded in t around 0 36.8%
exp-to-pow36.8%
sub-neg36.8%
metadata-eval36.8%
Simplified36.8%
sum-log37.4%
Applied egg-rr37.4%
Final simplification64.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= a -2000.0)
t_1
(if (<= a 1.3e-66)
(+ (- (log z) t) (log (+ x y)))
(if (<= a 3.8) (log (* (* z y) (pow t (+ a -0.5)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (a <= -2000.0) {
tmp = t_1;
} else if (a <= 1.3e-66) {
tmp = (log(z) - t) + log((x + y));
} else if (a <= 3.8) {
tmp = log(((z * y) * pow(t, (a + -0.5))));
} 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 <= (-2000.0d0)) then
tmp = t_1
else if (a <= 1.3d-66) then
tmp = (log(z) - t) + log((x + y))
else if (a <= 3.8d0) then
tmp = log(((z * y) * (t ** (a + (-0.5d0)))))
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 <= -2000.0) {
tmp = t_1;
} else if (a <= 1.3e-66) {
tmp = (Math.log(z) - t) + Math.log((x + y));
} else if (a <= 3.8) {
tmp = Math.log(((z * y) * Math.pow(t, (a + -0.5))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -2000.0: tmp = t_1 elif a <= 1.3e-66: tmp = (math.log(z) - t) + math.log((x + y)) elif a <= 3.8: tmp = math.log(((z * y) * math.pow(t, (a + -0.5)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -2000.0) tmp = t_1; elseif (a <= 1.3e-66) tmp = Float64(Float64(log(z) - t) + log(Float64(x + y))); elseif (a <= 3.8) tmp = log(Float64(Float64(z * y) * (t ^ Float64(a + -0.5)))); 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 <= -2000.0) tmp = t_1; elseif (a <= 1.3e-66) tmp = (log(z) - t) + log((x + y)); elseif (a <= 3.8) tmp = log(((z * y) * (t ^ (a + -0.5)))); 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, -2000.0], t$95$1, If[LessEqual[a, 1.3e-66], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8], N[Log[N[(N[(z * y), $MachinePrecision] * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -2000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-66}:\\
\;\;\;\;\left(\log z - t\right) + \log \left(x + y\right)\\
\mathbf{elif}\;a \leq 3.8:\\
\;\;\;\;\log \left(\left(z \cdot y\right) \cdot {t}^{\left(a + -0.5\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2e3 or 3.7999999999999998 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -2e3 < a < 1.2999999999999999e-66Initial program 99.4%
associate-+l-99.4%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-undefine99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in t around inf 51.4%
if 1.2999999999999999e-66 < a < 3.7999999999999998Initial program 98.7%
associate--l+98.7%
+-commutative98.7%
associate-+l+99.1%
+-commutative99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 54.4%
associate--l+54.4%
sub-neg54.4%
metadata-eval54.4%
Simplified54.4%
+-commutative54.4%
*-un-lft-identity54.4%
fma-define54.4%
add-log-exp54.4%
sum-log45.8%
exp-to-pow45.8%
Applied egg-rr45.8%
fma-undefine45.8%
*-lft-identity45.8%
Simplified45.8%
Taylor expanded in t around 0 36.8%
exp-to-pow36.8%
sub-neg36.8%
metadata-eval36.8%
Simplified36.8%
*-un-lft-identity36.8%
sum-log37.4%
Applied egg-rr37.4%
*-lft-identity37.4%
*-commutative37.4%
associate-*r*37.2%
+-commutative37.2%
Simplified37.2%
Final simplification64.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-10) (not (<= a 8.5))) (* a (log t)) (- (log (* (* z y) (pow t (+ a -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-10) || !(a <= 8.5)) {
tmp = a * log(t);
} else {
tmp = log(((z * y) * pow(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 ((a <= (-3d-10)) .or. (.not. (a <= 8.5d0))) then
tmp = a * log(t)
else
tmp = log(((z * y) * (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 ((a <= -3e-10) || !(a <= 8.5)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log(((z * y) * Math.pow(t, (a + -0.5)))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-10) or not (a <= 8.5): tmp = a * math.log(t) else: tmp = math.log(((z * y) * math.pow(t, (a + -0.5)))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-10) || !(a <= 8.5)) tmp = Float64(a * log(t)); else tmp = Float64(log(Float64(Float64(z * y) * (t ^ Float64(a + -0.5)))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-10) || ~((a <= 8.5))) tmp = a * log(t); else tmp = log(((z * y) * (t ^ (a + -0.5)))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-10], N[Not[LessEqual[a, 8.5]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(N[(z * y), $MachinePrecision] * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-10} \lor \neg \left(a \leq 8.5\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log \left(\left(z \cdot y\right) \cdot {t}^{\left(a + -0.5\right)}\right) - t\\
\end{array}
\end{array}
if a < -3e-10 or 8.5 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 75.9%
*-commutative75.9%
Simplified75.9%
if -3e-10 < a < 8.5Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 59.9%
associate--l+59.9%
sub-neg59.9%
metadata-eval59.9%
Simplified59.9%
associate-+r-59.9%
add-log-exp53.3%
sum-log40.9%
exp-sum41.0%
add-exp-log41.0%
exp-to-pow41.1%
Applied egg-rr41.1%
associate-*r*41.8%
Simplified41.8%
Final simplification60.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-10) (not (<= a 6.2))) (* a (log t)) (- (log (* y (* z (pow t (+ a -0.5))))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-10) || !(a <= 6.2)) {
tmp = a * log(t);
} else {
tmp = log((y * (z * pow(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 ((a <= (-3d-10)) .or. (.not. (a <= 6.2d0))) then
tmp = a * log(t)
else
tmp = log((y * (z * (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 ((a <= -3e-10) || !(a <= 6.2)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log((y * (z * Math.pow(t, (a + -0.5))))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-10) or not (a <= 6.2): tmp = a * math.log(t) else: tmp = math.log((y * (z * math.pow(t, (a + -0.5))))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-10) || !(a <= 6.2)) tmp = Float64(a * log(t)); else tmp = Float64(log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-10) || ~((a <= 6.2))) tmp = a * log(t); else tmp = log((y * (z * (t ^ (a + -0.5))))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-10], N[Not[LessEqual[a, 6.2]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-10} \lor \neg \left(a \leq 6.2\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right) - t\\
\end{array}
\end{array}
if a < -3e-10 or 6.20000000000000018 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 75.9%
*-commutative75.9%
Simplified75.9%
if -3e-10 < a < 6.20000000000000018Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 59.9%
associate--l+59.9%
sub-neg59.9%
metadata-eval59.9%
Simplified59.9%
associate-+r-59.9%
add-log-exp53.3%
sum-log40.9%
exp-sum41.0%
add-exp-log41.0%
exp-to-pow41.1%
Applied egg-rr41.1%
Final simplification59.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2600.0) (not (<= a 850000000.0))) (* a (log t)) (+ (- (log z) t) (log (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 850000000.0)) {
tmp = a * log(t);
} else {
tmp = (log(z) - t) + log((x + y));
}
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 <= (-2600.0d0)) .or. (.not. (a <= 850000000.0d0))) then
tmp = a * log(t)
else
tmp = (log(z) - t) + log((x + y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 850000000.0)) {
tmp = a * Math.log(t);
} else {
tmp = (Math.log(z) - t) + Math.log((x + y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2600.0) or not (a <= 850000000.0): tmp = a * math.log(t) else: tmp = (math.log(z) - t) + math.log((x + y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2600.0) || !(a <= 850000000.0)) tmp = Float64(a * log(t)); else tmp = Float64(Float64(log(z) - t) + log(Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2600.0) || ~((a <= 850000000.0))) tmp = a * log(t); else tmp = (log(z) - t) + log((x + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2600.0], N[Not[LessEqual[a, 850000000.0]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2600 \lor \neg \left(a \leq 850000000\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + \log \left(x + y\right)\\
\end{array}
\end{array}
if a < -2600 or 8.5e8 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -2600 < a < 8.5e8Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t around inf 49.8%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2600.0) (not (<= a 16500000.0))) (* a (log t)) (+ (log z) (- (log y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 16500000.0)) {
tmp = a * log(t);
} else {
tmp = log(z) + (log(y) - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2600.0d0)) .or. (.not. (a <= 16500000.0d0))) then
tmp = a * log(t)
else
tmp = log(z) + (log(y) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 16500000.0)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log(z) + (Math.log(y) - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2600.0) or not (a <= 16500000.0): tmp = a * math.log(t) else: tmp = math.log(z) + (math.log(y) - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2600.0) || !(a <= 16500000.0)) tmp = Float64(a * log(t)); else tmp = Float64(log(z) + Float64(log(y) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2600.0) || ~((a <= 16500000.0))) tmp = a * log(t); else tmp = log(z) + (log(y) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2600.0], N[Not[LessEqual[a, 16500000.0]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2600 \lor \neg \left(a \leq 16500000\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log z + \left(\log y - t\right)\\
\end{array}
\end{array}
if a < -2600 or 1.65e7 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -2600 < a < 1.65e7Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t around inf 49.8%
Taylor expanded in x around 0 36.6%
remove-double-neg36.6%
log-rec36.6%
mul-1-neg36.6%
+-commutative36.6%
associate--l+36.6%
mul-1-neg36.6%
log-rec36.6%
remove-double-neg36.6%
Simplified36.6%
Final simplification58.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2600.0) (not (<= a 550000000000.0))) (* a (log t)) (- (log y) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 550000000000.0)) {
tmp = a * log(t);
} else {
tmp = log(y) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2600.0d0)) .or. (.not. (a <= 550000000000.0d0))) then
tmp = a * log(t)
else
tmp = log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 550000000000.0)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2600.0) or not (a <= 550000000000.0): tmp = a * math.log(t) else: tmp = math.log(y) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2600.0) || !(a <= 550000000000.0)) tmp = Float64(a * log(t)); else tmp = Float64(log(y) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2600.0) || ~((a <= 550000000000.0))) tmp = a * log(t); else tmp = log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2600.0], N[Not[LessEqual[a, 550000000000.0]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2600 \lor \neg \left(a \leq 550000000000\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log y - t\\
\end{array}
\end{array}
if a < -2600 or 5.5e11 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -2600 < a < 5.5e11Initial program 99.4%
associate--l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 59.7%
associate--l+59.7%
sub-neg59.7%
metadata-eval59.7%
Simplified59.7%
add-sqr-sqrt0.0%
pow20.0%
Applied egg-rr0.0%
Taylor expanded in t around inf 59.8%
associate--l+59.8%
mul-1-neg59.8%
sub-neg59.8%
metadata-eval59.8%
associate-/l*59.7%
distribute-lft-neg-in59.7%
log-rec59.7%
remove-double-neg59.7%
sub-neg59.7%
metadata-eval59.7%
Simplified59.7%
Taylor expanded in t around inf 35.8%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2600.0) (not (<= a 1200.0))) (* a (log t)) (+ -1.0 (* t (+ -1.0 (/ 1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2600.0) || !(a <= 1200.0)) {
tmp = a * log(t);
} else {
tmp = -1.0 + (t * (-1.0 + (1.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 ((a <= (-2600.0d0)) .or. (.not. (a <= 1200.0d0))) then
tmp = a * log(t)
else
tmp = (-1.0d0) + (t * ((-1.0d0) + (1.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 ((a <= -2600.0) || !(a <= 1200.0)) {
tmp = a * Math.log(t);
} else {
tmp = -1.0 + (t * (-1.0 + (1.0 / t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2600.0) or not (a <= 1200.0): tmp = a * math.log(t) else: tmp = -1.0 + (t * (-1.0 + (1.0 / t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2600.0) || !(a <= 1200.0)) tmp = Float64(a * log(t)); else tmp = Float64(-1.0 + Float64(t * Float64(-1.0 + Float64(1.0 / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2600.0) || ~((a <= 1200.0))) tmp = a * log(t); else tmp = -1.0 + (t * (-1.0 + (1.0 / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2600.0], N[Not[LessEqual[a, 1200.0]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(-1.0 + N[(t * N[(-1.0 + N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2600 \lor \neg \left(a \leq 1200\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-1 + t \cdot \left(-1 + \frac{1}{t}\right)\\
\end{array}
\end{array}
if a < -2600 or 1200 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.6%
+-commutative99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -2600 < a < 1200Initial program 99.4%
associate--l+99.4%
+-commutative99.4%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around inf 39.8%
neg-mul-139.8%
Simplified39.8%
expm1-log1p-u1.6%
expm1-undefine1.9%
Applied egg-rr1.9%
sub-neg1.9%
log1p-undefine1.9%
rem-exp-log40.1%
unsub-neg40.1%
metadata-eval40.1%
Simplified40.1%
Taylor expanded in t around inf 40.1%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (+ -1.0 (* t (+ -1.0 (/ 1.0 t)))))
double code(double x, double y, double z, double t, double a) {
return -1.0 + (t * (-1.0 + (1.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 = (-1.0d0) + (t * ((-1.0d0) + (1.0d0 / t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 + (t * (-1.0 + (1.0 / t)));
}
def code(x, y, z, t, a): return -1.0 + (t * (-1.0 + (1.0 / t)))
function code(x, y, z, t, a) return Float64(-1.0 + Float64(t * Float64(-1.0 + Float64(1.0 / t)))) end
function tmp = code(x, y, z, t, a) tmp = -1.0 + (t * (-1.0 + (1.0 / t))); end
code[x_, y_, z_, t_, a_] := N[(-1.0 + N[(t * N[(-1.0 + N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-1 + t \cdot \left(-1 + \frac{1}{t}\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 29.6%
neg-mul-129.6%
Simplified29.6%
expm1-log1p-u1.4%
expm1-undefine1.5%
Applied egg-rr1.5%
sub-neg1.5%
log1p-undefine1.5%
rem-exp-log29.7%
unsub-neg29.7%
metadata-eval29.7%
Simplified29.7%
Taylor expanded in t around inf 29.7%
Final simplification29.7%
(FPCore (x y z t a) :precision binary64 (+ -1.0 (- 1.0 t)))
double code(double x, double y, double z, double t, double a) {
return -1.0 + (1.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 = (-1.0d0) + (1.0d0 - t)
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 + (1.0 - t);
}
def code(x, y, z, t, a): return -1.0 + (1.0 - t)
function code(x, y, z, t, a) return Float64(-1.0 + Float64(1.0 - t)) end
function tmp = code(x, y, z, t, a) tmp = -1.0 + (1.0 - t); end
code[x_, y_, z_, t_, a_] := N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-1 + \left(1 - t\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 29.6%
neg-mul-129.6%
Simplified29.6%
expm1-log1p-u1.4%
expm1-undefine1.5%
Applied egg-rr1.5%
sub-neg1.5%
log1p-undefine1.5%
rem-exp-log29.7%
unsub-neg29.7%
metadata-eval29.7%
Simplified29.7%
Final simplification29.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 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.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 29.6%
neg-mul-129.6%
Simplified29.6%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 29.6%
neg-mul-129.6%
Simplified29.6%
expm1-log1p-u1.4%
expm1-undefine1.5%
Applied egg-rr1.5%
sub-neg1.5%
log1p-undefine1.5%
rem-exp-log29.7%
unsub-neg29.7%
metadata-eval29.7%
Simplified29.7%
Taylor expanded in t around 0 2.5%
metadata-eval2.5%
Applied egg-rr2.5%
(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 2024132
(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))))