
(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 17 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.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) (- a 0.5)))
(t_2 (+ (log z) (log (+ x y))))
(t_3 (+ (log y) (+ (log z) t_1))))
(if (<= t_2 -750.0)
t_3
(if (<= t_2 700.0)
(+ (log (* z y)) (- t_1 t))
(if (or (<= t_2 950.0) (not (<= t_2 1050.0)))
t_3
(- (+ (log z) (log 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 t_3 = log(y) + (log(z) + t_1);
double tmp;
if (t_2 <= -750.0) {
tmp = t_3;
} else if (t_2 <= 700.0) {
tmp = log((z * y)) + (t_1 - t);
} else if ((t_2 <= 950.0) || !(t_2 <= 1050.0)) {
tmp = t_3;
} 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
t_2 = log(z) + log((x + y))
t_3 = log(y) + (log(z) + t_1)
if (t_2 <= (-750.0d0)) then
tmp = t_3
else if (t_2 <= 700.0d0) then
tmp = log((z * y)) + (t_1 - t)
else if ((t_2 <= 950.0d0) .or. (.not. (t_2 <= 1050.0d0))) then
tmp = t_3
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 t_1 = Math.log(t) * (a - 0.5);
double t_2 = Math.log(z) + Math.log((x + y));
double t_3 = Math.log(y) + (Math.log(z) + t_1);
double tmp;
if (t_2 <= -750.0) {
tmp = t_3;
} else if (t_2 <= 700.0) {
tmp = Math.log((z * y)) + (t_1 - t);
} else if ((t_2 <= 950.0) || !(t_2 <= 1050.0)) {
tmp = t_3;
} else {
tmp = (Math.log(z) + Math.log(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)) t_3 = math.log(y) + (math.log(z) + t_1) tmp = 0 if t_2 <= -750.0: tmp = t_3 elif t_2 <= 700.0: tmp = math.log((z * y)) + (t_1 - t) elif (t_2 <= 950.0) or not (t_2 <= 1050.0): tmp = t_3 else: tmp = (math.log(z) + math.log(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))) t_3 = Float64(log(y) + Float64(log(z) + t_1)) tmp = 0.0 if (t_2 <= -750.0) tmp = t_3; elseif (t_2 <= 700.0) tmp = Float64(log(Float64(z * y)) + Float64(t_1 - t)); elseif ((t_2 <= 950.0) || !(t_2 <= 1050.0)) tmp = t_3; else tmp = Float64(Float64(log(z) + log(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)); t_3 = log(y) + (log(z) + t_1); tmp = 0.0; if (t_2 <= -750.0) tmp = t_3; elseif (t_2 <= 700.0) tmp = log((z * y)) + (t_1 - t); elseif ((t_2 <= 950.0) || ~((t_2 <= 1050.0))) tmp = t_3; else tmp = (log(z) + log(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]}, Block[{t$95$3 = N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -750.0], t$95$3, If[LessEqual[t$95$2, 700.0], N[(N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, 950.0], N[Not[LessEqual[t$95$2, 1050.0]], $MachinePrecision]], t$95$3, N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $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)\\
t_3 := \log y + \left(\log z + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -750:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 700:\\
\;\;\;\;\log \left(z \cdot y\right) + \left(t\_1 - t\right)\\
\mathbf{elif}\;t\_2 \leq 950 \lor \neg \left(t\_2 \leq 1050\right):\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 950 or 1050 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in x around 0 62.4%
Taylor expanded in t around 0 43.8%
associate--l+43.8%
Simplified43.8%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial 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.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around 0 65.3%
*-un-lft-identity65.3%
sum-log62.1%
Applied egg-rr62.1%
*-lft-identity62.1%
*-commutative62.1%
Simplified62.1%
if 950 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 1050Initial program 99.9%
remove-double-neg99.9%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 41.7%
associate--l+41.7%
remove-double-neg41.7%
log-rec41.7%
mul-1-neg41.7%
mul-1-neg41.7%
log-rec41.7%
remove-double-neg41.7%
sub-neg41.7%
metadata-eval41.7%
Simplified41.7%
Taylor expanded in a around inf 41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in a around 0 41.7%
Final simplification56.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) (- a 0.5)))
(t_2 (+ (log z) (log (+ x y))))
(t_3 (+ (log y) (+ (log z) t_1))))
(if (<= t_2 -750.0)
t_3
(if (<= t_2 700.0)
(+ (log (* z y)) (- t_1 t))
(if (or (<= t_2 950.0) (not (<= t_2 1050.0)))
t_3
(+ (log y) (- (+ (log z) (* -0.5 (log t))) 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 t_3 = log(y) + (log(z) + t_1);
double tmp;
if (t_2 <= -750.0) {
tmp = t_3;
} else if (t_2 <= 700.0) {
tmp = log((z * y)) + (t_1 - t);
} else if ((t_2 <= 950.0) || !(t_2 <= 1050.0)) {
tmp = t_3;
} else {
tmp = log(y) + ((log(z) + (-0.5 * 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
t_2 = log(z) + log((x + y))
t_3 = log(y) + (log(z) + t_1)
if (t_2 <= (-750.0d0)) then
tmp = t_3
else if (t_2 <= 700.0d0) then
tmp = log((z * y)) + (t_1 - t)
else if ((t_2 <= 950.0d0) .or. (.not. (t_2 <= 1050.0d0))) then
tmp = t_3
else
tmp = log(y) + ((log(z) + ((-0.5d0) * log(t))) - 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 t_3 = Math.log(y) + (Math.log(z) + t_1);
double tmp;
if (t_2 <= -750.0) {
tmp = t_3;
} else if (t_2 <= 700.0) {
tmp = Math.log((z * y)) + (t_1 - t);
} else if ((t_2 <= 950.0) || !(t_2 <= 1050.0)) {
tmp = t_3;
} else {
tmp = Math.log(y) + ((Math.log(z) + (-0.5 * Math.log(t))) - 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)) t_3 = math.log(y) + (math.log(z) + t_1) tmp = 0 if t_2 <= -750.0: tmp = t_3 elif t_2 <= 700.0: tmp = math.log((z * y)) + (t_1 - t) elif (t_2 <= 950.0) or not (t_2 <= 1050.0): tmp = t_3 else: tmp = math.log(y) + ((math.log(z) + (-0.5 * math.log(t))) - 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))) t_3 = Float64(log(y) + Float64(log(z) + t_1)) tmp = 0.0 if (t_2 <= -750.0) tmp = t_3; elseif (t_2 <= 700.0) tmp = Float64(log(Float64(z * y)) + Float64(t_1 - t)); elseif ((t_2 <= 950.0) || !(t_2 <= 1050.0)) tmp = t_3; else tmp = Float64(log(y) + Float64(Float64(log(z) + Float64(-0.5 * log(t))) - 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)); t_3 = log(y) + (log(z) + t_1); tmp = 0.0; if (t_2 <= -750.0) tmp = t_3; elseif (t_2 <= 700.0) tmp = log((z * y)) + (t_1 - t); elseif ((t_2 <= 950.0) || ~((t_2 <= 1050.0))) tmp = t_3; else tmp = log(y) + ((log(z) + (-0.5 * log(t))) - 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]}, Block[{t$95$3 = N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -750.0], t$95$3, If[LessEqual[t$95$2, 700.0], N[(N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, 950.0], N[Not[LessEqual[t$95$2, 1050.0]], $MachinePrecision]], t$95$3, N[(N[Log[y], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] + N[(-0.5 * N[Log[t], $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)\\
t_3 := \log y + \left(\log z + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -750:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 700:\\
\;\;\;\;\log \left(z \cdot y\right) + \left(t\_1 - t\right)\\
\mathbf{elif}\;t\_2 \leq 950 \lor \neg \left(t\_2 \leq 1050\right):\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\log y + \left(\left(\log z + -0.5 \cdot \log t\right) - t\right)\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 950 or 1050 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in x around 0 62.4%
Taylor expanded in t around 0 43.8%
associate--l+43.8%
Simplified43.8%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial 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.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around 0 65.3%
*-un-lft-identity65.3%
sum-log62.1%
Applied egg-rr62.1%
*-lft-identity62.1%
*-commutative62.1%
Simplified62.1%
if 950 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 1050Initial program 99.9%
remove-double-neg99.9%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 41.7%
associate--l+41.7%
remove-double-neg41.7%
log-rec41.7%
mul-1-neg41.7%
mul-1-neg41.7%
log-rec41.7%
remove-double-neg41.7%
sub-neg41.7%
metadata-eval41.7%
Simplified41.7%
Taylor expanded in a around 0 41.7%
*-commutative41.7%
Simplified41.7%
Final simplification56.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log z) (log (+ x y))))
(t_2 (+ (log y) (+ (log z) (* a (log t))))))
(if (<= t_1 -750.0)
t_2
(if (<= t_1 700.0)
(+ (log (* z y)) (- (* (log t) (- a 0.5)) t))
(if (or (<= t_1 950.0) (not (<= t_1 1050.0)))
t_2
(- (+ (log z) (log y)) 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) + (a * log(t)));
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 700.0) {
tmp = log((z * y)) + ((log(t) * (a - 0.5)) - t);
} else if ((t_1 <= 950.0) || !(t_1 <= 1050.0)) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = log(z) + log((x + y))
t_2 = log(y) + (log(z) + (a * log(t)))
if (t_1 <= (-750.0d0)) then
tmp = t_2
else if (t_1 <= 700.0d0) then
tmp = log((z * y)) + ((log(t) * (a - 0.5d0)) - t)
else if ((t_1 <= 950.0d0) .or. (.not. (t_1 <= 1050.0d0))) then
tmp = t_2
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 t_1 = Math.log(z) + Math.log((x + y));
double t_2 = Math.log(y) + (Math.log(z) + (a * Math.log(t)));
double tmp;
if (t_1 <= -750.0) {
tmp = t_2;
} else if (t_1 <= 700.0) {
tmp = Math.log((z * y)) + ((Math.log(t) * (a - 0.5)) - t);
} else if ((t_1 <= 950.0) || !(t_1 <= 1050.0)) {
tmp = t_2;
} else {
tmp = (Math.log(z) + Math.log(y)) - 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) + (a * math.log(t))) tmp = 0 if t_1 <= -750.0: tmp = t_2 elif t_1 <= 700.0: tmp = math.log((z * y)) + ((math.log(t) * (a - 0.5)) - t) elif (t_1 <= 950.0) or not (t_1 <= 1050.0): tmp = t_2 else: tmp = (math.log(z) + math.log(y)) - 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(z) + Float64(a * log(t)))) tmp = 0.0 if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 700.0) tmp = Float64(log(Float64(z * y)) + Float64(Float64(log(t) * Float64(a - 0.5)) - t)); elseif ((t_1 <= 950.0) || !(t_1 <= 1050.0)) tmp = t_2; else tmp = Float64(Float64(log(z) + log(y)) - 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) + (a * log(t))); tmp = 0.0; if (t_1 <= -750.0) tmp = t_2; elseif (t_1 <= 700.0) tmp = log((z * y)) + ((log(t) * (a - 0.5)) - t); elseif ((t_1 <= 950.0) || ~((t_1 <= 1050.0))) tmp = t_2; else tmp = (log(z) + log(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]}, Block[{t$95$2 = N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], t$95$2, If[LessEqual[t$95$1, 700.0], N[(N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 950.0], N[Not[LessEqual[t$95$1, 1050.0]], $MachinePrecision]], t$95$2, N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log z + \log \left(x + y\right)\\
t_2 := \log y + \left(\log z + a \cdot \log t\right)\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 700:\\
\;\;\;\;\log \left(z \cdot y\right) + \left(\log t \cdot \left(a - 0.5\right) - t\right)\\
\mathbf{elif}\;t\_1 \leq 950 \lor \neg \left(t\_1 \leq 1050\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 950 or 1050 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 62.4%
associate--l+62.4%
remove-double-neg62.4%
log-rec62.4%
mul-1-neg62.4%
mul-1-neg62.4%
log-rec62.4%
remove-double-neg62.4%
sub-neg62.4%
metadata-eval62.4%
Simplified62.4%
Taylor expanded in a around inf 52.2%
*-commutative52.2%
Simplified52.2%
Taylor expanded in t around 0 33.5%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial 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.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around 0 65.3%
*-un-lft-identity65.3%
sum-log62.1%
Applied egg-rr62.1%
*-lft-identity62.1%
*-commutative62.1%
Simplified62.1%
if 950 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 1050Initial program 99.9%
remove-double-neg99.9%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 41.7%
associate--l+41.7%
remove-double-neg41.7%
log-rec41.7%
mul-1-neg41.7%
mul-1-neg41.7%
log-rec41.7%
remove-double-neg41.7%
sub-neg41.7%
metadata-eval41.7%
Simplified41.7%
Taylor expanded in a around inf 41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in a around 0 41.7%
Final simplification54.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (+ x y)))
(t_2 (+ (log z) t_1))
(t_3 (+ (log y) (* a (log t)))))
(if (<= t_2 -750.0)
t_3
(if (<= t_2 700.0)
(+ (log (* z y)) (- (* (log t) (- a 0.5)) t))
(if (<= t_2 950.0)
(* a (+ (log t) (/ t_1 a)))
(if (<= t_2 1050.0) (- (+ (log z) (log y)) t) t_3))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y));
double t_2 = log(z) + t_1;
double t_3 = log(y) + (a * log(t));
double tmp;
if (t_2 <= -750.0) {
tmp = t_3;
} else if (t_2 <= 700.0) {
tmp = log((z * y)) + ((log(t) * (a - 0.5)) - t);
} else if (t_2 <= 950.0) {
tmp = a * (log(t) + (t_1 / a));
} else if (t_2 <= 1050.0) {
tmp = (log(z) + log(y)) - t;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = log((x + y))
t_2 = log(z) + t_1
t_3 = log(y) + (a * log(t))
if (t_2 <= (-750.0d0)) then
tmp = t_3
else if (t_2 <= 700.0d0) then
tmp = log((z * y)) + ((log(t) * (a - 0.5d0)) - t)
else if (t_2 <= 950.0d0) then
tmp = a * (log(t) + (t_1 / a))
else if (t_2 <= 1050.0d0) then
tmp = (log(z) + log(y)) - t
else
tmp = t_3
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));
double t_2 = Math.log(z) + t_1;
double t_3 = Math.log(y) + (a * Math.log(t));
double tmp;
if (t_2 <= -750.0) {
tmp = t_3;
} else if (t_2 <= 700.0) {
tmp = Math.log((z * y)) + ((Math.log(t) * (a - 0.5)) - t);
} else if (t_2 <= 950.0) {
tmp = a * (Math.log(t) + (t_1 / a));
} else if (t_2 <= 1050.0) {
tmp = (Math.log(z) + Math.log(y)) - t;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) t_2 = math.log(z) + t_1 t_3 = math.log(y) + (a * math.log(t)) tmp = 0 if t_2 <= -750.0: tmp = t_3 elif t_2 <= 700.0: tmp = math.log((z * y)) + ((math.log(t) * (a - 0.5)) - t) elif t_2 <= 950.0: tmp = a * (math.log(t) + (t_1 / a)) elif t_2 <= 1050.0: tmp = (math.log(z) + math.log(y)) - t else: tmp = t_3 return tmp
function code(x, y, z, t, a) t_1 = log(Float64(x + y)) t_2 = Float64(log(z) + t_1) t_3 = Float64(log(y) + Float64(a * log(t))) tmp = 0.0 if (t_2 <= -750.0) tmp = t_3; elseif (t_2 <= 700.0) tmp = Float64(log(Float64(z * y)) + Float64(Float64(log(t) * Float64(a - 0.5)) - t)); elseif (t_2 <= 950.0) tmp = Float64(a * Float64(log(t) + Float64(t_1 / a))); elseif (t_2 <= 1050.0) tmp = Float64(Float64(log(z) + log(y)) - t); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)); t_2 = log(z) + t_1; t_3 = log(y) + (a * log(t)); tmp = 0.0; if (t_2 <= -750.0) tmp = t_3; elseif (t_2 <= 700.0) tmp = log((z * y)) + ((log(t) * (a - 0.5)) - t); elseif (t_2 <= 950.0) tmp = a * (log(t) + (t_1 / a)); elseif (t_2 <= 1050.0) tmp = (log(z) + log(y)) - t; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[z], $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -750.0], t$95$3, If[LessEqual[t$95$2, 700.0], N[(N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 950.0], N[(a * N[(N[Log[t], $MachinePrecision] + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1050.0], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right)\\
t_2 := \log z + t\_1\\
t_3 := \log y + a \cdot \log t\\
\mathbf{if}\;t\_2 \leq -750:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 700:\\
\;\;\;\;\log \left(z \cdot y\right) + \left(\log t \cdot \left(a - 0.5\right) - t\right)\\
\mathbf{elif}\;t\_2 \leq 950:\\
\;\;\;\;a \cdot \left(\log t + \frac{t\_1}{a}\right)\\
\mathbf{elif}\;t\_2 \leq 1050:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750 or 1050 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in a around inf 49.1%
*-commutative49.1%
Simplified49.1%
Taylor expanded in x around 0 31.5%
+-commutative31.5%
Simplified31.5%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 700Initial 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.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around 0 65.3%
*-un-lft-identity65.3%
sum-log62.1%
Applied egg-rr62.1%
*-lft-identity62.1%
*-commutative62.1%
Simplified62.1%
if 700 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 950Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in a around inf 56.5%
*-commutative56.5%
Simplified56.5%
Taylor expanded in a around inf 56.5%
+-commutative56.5%
Simplified56.5%
if 950 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 1050Initial program 99.9%
remove-double-neg99.9%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 41.7%
associate--l+41.7%
remove-double-neg41.7%
log-rec41.7%
mul-1-neg41.7%
mul-1-neg41.7%
log-rec41.7%
remove-double-neg41.7%
sub-neg41.7%
metadata-eval41.7%
Simplified41.7%
Taylor expanded in a around inf 41.7%
*-commutative41.7%
Simplified41.7%
Taylor expanded in a around 0 41.7%
Final simplification56.7%
(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.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.43) (+ (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.43) {
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.43d0) 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.43) {
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.43: 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.43) 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.43) 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.43], 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.43:\\
\;\;\;\;\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.429999999999999993Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in x around 0 62.7%
Taylor expanded in t around 0 62.2%
associate--l+62.2%
Simplified62.2%
if 0.429999999999999993 < t Initial program 99.9%
remove-double-neg99.9%
associate--l+99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 64.4%
associate--l+64.4%
remove-double-neg64.4%
log-rec64.4%
mul-1-neg64.4%
mul-1-neg64.4%
log-rec64.4%
remove-double-neg64.4%
sub-neg64.4%
metadata-eval64.4%
Simplified64.4%
Taylor expanded in a around inf 64.0%
*-commutative64.0%
Simplified64.0%
Final simplification63.1%
(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.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(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.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 63.6%
associate--l+63.6%
remove-double-neg63.6%
log-rec63.6%
mul-1-neg63.6%
mul-1-neg63.6%
log-rec63.6%
remove-double-neg63.6%
sub-neg63.6%
metadata-eval63.6%
Simplified63.6%
Final simplification63.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t 3.4e-294)
(+ (log y) (* a (log t)))
(if (<= t 17500000000000.0)
(+ (log (* z y)) (* (log t) (- a 0.5)))
(- (+ (log z) (log y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3.4e-294) {
tmp = log(y) + (a * log(t));
} else if (t <= 17500000000000.0) {
tmp = log((z * y)) + (log(t) * (a - 0.5));
} 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 (t <= 3.4d-294) then
tmp = log(y) + (a * log(t))
else if (t <= 17500000000000.0d0) then
tmp = log((z * y)) + (log(t) * (a - 0.5d0))
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 (t <= 3.4e-294) {
tmp = Math.log(y) + (a * Math.log(t));
} else if (t <= 17500000000000.0) {
tmp = Math.log((z * y)) + (Math.log(t) * (a - 0.5));
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3.4e-294: tmp = math.log(y) + (a * math.log(t)) elif t <= 17500000000000.0: tmp = math.log((z * y)) + (math.log(t) * (a - 0.5)) else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3.4e-294) tmp = Float64(log(y) + Float64(a * log(t))); elseif (t <= 17500000000000.0) tmp = Float64(log(Float64(z * y)) + Float64(log(t) * Float64(a - 0.5))); else tmp = Float64(Float64(log(z) + log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3.4e-294) tmp = log(y) + (a * log(t)); elseif (t <= 17500000000000.0) tmp = log((z * y)) + (log(t) * (a - 0.5)); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3.4e-294], N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 17500000000000.0], N[(N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.4 \cdot 10^{-294}:\\
\;\;\;\;\log y + a \cdot \log t\\
\mathbf{elif}\;t \leq 17500000000000:\\
\;\;\;\;\log \left(z \cdot y\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 3.39999999999999981e-294Initial program 99.5%
associate-+l-99.5%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in x around 0 48.4%
+-commutative48.4%
Simplified48.4%
if 3.39999999999999981e-294 < t < 1.75e13Initial program 99.2%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in x around 0 62.3%
sub-neg62.3%
sum-log46.9%
+-commutative46.9%
fma-define46.9%
Applied egg-rr46.9%
sub-neg46.9%
*-commutative46.9%
Simplified46.9%
Taylor expanded in t around 0 45.3%
if 1.75e13 < t Initial program 99.9%
remove-double-neg99.9%
associate--l+99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 65.0%
associate--l+65.0%
remove-double-neg65.0%
log-rec65.0%
mul-1-neg65.0%
mul-1-neg65.0%
log-rec65.0%
remove-double-neg65.0%
sub-neg65.0%
metadata-eval65.0%
Simplified65.0%
Taylor expanded in a around inf 65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in a around 0 53.7%
Final simplification49.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 14000000000000.0) (* a (+ (log t) (/ (log (+ x y)) a))) (- (+ (log z) (log y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 14000000000000.0) {
tmp = a * (log(t) + (log((x + y)) / a));
} 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 (t <= 14000000000000.0d0) then
tmp = a * (log(t) + (log((x + y)) / a))
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 (t <= 14000000000000.0) {
tmp = a * (Math.log(t) + (Math.log((x + y)) / a));
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 14000000000000.0: tmp = a * (math.log(t) + (math.log((x + y)) / a)) else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 14000000000000.0) tmp = Float64(a * Float64(log(t) + Float64(log(Float64(x + y)) / a))); else tmp = Float64(Float64(log(z) + log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 14000000000000.0) tmp = a * (log(t) + (log((x + y)) / a)); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 14000000000000.0], N[(a * N[(N[Log[t], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 14000000000000:\\
\;\;\;\;a \cdot \left(\log t + \frac{\log \left(x + y\right)}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 1.4e13Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in a around inf 57.0%
+-commutative57.0%
Simplified57.0%
if 1.4e13 < t Initial program 99.9%
remove-double-neg99.9%
associate--l+99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 65.0%
associate--l+65.0%
remove-double-neg65.0%
log-rec65.0%
mul-1-neg65.0%
mul-1-neg65.0%
log-rec65.0%
remove-double-neg65.0%
sub-neg65.0%
metadata-eval65.0%
Simplified65.0%
Taylor expanded in a around inf 65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in a around 0 53.7%
Final simplification55.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.85e+14) (+ (log y) (* a (log t))) (- (log (+ x y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.85e+14) {
tmp = log(y) + (a * log(t));
} else {
tmp = log((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) :: tmp
if (t <= 1.85d+14) then
tmp = log(y) + (a * log(t))
else
tmp = log((x + 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 (t <= 1.85e+14) {
tmp = Math.log(y) + (a * Math.log(t));
} else {
tmp = Math.log((x + y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.85e+14: tmp = math.log(y) + (a * math.log(t)) else: tmp = math.log((x + y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.85e+14) tmp = Float64(log(y) + Float64(a * log(t))); else tmp = Float64(log(Float64(x + y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.85e+14) tmp = log(y) + (a * log(t)); else tmp = log((x + y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.85e+14], N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.85 \cdot 10^{+14}:\\
\;\;\;\;\log y + a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + y\right) - t\\
\end{array}
\end{array}
if t < 1.85e14Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in x around 0 42.0%
+-commutative42.0%
Simplified42.0%
if 1.85e14 < t Initial program 99.9%
associate-+l-99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 76.7%
neg-mul-176.7%
Simplified76.7%
Final simplification58.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 33000000000.0) (+ (log y) (* a (log t))) (- (+ (log z) (log y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 33000000000.0) {
tmp = log(y) + (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 (t <= 33000000000.0d0) then
tmp = log(y) + (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 (t <= 33000000000.0) {
tmp = Math.log(y) + (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 t <= 33000000000.0: tmp = math.log(y) + (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 (t <= 33000000000.0) tmp = Float64(log(y) + Float64(a * log(t))); else tmp = Float64(Float64(log(z) + log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 33000000000.0) tmp = log(y) + (a * log(t)); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 33000000000.0], N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 33000000000:\\
\;\;\;\;\log y + a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 3.3e10Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in x around 0 42.0%
+-commutative42.0%
Simplified42.0%
if 3.3e10 < t Initial program 99.9%
remove-double-neg99.9%
associate--l+99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 65.0%
associate--l+65.0%
remove-double-neg65.0%
log-rec65.0%
mul-1-neg65.0%
mul-1-neg65.0%
log-rec65.0%
remove-double-neg65.0%
sub-neg65.0%
metadata-eval65.0%
Simplified65.0%
Taylor expanded in a around inf 65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in a around 0 53.7%
Final simplification47.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e+101) (not (<= a 1.7e+17))) (* a (log t)) (- (log (+ x y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e+101) || !(a <= 1.7e+17)) {
tmp = a * log(t);
} else {
tmp = log((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) :: tmp
if ((a <= (-5.6d+101)) .or. (.not. (a <= 1.7d+17))) then
tmp = a * log(t)
else
tmp = log((x + 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 <= -5.6e+101) || !(a <= 1.7e+17)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log((x + y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e+101) or not (a <= 1.7e+17): tmp = a * math.log(t) else: tmp = math.log((x + y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e+101) || !(a <= 1.7e+17)) tmp = Float64(a * log(t)); else tmp = Float64(log(Float64(x + y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.6e+101) || ~((a <= 1.7e+17))) tmp = a * log(t); else tmp = log((x + y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e+101], N[Not[LessEqual[a, 1.7e+17]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{+101} \lor \neg \left(a \leq 1.7 \cdot 10^{+17}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + y\right) - t\\
\end{array}
\end{array}
if a < -5.59999999999999962e101 or 1.7e17 < a Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in x around 0 67.8%
Taylor expanded in a around inf 81.7%
*-commutative81.7%
Simplified81.7%
if -5.59999999999999962e101 < a < 1.7e17Initial 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%
Taylor expanded in t around inf 57.4%
neg-mul-157.4%
Simplified57.4%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.1e-7) (log (+ x y)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.1e-7) {
tmp = log((x + y));
} else {
tmp = -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 <= 2.1d-7) then
tmp = log((x + y))
else
tmp = -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 <= 2.1e-7) {
tmp = Math.log((x + y));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.1e-7: tmp = math.log((x + y)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.1e-7) tmp = log(Float64(x + y)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.1e-7) tmp = log((x + y)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.1e-7], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.1 \cdot 10^{-7}:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 2.1e-7Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 56.6%
*-commutative56.6%
Simplified56.6%
Taylor expanded in a around 0 9.9%
+-commutative9.9%
Simplified9.9%
if 2.1e-7 < t Initial program 99.9%
associate-+l-99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 64.2%
Taylor expanded in t around inf 72.1%
neg-mul-172.1%
Simplified72.1%
Final simplification42.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 15000000000.0) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 15000000000.0) {
tmp = a * log(t);
} else {
tmp = -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 <= 15000000000.0d0) then
tmp = a * log(t)
else
tmp = -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 <= 15000000000.0) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 15000000000.0: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 15000000000.0) tmp = Float64(a * log(t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 15000000000.0) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 15000000000.0], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 15000000000:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.5e10Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in x around 0 62.2%
Taylor expanded in a around inf 51.2%
*-commutative51.2%
Simplified51.2%
if 1.5e10 < t Initial program 99.9%
associate-+l-99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 65.0%
Taylor expanded in t around inf 76.7%
neg-mul-176.7%
Simplified76.7%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 (- t))
double code(double x, double y, double z, double t, double a) {
return -t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -t
end function
public static double code(double x, double y, double z, double t, double a) {
return -t;
}
def code(x, y, z, t, a): return -t
function code(x, y, z, t, a) return Float64(-t) end
function tmp = code(x, y, z, t, a) tmp = -t; end
code[x_, y_, z_, t_, a_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around 0 63.5%
Taylor expanded in t around inf 38.6%
neg-mul-138.6%
Simplified38.6%
Final simplification38.6%
(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 2024077
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:alt
(+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))