
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (log t) (- a 0.5))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + (Math.log(t) * (a - 0.5));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + (math.log(t) * (a - 0.5))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(log(t) * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \log t \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) (- a 0.5))))
(if (<= t 3.9e-7)
(+ (+ (log z) (log y)) t_1)
(if (<= t 9.2e+175) (- (+ (log (* y z)) t_1) t) (- t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * (a - 0.5);
double tmp;
if (t <= 3.9e-7) {
tmp = (log(z) + log(y)) + t_1;
} else if (t <= 9.2e+175) {
tmp = (log((y * z)) + t_1) - 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) :: t_1
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
if (t <= 3.9d-7) then
tmp = (log(z) + log(y)) + t_1
else if (t <= 9.2d+175) then
tmp = (log((y * z)) + t_1) - 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 t_1 = Math.log(t) * (a - 0.5);
double tmp;
if (t <= 3.9e-7) {
tmp = (Math.log(z) + Math.log(y)) + t_1;
} else if (t <= 9.2e+175) {
tmp = (Math.log((y * z)) + t_1) - t;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * (a - 0.5) tmp = 0 if t <= 3.9e-7: tmp = (math.log(z) + math.log(y)) + t_1 elif t <= 9.2e+175: tmp = (math.log((y * z)) + t_1) - t else: tmp = -t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (t <= 3.9e-7) tmp = Float64(Float64(log(z) + log(y)) + t_1); elseif (t <= 9.2e+175) tmp = Float64(Float64(log(Float64(y * z)) + t_1) - t); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * (a - 0.5); tmp = 0.0; if (t <= 3.9e-7) tmp = (log(z) + log(y)) + t_1; elseif (t <= 9.2e+175) tmp = (log((y * z)) + t_1) - t; else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 3.9e-7], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 9.2e+175], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - t), $MachinePrecision], (-t)]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t \leq 3.9 \cdot 10^{-7}:\\
\;\;\;\;\left(\log z + \log y\right) + t_1\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+175}:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + t_1\right) - t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 3.90000000000000025e-7Initial program 99.4%
associate-+l-99.4%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-udef99.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.4%
Taylor expanded in t around 0 62.2%
if 3.90000000000000025e-7 < t < 9.1999999999999998e175Initial program 99.8%
associate-+l-99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-udef99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
associate-+r-99.8%
fma-udef99.8%
associate--r+99.8%
sum-log78.2%
Applied egg-rr78.2%
Taylor expanded in x around 0 56.5%
if 9.1999999999999998e175 < t Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-udef100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 92.1%
neg-mul-192.1%
Simplified92.1%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (+ (+ (log z) (log y)) (- (* (log t) (- a 0.5)) t)))
double code(double x, double y, double z, double t, double a) {
return (log(z) + log(y)) + ((log(t) * (a - 0.5)) - t);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(z) + log(y)) + ((log(t) * (a - 0.5d0)) - t)
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) + Math.log(y)) + ((Math.log(t) * (a - 0.5)) - t);
}
def code(x, y, z, t, a): return (math.log(z) + math.log(y)) + ((math.log(t) * (a - 0.5)) - t)
function code(x, y, z, t, a) return Float64(Float64(log(z) + log(y)) + Float64(Float64(log(t) * Float64(a - 0.5)) - t)) end
function tmp = code(x, y, z, t, a) tmp = (log(z) + log(y)) + ((log(t) * (a - 0.5)) - t); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z + \log y\right) + \left(\log t \cdot \left(a - 0.5\right) - t\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-udef99.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 70.6%
Final simplification70.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z))) (t_2 (* a (log t))) (t_3 (- (+ t_2 t_1) t)))
(if (<= a -6.6e+68)
t_2
(if (<= a -76000000000.0)
t_3
(if (<= a -3.2e-76)
(- (+ (log z) (log y)) t)
(if (<= a 1.55e-22)
(- t_1 (+ t (* 0.5 (log t))))
(if (<= a 1.14e+179) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double t_2 = a * log(t);
double t_3 = (t_2 + t_1) - t;
double tmp;
if (a <= -6.6e+68) {
tmp = t_2;
} else if (a <= -76000000000.0) {
tmp = t_3;
} else if (a <= -3.2e-76) {
tmp = (log(z) + log(y)) - t;
} else if (a <= 1.55e-22) {
tmp = t_1 - (t + (0.5 * log(t)));
} else if (a <= 1.14e+179) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = log((y * z))
t_2 = a * log(t)
t_3 = (t_2 + t_1) - t
if (a <= (-6.6d+68)) then
tmp = t_2
else if (a <= (-76000000000.0d0)) then
tmp = t_3
else if (a <= (-3.2d-76)) then
tmp = (log(z) + log(y)) - t
else if (a <= 1.55d-22) then
tmp = t_1 - (t + (0.5d0 * log(t)))
else if (a <= 1.14d+179) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log((y * z));
double t_2 = a * Math.log(t);
double t_3 = (t_2 + t_1) - t;
double tmp;
if (a <= -6.6e+68) {
tmp = t_2;
} else if (a <= -76000000000.0) {
tmp = t_3;
} else if (a <= -3.2e-76) {
tmp = (Math.log(z) + Math.log(y)) - t;
} else if (a <= 1.55e-22) {
tmp = t_1 - (t + (0.5 * Math.log(t)));
} else if (a <= 1.14e+179) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((y * z)) t_2 = a * math.log(t) t_3 = (t_2 + t_1) - t tmp = 0 if a <= -6.6e+68: tmp = t_2 elif a <= -76000000000.0: tmp = t_3 elif a <= -3.2e-76: tmp = (math.log(z) + math.log(y)) - t elif a <= 1.55e-22: tmp = t_1 - (t + (0.5 * math.log(t))) elif a <= 1.14e+179: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) t_2 = Float64(a * log(t)) t_3 = Float64(Float64(t_2 + t_1) - t) tmp = 0.0 if (a <= -6.6e+68) tmp = t_2; elseif (a <= -76000000000.0) tmp = t_3; elseif (a <= -3.2e-76) tmp = Float64(Float64(log(z) + log(y)) - t); elseif (a <= 1.55e-22) tmp = Float64(t_1 - Float64(t + Float64(0.5 * log(t)))); elseif (a <= 1.14e+179) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((y * z)); t_2 = a * log(t); t_3 = (t_2 + t_1) - t; tmp = 0.0; if (a <= -6.6e+68) tmp = t_2; elseif (a <= -76000000000.0) tmp = t_3; elseif (a <= -3.2e-76) tmp = (log(z) + log(y)) - t; elseif (a <= 1.55e-22) tmp = t_1 - (t + (0.5 * log(t))); elseif (a <= 1.14e+179) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + t$95$1), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -6.6e+68], t$95$2, If[LessEqual[a, -76000000000.0], t$95$3, If[LessEqual[a, -3.2e-76], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 1.55e-22], N[(t$95$1 - N[(t + N[(0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.14e+179], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
t_2 := a \cdot \log t\\
t_3 := \left(t_2 + t_1\right) - t\\
\mathbf{if}\;a \leq -6.6 \cdot 10^{+68}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -76000000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-76}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-22}:\\
\;\;\;\;t_1 - \left(t + 0.5 \cdot \log t\right)\\
\mathbf{elif}\;a \leq 1.14 \cdot 10^{+179}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -6.6000000000000001e68 or 1.14000000000000007e179 < 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-udef99.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 92.4%
*-commutative92.4%
Simplified92.4%
if -6.6000000000000001e68 < a < -7.6e10 or 1.55000000000000006e-22 < a < 1.14000000000000007e179Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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 71.8%
Taylor expanded in a around 0 71.9%
associate-+r+71.9%
log-prod60.2%
*-commutative60.2%
*-commutative60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in t around inf 59.1%
if -7.6e10 < a < -3.1999999999999998e-76Initial program 99.4%
associate-+l-99.4%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-udef99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in x around 0 71.8%
Taylor expanded in t around inf 53.3%
if -3.1999999999999998e-76 < a < 1.55000000000000006e-22Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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.4%
Taylor expanded in a around 0 65.4%
log-prod52.0%
*-commutative52.0%
*-commutative52.0%
Simplified52.0%
Final simplification64.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))) (t_2 (- (+ t_1 (log (* y z))) t)))
(if (<= a -4.5e+65)
t_1
(if (<= a -145000000000.0)
t_2
(if (<= a -1.2e-74)
(- (+ (log z) (log y)) t)
(if (<= a 1.55e-22)
(- (+ (log (* z (+ x y))) (* (log t) -0.5)) t)
(if (<= a 7.9e+177) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double t_2 = (t_1 + log((y * z))) - t;
double tmp;
if (a <= -4.5e+65) {
tmp = t_1;
} else if (a <= -145000000000.0) {
tmp = t_2;
} else if (a <= -1.2e-74) {
tmp = (log(z) + log(y)) - t;
} else if (a <= 1.55e-22) {
tmp = (log((z * (x + y))) + (log(t) * -0.5)) - t;
} else if (a <= 7.9e+177) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * log(t)
t_2 = (t_1 + log((y * z))) - t
if (a <= (-4.5d+65)) then
tmp = t_1
else if (a <= (-145000000000.0d0)) then
tmp = t_2
else if (a <= (-1.2d-74)) then
tmp = (log(z) + log(y)) - t
else if (a <= 1.55d-22) then
tmp = (log((z * (x + y))) + (log(t) * (-0.5d0))) - t
else if (a <= 7.9d+177) then
tmp = t_2
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 t_2 = (t_1 + Math.log((y * z))) - t;
double tmp;
if (a <= -4.5e+65) {
tmp = t_1;
} else if (a <= -145000000000.0) {
tmp = t_2;
} else if (a <= -1.2e-74) {
tmp = (Math.log(z) + Math.log(y)) - t;
} else if (a <= 1.55e-22) {
tmp = (Math.log((z * (x + y))) + (Math.log(t) * -0.5)) - t;
} else if (a <= 7.9e+177) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) t_2 = (t_1 + math.log((y * z))) - t tmp = 0 if a <= -4.5e+65: tmp = t_1 elif a <= -145000000000.0: tmp = t_2 elif a <= -1.2e-74: tmp = (math.log(z) + math.log(y)) - t elif a <= 1.55e-22: tmp = (math.log((z * (x + y))) + (math.log(t) * -0.5)) - t elif a <= 7.9e+177: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) t_2 = Float64(Float64(t_1 + log(Float64(y * z))) - t) tmp = 0.0 if (a <= -4.5e+65) tmp = t_1; elseif (a <= -145000000000.0) tmp = t_2; elseif (a <= -1.2e-74) tmp = Float64(Float64(log(z) + log(y)) - t); elseif (a <= 1.55e-22) tmp = Float64(Float64(log(Float64(z * Float64(x + y))) + Float64(log(t) * -0.5)) - t); elseif (a <= 7.9e+177) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); t_2 = (t_1 + log((y * z))) - t; tmp = 0.0; if (a <= -4.5e+65) tmp = t_1; elseif (a <= -145000000000.0) tmp = t_2; elseif (a <= -1.2e-74) tmp = (log(z) + log(y)) - t; elseif (a <= 1.55e-22) tmp = (log((z * (x + y))) + (log(t) * -0.5)) - t; elseif (a <= 7.9e+177) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(t$95$1 + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -4.5e+65], t$95$1, If[LessEqual[a, -145000000000.0], t$95$2, If[LessEqual[a, -1.2e-74], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 1.55e-22], N[(N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 7.9e+177], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
t_2 := \left(t_1 + \log \left(y \cdot z\right)\right) - t\\
\mathbf{if}\;a \leq -4.5 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -145000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-74}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-22}:\\
\;\;\;\;\left(\log \left(z \cdot \left(x + y\right)\right) + \log t \cdot -0.5\right) - t\\
\mathbf{elif}\;a \leq 7.9 \cdot 10^{+177}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -4.5e65 or 7.8999999999999999e177 < 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-udef99.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 92.4%
*-commutative92.4%
Simplified92.4%
if -4.5e65 < a < -1.45e11 or 1.55000000000000006e-22 < a < 7.8999999999999999e177Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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 71.8%
Taylor expanded in a around 0 71.9%
associate-+r+71.9%
log-prod60.2%
*-commutative60.2%
*-commutative60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in t around inf 59.1%
if -1.45e11 < a < -1.1999999999999999e-74Initial program 99.4%
associate-+l-99.4%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-udef99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in x around 0 71.8%
Taylor expanded in t around inf 53.3%
if -1.1999999999999999e-74 < a < 1.55000000000000006e-22Initial program 99.6%
Taylor expanded in a around 0 99.6%
associate-+r+99.6%
+-commutative99.6%
log-prod85.5%
*-commutative85.5%
+-commutative85.5%
*-commutative85.5%
Simplified85.5%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.8e+65) (not (<= a 6e+176))) (* a (log t)) (- (+ (log (* z (+ x y))) (* (log t) (- a 0.5))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.8e+65) || !(a <= 6e+176)) {
tmp = a * log(t);
} else {
tmp = (log((z * (x + y))) + (log(t) * (a - 0.5))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-6.8d+65)) .or. (.not. (a <= 6d+176))) then
tmp = a * log(t)
else
tmp = (log((z * (x + y))) + (log(t) * (a - 0.5d0))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.8e+65) || !(a <= 6e+176)) {
tmp = a * Math.log(t);
} else {
tmp = (Math.log((z * (x + y))) + (Math.log(t) * (a - 0.5))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.8e+65) or not (a <= 6e+176): tmp = a * math.log(t) else: tmp = (math.log((z * (x + y))) + (math.log(t) * (a - 0.5))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.8e+65) || !(a <= 6e+176)) tmp = Float64(a * log(t)); else tmp = Float64(Float64(log(Float64(z * Float64(x + y))) + Float64(log(t) * Float64(a - 0.5))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.8e+65) || ~((a <= 6e+176))) tmp = a * log(t); else tmp = (log((z * (x + y))) + (log(t) * (a - 0.5))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.8e+65], N[Not[LessEqual[a, 6e+176]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+65} \lor \neg \left(a \leq 6 \cdot 10^{+176}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(z \cdot \left(x + y\right)\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\end{array}
\end{array}
if a < -6.7999999999999999e65 or 6e176 < 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-udef99.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 92.4%
*-commutative92.4%
Simplified92.4%
if -6.7999999999999999e65 < a < 6e176Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
associate-+r-99.6%
fma-udef99.6%
associate--r+99.6%
sum-log82.2%
Applied egg-rr82.2%
Final simplification85.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))) (t_2 (- (+ (log z) (log y)) t)))
(if (<= a -70000000000.0)
t_1
(if (<= a 3.25e-242)
t_2
(if (<= a 5.8e-193)
(log (* (sqrt (/ 1.0 t)) (* z (+ x y))))
(if (<= a 5.2e+62) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double t_2 = (log(z) + log(y)) - t;
double tmp;
if (a <= -70000000000.0) {
tmp = t_1;
} else if (a <= 3.25e-242) {
tmp = t_2;
} else if (a <= 5.8e-193) {
tmp = log((sqrt((1.0 / t)) * (z * (x + y))));
} else if (a <= 5.2e+62) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * log(t)
t_2 = (log(z) + log(y)) - t
if (a <= (-70000000000.0d0)) then
tmp = t_1
else if (a <= 3.25d-242) then
tmp = t_2
else if (a <= 5.8d-193) then
tmp = log((sqrt((1.0d0 / t)) * (z * (x + y))))
else if (a <= 5.2d+62) then
tmp = t_2
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 t_2 = (Math.log(z) + Math.log(y)) - t;
double tmp;
if (a <= -70000000000.0) {
tmp = t_1;
} else if (a <= 3.25e-242) {
tmp = t_2;
} else if (a <= 5.8e-193) {
tmp = Math.log((Math.sqrt((1.0 / t)) * (z * (x + y))));
} else if (a <= 5.2e+62) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) t_2 = (math.log(z) + math.log(y)) - t tmp = 0 if a <= -70000000000.0: tmp = t_1 elif a <= 3.25e-242: tmp = t_2 elif a <= 5.8e-193: tmp = math.log((math.sqrt((1.0 / t)) * (z * (x + y)))) elif a <= 5.2e+62: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) t_2 = Float64(Float64(log(z) + log(y)) - t) tmp = 0.0 if (a <= -70000000000.0) tmp = t_1; elseif (a <= 3.25e-242) tmp = t_2; elseif (a <= 5.8e-193) tmp = log(Float64(sqrt(Float64(1.0 / t)) * Float64(z * Float64(x + y)))); elseif (a <= 5.2e+62) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); t_2 = (log(z) + log(y)) - t; tmp = 0.0; if (a <= -70000000000.0) tmp = t_1; elseif (a <= 3.25e-242) tmp = t_2; elseif (a <= 5.8e-193) tmp = log((sqrt((1.0 / t)) * (z * (x + y)))); elseif (a <= 5.2e+62) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -70000000000.0], t$95$1, If[LessEqual[a, 3.25e-242], t$95$2, If[LessEqual[a, 5.8e-193], N[Log[N[(N[Sqrt[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[a, 5.2e+62], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
t_2 := \left(\log z + \log y\right) - t\\
\mathbf{if}\;a \leq -70000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.25 \cdot 10^{-242}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-193}:\\
\;\;\;\;\log \left(\sqrt{\frac{1}{t}} \cdot \left(z \cdot \left(x + y\right)\right)\right)\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -7e10 or 5.19999999999999968e62 < a 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-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 83.7%
*-commutative83.7%
Simplified83.7%
if -7e10 < a < 3.2499999999999999e-242 or 5.80000000000000013e-193 < a < 5.19999999999999968e62Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-udef99.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 69.2%
Taylor expanded in t around inf 49.7%
if 3.2499999999999999e-242 < a < 5.80000000000000013e-193Initial program 98.8%
add-log-exp98.8%
+-commutative98.8%
exp-sum99.4%
sub-neg99.4%
metadata-eval99.4%
*-commutative99.4%
exp-to-pow98.3%
associate-+r-98.3%
exp-sum98.3%
add-exp-log99.1%
exp-diff99.1%
add-exp-log100.0%
Applied egg-rr100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in a around 0 100.0%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e+67) (not (<= a 2e+178))) (* a (log t)) (- (+ (log (* y z)) (* (log t) (- a 0.5))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e+67) || !(a <= 2e+178)) {
tmp = a * log(t);
} else {
tmp = (log((y * z)) + (log(t) * (a - 0.5))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3d+67)) .or. (.not. (a <= 2d+178))) then
tmp = a * log(t)
else
tmp = (log((y * z)) + (log(t) * (a - 0.5d0))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e+67) || !(a <= 2e+178)) {
tmp = a * Math.log(t);
} else {
tmp = (Math.log((y * z)) + (Math.log(t) * (a - 0.5))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e+67) or not (a <= 2e+178): tmp = a * math.log(t) else: tmp = (math.log((y * z)) + (math.log(t) * (a - 0.5))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e+67) || !(a <= 2e+178)) tmp = Float64(a * log(t)); else tmp = Float64(Float64(log(Float64(y * z)) + Float64(log(t) * Float64(a - 0.5))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e+67) || ~((a <= 2e+178))) tmp = a * log(t); else tmp = (log((y * z)) + (log(t) * (a - 0.5))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e+67], N[Not[LessEqual[a, 2e+178]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+67} \lor \neg \left(a \leq 2 \cdot 10^{+178}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\end{array}
\end{array}
if a < -3.0000000000000001e67 or 2.0000000000000001e178 < 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-udef99.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 92.4%
*-commutative92.4%
Simplified92.4%
if -3.0000000000000001e67 < a < 2.0000000000000001e178Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
associate-+r-99.6%
fma-udef99.6%
associate--r+99.6%
sum-log82.2%
Applied egg-rr82.2%
Taylor expanded in x around 0 53.8%
Final simplification64.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))) (t_2 (- (+ (log z) (log y)) t)))
(if (<= a -14000000000.0)
t_1
(if (<= a 4.5e-242)
t_2
(if (<= a 5.5e-193)
(log (* y (* z (pow t (+ a -0.5)))))
(if (<= a 9e+50) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double t_2 = (log(z) + log(y)) - t;
double tmp;
if (a <= -14000000000.0) {
tmp = t_1;
} else if (a <= 4.5e-242) {
tmp = t_2;
} else if (a <= 5.5e-193) {
tmp = log((y * (z * pow(t, (a + -0.5)))));
} else if (a <= 9e+50) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * log(t)
t_2 = (log(z) + log(y)) - t
if (a <= (-14000000000.0d0)) then
tmp = t_1
else if (a <= 4.5d-242) then
tmp = t_2
else if (a <= 5.5d-193) then
tmp = log((y * (z * (t ** (a + (-0.5d0))))))
else if (a <= 9d+50) then
tmp = t_2
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 t_2 = (Math.log(z) + Math.log(y)) - t;
double tmp;
if (a <= -14000000000.0) {
tmp = t_1;
} else if (a <= 4.5e-242) {
tmp = t_2;
} else if (a <= 5.5e-193) {
tmp = Math.log((y * (z * Math.pow(t, (a + -0.5)))));
} else if (a <= 9e+50) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) t_2 = (math.log(z) + math.log(y)) - t tmp = 0 if a <= -14000000000.0: tmp = t_1 elif a <= 4.5e-242: tmp = t_2 elif a <= 5.5e-193: tmp = math.log((y * (z * math.pow(t, (a + -0.5))))) elif a <= 9e+50: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) t_2 = Float64(Float64(log(z) + log(y)) - t) tmp = 0.0 if (a <= -14000000000.0) tmp = t_1; elseif (a <= 4.5e-242) tmp = t_2; elseif (a <= 5.5e-193) tmp = log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))); elseif (a <= 9e+50) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); t_2 = (log(z) + log(y)) - t; tmp = 0.0; if (a <= -14000000000.0) tmp = t_1; elseif (a <= 4.5e-242) tmp = t_2; elseif (a <= 5.5e-193) tmp = log((y * (z * (t ^ (a + -0.5))))); elseif (a <= 9e+50) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -14000000000.0], t$95$1, If[LessEqual[a, 4.5e-242], t$95$2, If[LessEqual[a, 5.5e-193], N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[a, 9e+50], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
t_2 := \left(\log z + \log y\right) - t\\
\mathbf{if}\;a \leq -14000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-242}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-193}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right)\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.4e10 or 9.00000000000000027e50 < a 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-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 83.7%
*-commutative83.7%
Simplified83.7%
if -1.4e10 < a < 4.4999999999999999e-242 or 5.50000000000000014e-193 < a < 9.00000000000000027e50Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-udef99.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 69.2%
Taylor expanded in t around inf 49.7%
if 4.4999999999999999e-242 < a < 5.50000000000000014e-193Initial program 98.8%
associate-+l-98.8%
associate--l+97.8%
sub-neg97.8%
+-commutative97.8%
*-commutative97.8%
distribute-rgt-neg-in97.8%
fma-udef97.8%
sub-neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
metadata-eval97.8%
metadata-eval97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in x around 0 43.7%
Taylor expanded in a around 0 43.7%
associate-+r+43.7%
log-prod40.9%
*-commutative40.9%
*-commutative40.9%
*-commutative40.9%
Simplified40.9%
Taylor expanded in t around 0 40.9%
associate--l+40.9%
log-prod43.7%
distribute-rgt-out--43.7%
*-commutative43.7%
log-pow43.7%
sub-neg43.7%
metadata-eval43.7%
associate-+r+43.7%
log-prod43.4%
log-prod43.7%
Simplified43.7%
Final simplification64.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))) (t_2 (- (+ (log z) (log y)) t)))
(if (<= a -56000000000.0)
t_1
(if (<= a 4.5e-242)
t_2
(if (<= a 7.2e-193)
(- (log (* y z)) (* 0.5 (log t)))
(if (<= a 1.7e+50) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double t_2 = (log(z) + log(y)) - t;
double tmp;
if (a <= -56000000000.0) {
tmp = t_1;
} else if (a <= 4.5e-242) {
tmp = t_2;
} else if (a <= 7.2e-193) {
tmp = log((y * z)) - (0.5 * log(t));
} else if (a <= 1.7e+50) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = a * log(t)
t_2 = (log(z) + log(y)) - t
if (a <= (-56000000000.0d0)) then
tmp = t_1
else if (a <= 4.5d-242) then
tmp = t_2
else if (a <= 7.2d-193) then
tmp = log((y * z)) - (0.5d0 * log(t))
else if (a <= 1.7d+50) then
tmp = t_2
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 t_2 = (Math.log(z) + Math.log(y)) - t;
double tmp;
if (a <= -56000000000.0) {
tmp = t_1;
} else if (a <= 4.5e-242) {
tmp = t_2;
} else if (a <= 7.2e-193) {
tmp = Math.log((y * z)) - (0.5 * Math.log(t));
} else if (a <= 1.7e+50) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) t_2 = (math.log(z) + math.log(y)) - t tmp = 0 if a <= -56000000000.0: tmp = t_1 elif a <= 4.5e-242: tmp = t_2 elif a <= 7.2e-193: tmp = math.log((y * z)) - (0.5 * math.log(t)) elif a <= 1.7e+50: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) t_2 = Float64(Float64(log(z) + log(y)) - t) tmp = 0.0 if (a <= -56000000000.0) tmp = t_1; elseif (a <= 4.5e-242) tmp = t_2; elseif (a <= 7.2e-193) tmp = Float64(log(Float64(y * z)) - Float64(0.5 * log(t))); elseif (a <= 1.7e+50) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); t_2 = (log(z) + log(y)) - t; tmp = 0.0; if (a <= -56000000000.0) tmp = t_1; elseif (a <= 4.5e-242) tmp = t_2; elseif (a <= 7.2e-193) tmp = log((y * z)) - (0.5 * log(t)); elseif (a <= 1.7e+50) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -56000000000.0], t$95$1, If[LessEqual[a, 4.5e-242], t$95$2, If[LessEqual[a, 7.2e-193], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+50], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
t_2 := \left(\log z + \log y\right) - t\\
\mathbf{if}\;a \leq -56000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-242}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-193}:\\
\;\;\;\;\log \left(y \cdot z\right) - 0.5 \cdot \log t\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -5.6e10 or 1.6999999999999999e50 < a 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-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 83.7%
*-commutative83.7%
Simplified83.7%
if -5.6e10 < a < 4.4999999999999999e-242 or 7.1999999999999998e-193 < a < 1.6999999999999999e50Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-udef99.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 69.2%
Taylor expanded in t around inf 49.7%
if 4.4999999999999999e-242 < a < 7.1999999999999998e-193Initial program 98.8%
associate-+l-98.8%
associate--l+97.8%
sub-neg97.8%
+-commutative97.8%
*-commutative97.8%
distribute-rgt-neg-in97.8%
fma-udef97.8%
sub-neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
metadata-eval97.8%
metadata-eval97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in x around 0 43.7%
Taylor expanded in a around 0 43.7%
log-prod40.9%
*-commutative40.9%
*-commutative40.9%
Simplified40.9%
Taylor expanded in t around 0 40.9%
*-commutative40.9%
Simplified40.9%
Final simplification64.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= a -68000000.0)
t_1
(if (<= a 2.5e-23)
(- (log (* y z)) (+ t (* 0.5 (log t))))
(if (<= a 1.15e+56) (- t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (a <= -68000000.0) {
tmp = t_1;
} else if (a <= 2.5e-23) {
tmp = log((y * z)) - (t + (0.5 * log(t)));
} else if (a <= 1.15e+56) {
tmp = -t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a * log(t)
if (a <= (-68000000.0d0)) then
tmp = t_1
else if (a <= 2.5d-23) then
tmp = log((y * z)) - (t + (0.5d0 * log(t)))
else if (a <= 1.15d+56) then
tmp = -t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a * Math.log(t);
double tmp;
if (a <= -68000000.0) {
tmp = t_1;
} else if (a <= 2.5e-23) {
tmp = Math.log((y * z)) - (t + (0.5 * Math.log(t)));
} else if (a <= 1.15e+56) {
tmp = -t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -68000000.0: tmp = t_1 elif a <= 2.5e-23: tmp = math.log((y * z)) - (t + (0.5 * math.log(t))) elif a <= 1.15e+56: tmp = -t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -68000000.0) tmp = t_1; elseif (a <= 2.5e-23) tmp = Float64(log(Float64(y * z)) - Float64(t + Float64(0.5 * log(t)))); elseif (a <= 1.15e+56) tmp = Float64(-t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); tmp = 0.0; if (a <= -68000000.0) tmp = t_1; elseif (a <= 2.5e-23) tmp = log((y * z)) - (t + (0.5 * log(t))); elseif (a <= 1.15e+56) tmp = -t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -68000000.0], t$95$1, If[LessEqual[a, 2.5e-23], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(t + N[(0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+56], (-t), t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -68000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-23}:\\
\;\;\;\;\log \left(y \cdot z\right) - \left(t + 0.5 \cdot \log t\right)\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+56}:\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -6.8e7 or 1.15000000000000007e56 < a 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-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 83.1%
*-commutative83.1%
Simplified83.1%
if -6.8e7 < a < 2.5000000000000001e-23Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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.8%
Taylor expanded in a around 0 65.4%
log-prod51.3%
*-commutative51.3%
*-commutative51.3%
Simplified51.3%
if 2.5000000000000001e-23 < a < 1.15000000000000007e56Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-udef99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 69.5%
neg-mul-169.5%
Simplified69.5%
Final simplification66.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 4700000000.0) (+ (log (* y z)) (* (log t) (- a 0.5))) (+ (log (+ x y)) (- (log z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 4700000000.0) {
tmp = log((y * z)) + (log(t) * (a - 0.5));
} else {
tmp = log((x + y)) + (log(z) - 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 <= 4700000000.0d0) then
tmp = log((y * z)) + (log(t) * (a - 0.5d0))
else
tmp = log((x + y)) + (log(z) - 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 <= 4700000000.0) {
tmp = Math.log((y * z)) + (Math.log(t) * (a - 0.5));
} else {
tmp = Math.log((x + y)) + (Math.log(z) - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 4700000000.0: tmp = math.log((y * z)) + (math.log(t) * (a - 0.5)) else: tmp = math.log((x + y)) + (math.log(z) - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 4700000000.0) tmp = Float64(log(Float64(y * z)) + Float64(log(t) * Float64(a - 0.5))); else tmp = Float64(log(Float64(x + y)) + Float64(log(z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 4700000000.0) tmp = log((y * z)) + (log(t) * (a - 0.5)); else tmp = log((x + y)) + (log(z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 4700000000.0], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4700000000:\\
\;\;\;\;\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + y\right) + \left(\log z - t\right)\\
\end{array}
\end{array}
if t < 4.7e9Initial program 99.4%
associate-+l-99.4%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-udef99.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%
Taylor expanded in t around 0 61.6%
log-prod45.7%
*-commutative45.7%
Simplified45.7%
if 4.7e9 < 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-udef99.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 78.4%
Final simplification61.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -31000000000.0) (not (<= a 1.45e+48))) (* a (log t)) (- (+ (log z) (log y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -31000000000.0) || !(a <= 1.45e+48)) {
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 <= (-31000000000.0d0)) .or. (.not. (a <= 1.45d+48))) 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 <= -31000000000.0) || !(a <= 1.45e+48)) {
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 <= -31000000000.0) or not (a <= 1.45e+48): 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 <= -31000000000.0) || !(a <= 1.45e+48)) tmp = 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 ((a <= -31000000000.0) || ~((a <= 1.45e+48))) 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, -31000000000.0], N[Not[LessEqual[a, 1.45e+48]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -31000000000 \lor \neg \left(a \leq 1.45 \cdot 10^{+48}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if a < -3.1e10 or 1.4499999999999999e48 < a 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-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 83.7%
*-commutative83.7%
Simplified83.7%
if -3.1e10 < a < 1.4499999999999999e48Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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 68.3%
Taylor expanded in t around inf 48.4%
Final simplification63.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 6e+25) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 6e+25) {
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 <= 6d+25) 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 <= 6e+25) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 6e+25: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 6e+25) 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 <= 6e+25) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 6e+25], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{+25}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 6.00000000000000011e25Initial program 99.4%
associate-+l-99.4%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-udef99.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.7%
*-commutative56.7%
Simplified56.7%
if 6.00000000000000011e25 < 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-udef99.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 80.8%
neg-mul-180.8%
Simplified80.8%
Final simplification67.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.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t around inf 39.2%
neg-mul-139.2%
Simplified39.2%
Final simplification39.2%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = log((x + y)) + ((log(z) - t) + ((a - 0.5d0) * log(t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log((x + y)) + ((Math.log(z) - t) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return math.log((x + y)) + ((math.log(z) - t) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(Float64(log(z) - t) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)
\end{array}
herbie shell --seed 2024011
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))