
(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 19 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) (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%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z)))
(t_2 (+ (log z) (log y)))
(t_3 (* (log t) (- a 0.5))))
(if (<= t 2.3e-6)
(+ t_2 t_3)
(if (<= t 6.6e+98)
(- (+ t_1 t_3) t)
(if (<= t 1.85e+167)
(- t)
(if (<= t 1.2e+229) (- t_1 (fma (log t) (- 0.5 a) t)) (- t_2 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double t_2 = log(z) + log(y);
double t_3 = log(t) * (a - 0.5);
double tmp;
if (t <= 2.3e-6) {
tmp = t_2 + t_3;
} else if (t <= 6.6e+98) {
tmp = (t_1 + t_3) - t;
} else if (t <= 1.85e+167) {
tmp = -t;
} else if (t <= 1.2e+229) {
tmp = t_1 - fma(log(t), (0.5 - a), t);
} else {
tmp = t_2 - t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) t_2 = Float64(log(z) + log(y)) t_3 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (t <= 2.3e-6) tmp = Float64(t_2 + t_3); elseif (t <= 6.6e+98) tmp = Float64(Float64(t_1 + t_3) - t); elseif (t <= 1.85e+167) tmp = Float64(-t); elseif (t <= 1.2e+229) tmp = Float64(t_1 - fma(log(t), Float64(0.5 - a), t)); else tmp = Float64(t_2 - t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 2.3e-6], N[(t$95$2 + t$95$3), $MachinePrecision], If[LessEqual[t, 6.6e+98], N[(N[(t$95$1 + t$95$3), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, 1.85e+167], (-t), If[LessEqual[t, 1.2e+229], N[(t$95$1 - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
t_2 := \log z + \log y\\
t_3 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t \leq 2.3 \cdot 10^{-6}:\\
\;\;\;\;t\_2 + t\_3\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+98}:\\
\;\;\;\;\left(t\_1 + t\_3\right) - t\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+167}:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+229}:\\
\;\;\;\;t\_1 - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\\
\end{array}
\end{array}
if t < 2.3e-6Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 68.8%
Taylor expanded in t around 0 68.8%
if 2.3e-6 < t < 6.60000000000000056e98Initial program 99.7%
add-cube-cbrt97.8%
pow397.9%
+-commutative97.9%
*-commutative97.9%
fma-define97.9%
sub-neg97.9%
metadata-eval97.9%
sum-log86.3%
Applied egg-rr86.3%
Taylor expanded in x around 0 61.2%
if 6.60000000000000056e98 < t < 1.85e167Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.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 85.3%
neg-mul-185.3%
Simplified85.3%
if 1.85e167 < t < 1.2e229Initial program 99.8%
associate-+l-99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-undefine99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 88.2%
sub-neg88.2%
sum-log73.7%
+-commutative73.7%
fma-define73.7%
Applied egg-rr73.7%
sub-neg73.7%
*-commutative73.7%
Simplified73.7%
if 1.2e229 < 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-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 59.1%
Taylor expanded in a around inf 59.1%
mul-1-neg59.1%
*-commutative59.1%
distribute-rgt-neg-in59.1%
Simplified59.1%
Taylor expanded in a around 0 55.9%
Final simplification68.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -0.505) (not (<= (- a 0.5) 5e+14))) (- (log (* y z)) (fma (log t) (- 0.5 a) t)) (+ (log y) (- (log z) (+ t (* (log t) 0.5))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -0.505) || !((a - 0.5) <= 5e+14)) {
tmp = log((y * z)) - fma(log(t), (0.5 - a), t);
} else {
tmp = log(y) + (log(z) - (t + (log(t) * 0.5)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -0.505) || !(Float64(a - 0.5) <= 5e+14)) tmp = Float64(log(Float64(y * z)) - fma(log(t), Float64(0.5 - a), t)); else tmp = Float64(log(y) + Float64(log(z) - Float64(t + Float64(log(t) * 0.5)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -0.505], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], 5e+14]], $MachinePrecision]], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(t + N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -0.505 \lor \neg \left(a - 0.5 \leq 5 \cdot 10^{+14}\right):\\
\;\;\;\;\log \left(y \cdot z\right) - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\\
\mathbf{else}:\\
\;\;\;\;\log y + \left(\log z - \left(t + \log t \cdot 0.5\right)\right)\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -0.505000000000000004 or 5e14 < (-.f64 a #s(literal 1/2 binary64)) 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 76.0%
sub-neg76.0%
sum-log61.8%
+-commutative61.8%
fma-define61.8%
Applied egg-rr61.8%
sub-neg61.8%
*-commutative61.8%
Simplified61.8%
if -0.505000000000000004 < (-.f64 a #s(literal 1/2 binary64)) < 5e14Initial 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 65.6%
Taylor expanded in a around 0 64.5%
associate--l+64.6%
*-commutative64.6%
Simplified64.6%
Final simplification63.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) (- a 0.5))))
(if (<= (- a 0.5) -0.505)
(- (+ (log (* y z)) t_1) t)
(if (<= (- a 0.5) 5e+14)
(+ (log y) (- (log z) (+ t (* (log t) 0.5))))
(- (+ (log (* (+ x y) z)) t_1) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * (a - 0.5);
double tmp;
if ((a - 0.5) <= -0.505) {
tmp = (log((y * z)) + t_1) - t;
} else if ((a - 0.5) <= 5e+14) {
tmp = log(y) + (log(z) - (t + (log(t) * 0.5)));
} else {
tmp = (log(((x + y) * z)) + t_1) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = log(t) * (a - 0.5d0)
if ((a - 0.5d0) <= (-0.505d0)) then
tmp = (log((y * z)) + t_1) - t
else if ((a - 0.5d0) <= 5d+14) then
tmp = log(y) + (log(z) - (t + (log(t) * 0.5d0)))
else
tmp = (log(((x + y) * z)) + t_1) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log(t) * (a - 0.5);
double tmp;
if ((a - 0.5) <= -0.505) {
tmp = (Math.log((y * z)) + t_1) - t;
} else if ((a - 0.5) <= 5e+14) {
tmp = Math.log(y) + (Math.log(z) - (t + (Math.log(t) * 0.5)));
} else {
tmp = (Math.log(((x + y) * z)) + t_1) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * (a - 0.5) tmp = 0 if (a - 0.5) <= -0.505: tmp = (math.log((y * z)) + t_1) - t elif (a - 0.5) <= 5e+14: tmp = math.log(y) + (math.log(z) - (t + (math.log(t) * 0.5))) else: tmp = (math.log(((x + y) * z)) + t_1) - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * Float64(a - 0.5)) tmp = 0.0 if (Float64(a - 0.5) <= -0.505) tmp = Float64(Float64(log(Float64(y * z)) + t_1) - t); elseif (Float64(a - 0.5) <= 5e+14) tmp = Float64(log(y) + Float64(log(z) - Float64(t + Float64(log(t) * 0.5)))); else tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + t_1) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * (a - 0.5); tmp = 0.0; if ((a - 0.5) <= -0.505) tmp = (log((y * z)) + t_1) - t; elseif ((a - 0.5) <= 5e+14) tmp = log(y) + (log(z) - (t + (log(t) * 0.5))); else tmp = (log(((x + y) * z)) + t_1) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.505], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], 5e+14], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(t + N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot \left(a - 0.5\right)\\
\mathbf{if}\;a - 0.5 \leq -0.505:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + t\_1\right) - t\\
\mathbf{elif}\;a - 0.5 \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\log y + \left(\log z - \left(t + \log t \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + t\_1\right) - t\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -0.505000000000000004Initial program 99.7%
add-cube-cbrt98.1%
pow398.2%
+-commutative98.2%
*-commutative98.2%
fma-define98.2%
sub-neg98.2%
metadata-eval98.2%
sum-log79.0%
Applied egg-rr79.0%
Taylor expanded in x around 0 61.0%
if -0.505000000000000004 < (-.f64 a #s(literal 1/2 binary64)) < 5e14Initial 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 65.6%
Taylor expanded in a around 0 64.5%
associate--l+64.6%
*-commutative64.6%
Simplified64.6%
if 5e14 < (-.f64 a #s(literal 1/2 binary64)) 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.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
associate-+r-99.7%
fma-undefine99.6%
associate--r+99.6%
sum-log80.5%
Applied egg-rr80.5%
Final simplification67.1%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.43) (+ (log z) (+ (log (+ x y)) (* (log t) (- a 0.5)))) (- (+ (log y) (+ (log z) (* (log t) a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.43) {
tmp = log(z) + (log((x + y)) + (log(t) * (a - 0.5)));
} else {
tmp = (log(y) + (log(z) + (log(t) * a))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 0.43d0) then
tmp = log(z) + (log((x + y)) + (log(t) * (a - 0.5d0)))
else
tmp = (log(y) + (log(z) + (log(t) * a))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.43) {
tmp = Math.log(z) + (Math.log((x + y)) + (Math.log(t) * (a - 0.5)));
} else {
tmp = (Math.log(y) + (Math.log(z) + (Math.log(t) * a))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.43: tmp = math.log(z) + (math.log((x + y)) + (math.log(t) * (a - 0.5))) else: tmp = (math.log(y) + (math.log(z) + (math.log(t) * a))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.43) tmp = Float64(log(z) + Float64(log(Float64(x + y)) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(log(t) * a))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.43) tmp = log(z) + (log((x + y)) + (log(t) * (a - 0.5))); else tmp = (log(y) + (log(z) + (log(t) * a))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.43], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.43:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \left(\log z + \log t \cdot a\right)\right) - t\\
\end{array}
\end{array}
if t < 0.429999999999999993Initial program 99.4%
Taylor expanded in t around 0 98.4%
if 0.429999999999999993 < 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 71.5%
Taylor expanded in a around inf 71.5%
mul-1-neg71.5%
*-commutative71.5%
distribute-rgt-neg-in71.5%
Simplified71.5%
Taylor expanded in a around 0 71.5%
Final simplification84.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.43) (+ (+ (log z) (log y)) (* (log t) (- a 0.5))) (- (+ (log y) (+ (log z) (* (log t) a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.43) {
tmp = (log(z) + log(y)) + (log(t) * (a - 0.5));
} else {
tmp = (log(y) + (log(z) + (log(t) * a))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 0.43d0) then
tmp = (log(z) + log(y)) + (log(t) * (a - 0.5d0))
else
tmp = (log(y) + (log(z) + (log(t) * a))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.43) {
tmp = (Math.log(z) + Math.log(y)) + (Math.log(t) * (a - 0.5));
} else {
tmp = (Math.log(y) + (Math.log(z) + (Math.log(t) * a))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.43: tmp = (math.log(z) + math.log(y)) + (math.log(t) * (a - 0.5)) else: tmp = (math.log(y) + (math.log(z) + (math.log(t) * a))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.43) tmp = Float64(Float64(log(z) + log(y)) + Float64(log(t) * Float64(a - 0.5))); else tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(log(t) * a))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.43) tmp = (log(z) + log(y)) + (log(t) * (a - 0.5)); else tmp = (log(y) + (log(z) + (log(t) * a))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.43], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.43:\\
\;\;\;\;\left(\log z + \log y\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \left(\log z + \log t \cdot a\right)\right) - t\\
\end{array}
\end{array}
if t < 0.429999999999999993Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 69.3%
Taylor expanded in t around 0 68.5%
if 0.429999999999999993 < 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 71.5%
Taylor expanded in a around inf 71.5%
mul-1-neg71.5%
*-commutative71.5%
distribute-rgt-neg-in71.5%
Simplified71.5%
Taylor expanded in a around 0 71.5%
Final simplification70.0%
(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 (- (+ (log y) (+ (log z) (* (log t) (- a 0.5)))) t))
double code(double x, double y, double z, double t, double a) {
return (log(y) + (log(z) + (log(t) * (a - 0.5)))) - t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(y) + (log(z) + (log(t) * (a - 0.5d0)))) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)))) - t;
}
def code(x, y, z, t, a): return (math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5)))) - t
function code(x, y, z, t, a) return Float64(Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(y) + (log(z) + (log(t) * (a - 0.5)))) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\right) - t
\end{array}
Initial program 99.6%
Taylor expanded in x around 0 70.5%
(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-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 70.5%
Final simplification70.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (pow t (- 0.5 a))) (t_2 (* (log t) a)))
(if (<= t 7e-208)
t_2
(if (<= t 1.8e-174)
(log (/ (* y z) t_1))
(if (<= t 9.8e-102)
t_2
(if (<= t 6.8e-43)
(log (* z (/ y t_1)))
(if (<= t 1.35e+26) t_2 (- (+ (log z) (log y)) t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = pow(t, (0.5 - a));
double t_2 = log(t) * a;
double tmp;
if (t <= 7e-208) {
tmp = t_2;
} else if (t <= 1.8e-174) {
tmp = log(((y * z) / t_1));
} else if (t <= 9.8e-102) {
tmp = t_2;
} else if (t <= 6.8e-43) {
tmp = log((z * (y / t_1)));
} else if (t <= 1.35e+26) {
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 = t ** (0.5d0 - a)
t_2 = log(t) * a
if (t <= 7d-208) then
tmp = t_2
else if (t <= 1.8d-174) then
tmp = log(((y * z) / t_1))
else if (t <= 9.8d-102) then
tmp = t_2
else if (t <= 6.8d-43) then
tmp = log((z * (y / t_1)))
else if (t <= 1.35d+26) 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.pow(t, (0.5 - a));
double t_2 = Math.log(t) * a;
double tmp;
if (t <= 7e-208) {
tmp = t_2;
} else if (t <= 1.8e-174) {
tmp = Math.log(((y * z) / t_1));
} else if (t <= 9.8e-102) {
tmp = t_2;
} else if (t <= 6.8e-43) {
tmp = Math.log((z * (y / t_1)));
} else if (t <= 1.35e+26) {
tmp = t_2;
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.pow(t, (0.5 - a)) t_2 = math.log(t) * a tmp = 0 if t <= 7e-208: tmp = t_2 elif t <= 1.8e-174: tmp = math.log(((y * z) / t_1)) elif t <= 9.8e-102: tmp = t_2 elif t <= 6.8e-43: tmp = math.log((z * (y / t_1))) elif t <= 1.35e+26: tmp = t_2 else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) t_1 = t ^ Float64(0.5 - a) t_2 = Float64(log(t) * a) tmp = 0.0 if (t <= 7e-208) tmp = t_2; elseif (t <= 1.8e-174) tmp = log(Float64(Float64(y * z) / t_1)); elseif (t <= 9.8e-102) tmp = t_2; elseif (t <= 6.8e-43) tmp = log(Float64(z * Float64(y / t_1))); elseif (t <= 1.35e+26) 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 = t ^ (0.5 - a); t_2 = log(t) * a; tmp = 0.0; if (t <= 7e-208) tmp = t_2; elseif (t <= 1.8e-174) tmp = log(((y * z) / t_1)); elseif (t <= 9.8e-102) tmp = t_2; elseif (t <= 6.8e-43) tmp = log((z * (y / t_1))); elseif (t <= 1.35e+26) 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[Power[t, N[(0.5 - a), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, 7e-208], t$95$2, If[LessEqual[t, 1.8e-174], N[Log[N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 9.8e-102], t$95$2, If[LessEqual[t, 6.8e-43], N[Log[N[(z * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.35e+26], t$95$2, N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {t}^{\left(0.5 - a\right)}\\
t_2 := \log t \cdot a\\
\mathbf{if}\;t \leq 7 \cdot 10^{-208}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-174}:\\
\;\;\;\;\log \left(\frac{y \cdot z}{t\_1}\right)\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-43}:\\
\;\;\;\;\log \left(z \cdot \frac{y}{t\_1}\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 6.99999999999999982e-208 or 1.79999999999999999e-174 < t < 9.7999999999999995e-102 or 6.8000000000000001e-43 < t < 1.35e26Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 55.6%
*-commutative55.6%
Simplified55.6%
if 6.99999999999999982e-208 < t < 1.79999999999999999e-174Initial 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 70.6%
Taylor expanded in t around 0 70.6%
+-commutative70.6%
log-prod51.6%
add-log-exp51.6%
diff-log51.6%
exp-to-pow51.7%
Applied egg-rr51.7%
if 9.7999999999999995e-102 < t < 6.8000000000000001e-43Initial program 99.3%
associate-+l-99.3%
associate--l+99.2%
sub-neg99.2%
+-commutative99.2%
*-commutative99.2%
distribute-rgt-neg-in99.2%
fma-undefine99.2%
sub-neg99.2%
+-commutative99.2%
distribute-neg-in99.2%
metadata-eval99.2%
metadata-eval99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in x around 0 59.6%
Taylor expanded in t around 0 59.6%
*-un-lft-identity59.6%
+-commutative59.6%
log-prod41.9%
add-log-exp30.6%
diff-log30.8%
exp-to-pow30.8%
Applied egg-rr30.8%
*-lft-identity30.8%
associate-/l*33.8%
Simplified33.8%
if 1.35e26 < 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 73.5%
Taylor expanded in a around inf 73.5%
mul-1-neg73.5%
*-commutative73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
Taylor expanded in a around 0 54.8%
Final simplification53.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) a)) (t_2 (log (* z (/ y (pow t (- 0.5 a)))))))
(if (<= t 8e-208)
t_1
(if (<= t 5.9e-173)
t_2
(if (<= t 5e-102)
t_1
(if (<= t 2.7e-43)
t_2
(if (<= t 1.9e+23) t_1 (- (+ (log z) (log y)) t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * a;
double t_2 = log((z * (y / pow(t, (0.5 - a)))));
double tmp;
if (t <= 8e-208) {
tmp = t_1;
} else if (t <= 5.9e-173) {
tmp = t_2;
} else if (t <= 5e-102) {
tmp = t_1;
} else if (t <= 2.7e-43) {
tmp = t_2;
} else if (t <= 1.9e+23) {
tmp = t_1;
} 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(t) * a
t_2 = log((z * (y / (t ** (0.5d0 - a)))))
if (t <= 8d-208) then
tmp = t_1
else if (t <= 5.9d-173) then
tmp = t_2
else if (t <= 5d-102) then
tmp = t_1
else if (t <= 2.7d-43) then
tmp = t_2
else if (t <= 1.9d+23) then
tmp = t_1
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;
double t_2 = Math.log((z * (y / Math.pow(t, (0.5 - a)))));
double tmp;
if (t <= 8e-208) {
tmp = t_1;
} else if (t <= 5.9e-173) {
tmp = t_2;
} else if (t <= 5e-102) {
tmp = t_1;
} else if (t <= 2.7e-43) {
tmp = t_2;
} else if (t <= 1.9e+23) {
tmp = t_1;
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * a t_2 = math.log((z * (y / math.pow(t, (0.5 - a))))) tmp = 0 if t <= 8e-208: tmp = t_1 elif t <= 5.9e-173: tmp = t_2 elif t <= 5e-102: tmp = t_1 elif t <= 2.7e-43: tmp = t_2 elif t <= 1.9e+23: tmp = t_1 else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * a) t_2 = log(Float64(z * Float64(y / (t ^ Float64(0.5 - a))))) tmp = 0.0 if (t <= 8e-208) tmp = t_1; elseif (t <= 5.9e-173) tmp = t_2; elseif (t <= 5e-102) tmp = t_1; elseif (t <= 2.7e-43) tmp = t_2; elseif (t <= 1.9e+23) tmp = t_1; 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; t_2 = log((z * (y / (t ^ (0.5 - a))))); tmp = 0.0; if (t <= 8e-208) tmp = t_1; elseif (t <= 5.9e-173) tmp = t_2; elseif (t <= 5e-102) tmp = t_1; elseif (t <= 2.7e-43) tmp = t_2; elseif (t <= 1.9e+23) tmp = t_1; 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] * a), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(z * N[(y / N[Power[t, N[(0.5 - a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 8e-208], t$95$1, If[LessEqual[t, 5.9e-173], t$95$2, If[LessEqual[t, 5e-102], t$95$1, If[LessEqual[t, 2.7e-43], t$95$2, If[LessEqual[t, 1.9e+23], t$95$1, N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot a\\
t_2 := \log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\
\mathbf{if}\;t \leq 8 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{-173}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-43}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 8.0000000000000008e-208 or 5.89999999999999995e-173 < t < 5.00000000000000026e-102 or 2.69999999999999991e-43 < t < 1.89999999999999987e23Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 55.6%
*-commutative55.6%
Simplified55.6%
if 8.0000000000000008e-208 < t < 5.89999999999999995e-173 or 5.00000000000000026e-102 < t < 2.69999999999999991e-43Initial 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.7%
*-un-lft-identity62.7%
+-commutative62.7%
log-prod44.7%
add-log-exp36.6%
diff-log36.7%
exp-to-pow36.8%
Applied egg-rr36.8%
*-lft-identity36.8%
associate-/l*38.9%
Simplified38.9%
if 1.89999999999999987e23 < 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 73.5%
Taylor expanded in a around inf 73.5%
mul-1-neg73.5%
*-commutative73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
Taylor expanded in a around 0 54.8%
Final simplification53.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (log t) a)) (t_2 (+ (log (* y z)) (- t_1 t))))
(if (<= a -780000.0)
t_2
(if (<= a 1.6e-70)
(- (+ (log z) (log y)) t)
(if (<= a 0.32)
(log (* z (/ y (pow t (- 0.5 a)))))
(if (<= a 9.2e+53) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * a;
double t_2 = log((y * z)) + (t_1 - t);
double tmp;
if (a <= -780000.0) {
tmp = t_2;
} else if (a <= 1.6e-70) {
tmp = (log(z) + log(y)) - t;
} else if (a <= 0.32) {
tmp = log((z * (y / pow(t, (0.5 - a)))));
} else if (a <= 9.2e+53) {
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 = log(t) * a
t_2 = log((y * z)) + (t_1 - t)
if (a <= (-780000.0d0)) then
tmp = t_2
else if (a <= 1.6d-70) then
tmp = (log(z) + log(y)) - t
else if (a <= 0.32d0) then
tmp = log((z * (y / (t ** (0.5d0 - a)))))
else if (a <= 9.2d+53) 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 = Math.log(t) * a;
double t_2 = Math.log((y * z)) + (t_1 - t);
double tmp;
if (a <= -780000.0) {
tmp = t_2;
} else if (a <= 1.6e-70) {
tmp = (Math.log(z) + Math.log(y)) - t;
} else if (a <= 0.32) {
tmp = Math.log((z * (y / Math.pow(t, (0.5 - a)))));
} else if (a <= 9.2e+53) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * a t_2 = math.log((y * z)) + (t_1 - t) tmp = 0 if a <= -780000.0: tmp = t_2 elif a <= 1.6e-70: tmp = (math.log(z) + math.log(y)) - t elif a <= 0.32: tmp = math.log((z * (y / math.pow(t, (0.5 - a))))) elif a <= 9.2e+53: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * a) t_2 = Float64(log(Float64(y * z)) + Float64(t_1 - t)) tmp = 0.0 if (a <= -780000.0) tmp = t_2; elseif (a <= 1.6e-70) tmp = Float64(Float64(log(z) + log(y)) - t); elseif (a <= 0.32) tmp = log(Float64(z * Float64(y / (t ^ Float64(0.5 - a))))); elseif (a <= 9.2e+53) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * a; t_2 = log((y * z)) + (t_1 - t); tmp = 0.0; if (a <= -780000.0) tmp = t_2; elseif (a <= 1.6e-70) tmp = (log(z) + log(y)) - t; elseif (a <= 0.32) tmp = log((z * (y / (t ^ (0.5 - a))))); elseif (a <= 9.2e+53) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(t$95$1 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -780000.0], t$95$2, If[LessEqual[a, 1.6e-70], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 0.32], N[Log[N[(z * N[(y / N[Power[t, N[(0.5 - a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[a, 9.2e+53], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot a\\
t_2 := \log \left(y \cdot z\right) + \left(t\_1 - t\right)\\
\mathbf{if}\;a \leq -780000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-70}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\mathbf{elif}\;a \leq 0.32:\\
\;\;\;\;\log \left(z \cdot \frac{y}{{t}^{\left(0.5 - a\right)}}\right)\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+53}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.8e5 or 0.320000000000000007 < a < 9.20000000000000079e53Initial 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.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 77.7%
Taylor expanded in a around inf 76.5%
mul-1-neg76.5%
*-commutative76.5%
distribute-rgt-neg-in76.5%
Simplified76.5%
sub-neg76.5%
+-commutative76.5%
sum-log61.3%
+-commutative61.3%
fma-define61.3%
Applied egg-rr61.3%
neg-sub061.3%
fma-define61.3%
associate--r+61.3%
neg-sub061.3%
distribute-rgt-neg-in61.3%
remove-double-neg61.3%
Simplified61.3%
if -7.8e5 < a < 1.5999999999999999e-70Initial program 99.7%
associate-+l-99.7%
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 65.4%
Taylor expanded in a around inf 43.9%
mul-1-neg43.9%
*-commutative43.9%
distribute-rgt-neg-in43.9%
Simplified43.9%
Taylor expanded in a around 0 43.5%
if 1.5999999999999999e-70 < a < 0.320000000000000007Initial program 98.7%
associate-+l-98.7%
associate--l+99.0%
sub-neg99.0%
+-commutative99.0%
*-commutative99.0%
distribute-rgt-neg-in99.0%
fma-undefine99.0%
sub-neg99.0%
+-commutative99.0%
distribute-neg-in99.0%
metadata-eval99.0%
metadata-eval99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in x around 0 69.5%
Taylor expanded in t around 0 52.1%
*-un-lft-identity52.1%
+-commutative52.1%
log-prod36.1%
add-log-exp36.1%
diff-log36.0%
exp-to-pow36.5%
Applied egg-rr36.5%
*-lft-identity36.5%
associate-/l*45.0%
Simplified45.0%
if 9.20000000000000079e53 < 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-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 a around inf 81.8%
*-commutative81.8%
Simplified81.8%
Final simplification55.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t 3.8e+99)
(- (+ (log (* (+ x y) z)) (* (log t) (- a 0.5))) t)
(if (<= t 1.9e+167)
(- t)
(if (<= t 1.12e+229)
(+ (log (* y z)) (- (* (log t) a) t))
(- (+ (log z) (log y)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3.8e+99) {
tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5))) - t;
} else if (t <= 1.9e+167) {
tmp = -t;
} else if (t <= 1.12e+229) {
tmp = log((y * z)) + ((log(t) * a) - 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 <= 3.8d+99) then
tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5d0))) - t
else if (t <= 1.9d+167) then
tmp = -t
else if (t <= 1.12d+229) then
tmp = log((y * z)) + ((log(t) * a) - 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 <= 3.8e+99) {
tmp = (Math.log(((x + y) * z)) + (Math.log(t) * (a - 0.5))) - t;
} else if (t <= 1.9e+167) {
tmp = -t;
} else if (t <= 1.12e+229) {
tmp = Math.log((y * z)) + ((Math.log(t) * a) - t);
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3.8e+99: tmp = (math.log(((x + y) * z)) + (math.log(t) * (a - 0.5))) - t elif t <= 1.9e+167: tmp = -t elif t <= 1.12e+229: tmp = math.log((y * z)) + ((math.log(t) * a) - t) else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3.8e+99) tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + Float64(log(t) * Float64(a - 0.5))) - t); elseif (t <= 1.9e+167) tmp = Float64(-t); elseif (t <= 1.12e+229) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * a) - 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 <= 3.8e+99) tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5))) - t; elseif (t <= 1.9e+167) tmp = -t; elseif (t <= 1.12e+229) tmp = log((y * z)) + ((log(t) * a) - t); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3.8e+99], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, 1.9e+167], (-t), If[LessEqual[t, 1.12e+229], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $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.8 \cdot 10^{+99}:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+167}:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+229}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 3.8e99Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
associate-+r-99.4%
fma-undefine99.4%
associate--r+99.4%
sum-log75.5%
Applied egg-rr75.5%
if 3.8e99 < t < 1.89999999999999997e167Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.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 85.3%
neg-mul-185.3%
Simplified85.3%
if 1.89999999999999997e167 < t < 1.12e229Initial program 99.8%
associate-+l-99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-undefine99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 88.2%
Taylor expanded in a around inf 88.2%
mul-1-neg88.2%
*-commutative88.2%
distribute-rgt-neg-in88.2%
Simplified88.2%
sub-neg88.2%
+-commutative88.2%
sum-log73.7%
+-commutative73.7%
fma-define73.7%
Applied egg-rr73.7%
neg-sub073.7%
fma-define73.7%
associate--r+73.7%
neg-sub073.7%
distribute-rgt-neg-in73.7%
remove-double-neg73.7%
Simplified73.7%
if 1.12e229 < 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-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 59.1%
Taylor expanded in a around inf 59.1%
mul-1-neg59.1%
*-commutative59.1%
distribute-rgt-neg-in59.1%
Simplified59.1%
Taylor expanded in a around 0 55.9%
Final simplification73.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z))))
(if (<= t 3.7e+97)
(- (+ t_1 (* (log t) (- a 0.5))) t)
(if (<= t 1.9e+167)
(- t)
(if (<= t 1.12e+229)
(+ t_1 (- (* (log t) a) t))
(- (+ (log z) (log y)) t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double tmp;
if (t <= 3.7e+97) {
tmp = (t_1 + (log(t) * (a - 0.5))) - t;
} else if (t <= 1.9e+167) {
tmp = -t;
} else if (t <= 1.12e+229) {
tmp = t_1 + ((log(t) * a) - 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) :: t_1
real(8) :: tmp
t_1 = log((y * z))
if (t <= 3.7d+97) then
tmp = (t_1 + (log(t) * (a - 0.5d0))) - t
else if (t <= 1.9d+167) then
tmp = -t
else if (t <= 1.12d+229) then
tmp = t_1 + ((log(t) * a) - 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 t_1 = Math.log((y * z));
double tmp;
if (t <= 3.7e+97) {
tmp = (t_1 + (Math.log(t) * (a - 0.5))) - t;
} else if (t <= 1.9e+167) {
tmp = -t;
} else if (t <= 1.12e+229) {
tmp = t_1 + ((Math.log(t) * a) - t);
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((y * z)) tmp = 0 if t <= 3.7e+97: tmp = (t_1 + (math.log(t) * (a - 0.5))) - t elif t <= 1.9e+167: tmp = -t elif t <= 1.12e+229: tmp = t_1 + ((math.log(t) * a) - t) else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) tmp = 0.0 if (t <= 3.7e+97) tmp = Float64(Float64(t_1 + Float64(log(t) * Float64(a - 0.5))) - t); elseif (t <= 1.9e+167) tmp = Float64(-t); elseif (t <= 1.12e+229) tmp = Float64(t_1 + Float64(Float64(log(t) * a) - t)); 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((y * z)); tmp = 0.0; if (t <= 3.7e+97) tmp = (t_1 + (log(t) * (a - 0.5))) - t; elseif (t <= 1.9e+167) tmp = -t; elseif (t <= 1.12e+229) tmp = t_1 + ((log(t) * a) - t); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 3.7e+97], N[(N[(t$95$1 + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, 1.9e+167], (-t), If[LessEqual[t, 1.12e+229], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
\mathbf{if}\;t \leq 3.7 \cdot 10^{+97}:\\
\;\;\;\;\left(t\_1 + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+167}:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+229}:\\
\;\;\;\;t\_1 + \left(\log t \cdot a - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 3.70000000000000001e97Initial program 99.4%
add-cube-cbrt98.0%
pow398.0%
+-commutative98.0%
*-commutative98.0%
fma-define98.0%
sub-neg98.0%
metadata-eval98.0%
sum-log74.4%
Applied egg-rr74.4%
Taylor expanded in x around 0 49.9%
if 3.70000000000000001e97 < t < 1.89999999999999997e167Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.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 85.3%
neg-mul-185.3%
Simplified85.3%
if 1.89999999999999997e167 < t < 1.12e229Initial program 99.8%
associate-+l-99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-undefine99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 88.2%
Taylor expanded in a around inf 88.2%
mul-1-neg88.2%
*-commutative88.2%
distribute-rgt-neg-in88.2%
Simplified88.2%
sub-neg88.2%
+-commutative88.2%
sum-log73.7%
+-commutative73.7%
fma-define73.7%
Applied egg-rr73.7%
neg-sub073.7%
fma-define73.7%
associate--r+73.7%
neg-sub073.7%
distribute-rgt-neg-in73.7%
remove-double-neg73.7%
Simplified73.7%
if 1.12e229 < 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-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 59.1%
Taylor expanded in a around inf 59.1%
mul-1-neg59.1%
*-commutative59.1%
distribute-rgt-neg-in59.1%
Simplified59.1%
Taylor expanded in a around 0 55.9%
Final simplification57.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t 0.43)
(+ (log (* (+ x y) z)) (* (log t) (+ a -0.5)))
(if (<= t 9.4e+95)
(+ (log (* y z)) (- (* (log t) a) t))
(- (+ (log z) (log y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.43) {
tmp = log(((x + y) * z)) + (log(t) * (a + -0.5));
} else if (t <= 9.4e+95) {
tmp = log((y * z)) + ((log(t) * a) - 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 <= 0.43d0) then
tmp = log(((x + y) * z)) + (log(t) * (a + (-0.5d0)))
else if (t <= 9.4d+95) then
tmp = log((y * z)) + ((log(t) * a) - 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 <= 0.43) {
tmp = Math.log(((x + y) * z)) + (Math.log(t) * (a + -0.5));
} else if (t <= 9.4e+95) {
tmp = Math.log((y * z)) + ((Math.log(t) * a) - t);
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.43: tmp = math.log(((x + y) * z)) + (math.log(t) * (a + -0.5)) elif t <= 9.4e+95: tmp = math.log((y * z)) + ((math.log(t) * a) - t) else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.43) tmp = Float64(log(Float64(Float64(x + y) * z)) + Float64(log(t) * Float64(a + -0.5))); elseif (t <= 9.4e+95) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * a) - 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 <= 0.43) tmp = log(((x + y) * z)) + (log(t) * (a + -0.5)); elseif (t <= 9.4e+95) tmp = log((y * z)) + ((log(t) * a) - t); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.43], N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.4e+95], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $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 0.43:\\
\;\;\;\;\log \left(\left(x + y\right) \cdot z\right) + \log t \cdot \left(a + -0.5\right)\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{+95}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot a - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 0.429999999999999993Initial program 99.4%
add-cube-cbrt98.1%
pow398.0%
+-commutative98.0%
*-commutative98.0%
fma-define98.0%
sub-neg98.0%
metadata-eval98.0%
sum-log71.6%
Applied egg-rr71.6%
Taylor expanded in t around 0 71.7%
+-commutative71.7%
+-commutative71.7%
sub-neg71.7%
metadata-eval71.7%
Simplified71.7%
if 0.429999999999999993 < t < 9.39999999999999945e95Initial program 99.7%
associate-+l-99.7%
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 77.2%
Taylor expanded in a around inf 77.1%
mul-1-neg77.1%
*-commutative77.1%
distribute-rgt-neg-in77.1%
Simplified77.1%
sub-neg77.1%
+-commutative77.1%
sum-log58.6%
+-commutative58.6%
fma-define58.6%
Applied egg-rr58.6%
neg-sub058.6%
fma-define58.6%
associate--r+58.6%
neg-sub058.6%
distribute-rgt-neg-in58.6%
remove-double-neg58.6%
Simplified58.6%
if 9.39999999999999945e95 < 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-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 69.8%
Taylor expanded in a around inf 69.8%
mul-1-neg69.8%
*-commutative69.8%
distribute-rgt-neg-in69.8%
Simplified69.8%
Taylor expanded in a around 0 56.4%
Final simplification63.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z))))
(if (<= t 0.43)
(+ t_1 (* (log t) (- a 0.5)))
(if (<= t 4.1e+98)
(+ t_1 (- (* (log t) a) t))
(- (+ (log z) (log y)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double tmp;
if (t <= 0.43) {
tmp = t_1 + (log(t) * (a - 0.5));
} else if (t <= 4.1e+98) {
tmp = t_1 + ((log(t) * a) - 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) :: t_1
real(8) :: tmp
t_1 = log((y * z))
if (t <= 0.43d0) then
tmp = t_1 + (log(t) * (a - 0.5d0))
else if (t <= 4.1d+98) then
tmp = t_1 + ((log(t) * a) - 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 t_1 = Math.log((y * z));
double tmp;
if (t <= 0.43) {
tmp = t_1 + (Math.log(t) * (a - 0.5));
} else if (t <= 4.1e+98) {
tmp = t_1 + ((Math.log(t) * a) - t);
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((y * z)) tmp = 0 if t <= 0.43: tmp = t_1 + (math.log(t) * (a - 0.5)) elif t <= 4.1e+98: tmp = t_1 + ((math.log(t) * a) - t) else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) tmp = 0.0 if (t <= 0.43) tmp = Float64(t_1 + Float64(log(t) * Float64(a - 0.5))); elseif (t <= 4.1e+98) tmp = Float64(t_1 + Float64(Float64(log(t) * a) - t)); 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((y * z)); tmp = 0.0; if (t <= 0.43) tmp = t_1 + (log(t) * (a - 0.5)); elseif (t <= 4.1e+98) tmp = t_1 + ((log(t) * a) - t); else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.43], N[(t$95$1 + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+98], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
\mathbf{if}\;t \leq 0.43:\\
\;\;\;\;t\_1 + \log t \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+98}:\\
\;\;\;\;t\_1 + \left(\log t \cdot a - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 0.429999999999999993Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 69.3%
Taylor expanded in t around 0 68.5%
+-commutative68.5%
log-prod46.8%
Applied egg-rr46.8%
if 0.429999999999999993 < t < 4.1e98Initial program 99.7%
associate-+l-99.7%
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 77.2%
Taylor expanded in a around inf 77.1%
mul-1-neg77.1%
*-commutative77.1%
distribute-rgt-neg-in77.1%
Simplified77.1%
sub-neg77.1%
+-commutative77.1%
sum-log58.6%
+-commutative58.6%
fma-define58.6%
Applied egg-rr58.6%
neg-sub058.6%
fma-define58.6%
associate--r+58.6%
neg-sub058.6%
distribute-rgt-neg-in58.6%
remove-double-neg58.6%
Simplified58.6%
if 4.1e98 < 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-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 69.8%
Taylor expanded in a around inf 69.8%
mul-1-neg69.8%
*-commutative69.8%
distribute-rgt-neg-in69.8%
Simplified69.8%
Taylor expanded in a around 0 56.4%
Final simplification52.1%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.6e+22) (* (log t) a) (- (+ (log z) (log y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.6e+22) {
tmp = log(t) * 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 <= 1.6d+22) then
tmp = log(t) * 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 <= 1.6e+22) {
tmp = Math.log(t) * a;
} else {
tmp = (Math.log(z) + Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.6e+22: tmp = math.log(t) * a else: tmp = (math.log(z) + math.log(y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.6e+22) tmp = Float64(log(t) * 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 <= 1.6e+22) tmp = log(t) * a; else tmp = (log(z) + log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.6e+22], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.6 \cdot 10^{+22}:\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\end{array}
\end{array}
if t < 1.6e22Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 46.8%
*-commutative46.8%
Simplified46.8%
if 1.6e22 < 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 73.5%
Taylor expanded in a around inf 73.5%
mul-1-neg73.5%
*-commutative73.5%
distribute-rgt-neg-in73.5%
Simplified73.5%
Taylor expanded in a around 0 54.8%
Final simplification50.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 7.6e+21) (* (log t) a) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 7.6e+21) {
tmp = log(t) * a;
} 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 <= 7.6d+21) then
tmp = log(t) * a
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 <= 7.6e+21) {
tmp = Math.log(t) * a;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 7.6e+21: tmp = math.log(t) * a else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 7.6e+21) tmp = Float64(log(t) * a); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 7.6e+21) tmp = log(t) * a; else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 7.6e+21], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 7.6 \cdot 10^{+21}:\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 7.6e21Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 46.8%
*-commutative46.8%
Simplified46.8%
if 7.6e21 < 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 78.9%
neg-mul-178.9%
Simplified78.9%
(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 t around inf 40.7%
neg-mul-140.7%
Simplified40.7%
(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 2024096
(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))))