
(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 16 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)) (* (+ 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(log(Float64(x + y)) + 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[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \left(a + -0.5\right) \cdot \log t
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 200.0) (+ (log y) (+ (log z) (* (log t) (- a 0.5)))) (- (* a (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 200.0) {
tmp = log(y) + (log(z) + (log(t) * (a - 0.5)));
} else {
tmp = (a * log(t)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 200.0d0) then
tmp = log(y) + (log(z) + (log(t) * (a - 0.5d0)))
else
tmp = (a * log(t)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 200.0) {
tmp = Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)));
} else {
tmp = (a * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 200.0: tmp = math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5))) else: tmp = (a * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 200.0) tmp = Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(Float64(a * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 200.0) tmp = log(y) + (log(z) + (log(t) * (a - 0.5))); else tmp = (a * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 200.0], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 200:\\
\;\;\;\;\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if t < 200Initial program 99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 61.6%
Taylor expanded in t around 0 60.9%
if 200 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 75.5%
Taylor expanded in a around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 210.0) (+ (* (+ a -0.5) (log t)) (+ (log z) (log y))) (- (* a (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 210.0) {
tmp = ((a + -0.5) * log(t)) + (log(z) + log(y));
} else {
tmp = (a * log(t)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 210.0d0) then
tmp = ((a + (-0.5d0)) * log(t)) + (log(z) + log(y))
else
tmp = (a * log(t)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 210.0) {
tmp = ((a + -0.5) * Math.log(t)) + (Math.log(z) + Math.log(y));
} else {
tmp = (a * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 210.0: tmp = ((a + -0.5) * math.log(t)) + (math.log(z) + math.log(y)) else: tmp = (a * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 210.0) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) + Float64(log(z) + log(y))); else tmp = Float64(Float64(a * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 210.0) tmp = ((a + -0.5) * log(t)) + (log(z) + log(y)); else tmp = (a * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 210.0], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 210:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t + \left(\log z + \log y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if t < 210Initial program 99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 61.6%
remove-double-neg61.6%
log-rec61.6%
mul-1-neg61.6%
+-commutative61.6%
associate--l+61.6%
mul-1-neg61.6%
log-rec61.6%
remove-double-neg61.6%
Simplified61.6%
Taylor expanded in t around 0 60.9%
if 210 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 75.5%
Taylor expanded in a around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (+ (* (+ a -0.5) (log t)) (+ (log z) (- (log y) t))))
double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * log(t)) + (log(z) + (log(y) - 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 = ((a + (-0.5d0)) * log(t)) + (log(z) + (log(y) - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * Math.log(t)) + (Math.log(z) + (Math.log(y) - t));
}
def code(x, y, z, t, a): return ((a + -0.5) * math.log(t)) + (math.log(z) + (math.log(y) - t))
function code(x, y, z, t, a) return Float64(Float64(Float64(a + -0.5) * log(t)) + Float64(log(z) + Float64(log(y) - t))) end
function tmp = code(x, y, z, t, a) tmp = ((a + -0.5) * log(t)) + (log(z) + (log(y) - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.5\right) \cdot \log t + \left(\log z + \left(\log y - t\right)\right)
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.5%
remove-double-neg68.5%
log-rec68.5%
mul-1-neg68.5%
+-commutative68.5%
associate--l+68.5%
mul-1-neg68.5%
log-rec68.5%
remove-double-neg68.5%
Simplified68.5%
Final simplification68.5%
(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%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.5%
Final simplification68.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.4e-15)
(- (* (+ a -0.5) (log t)) t)
(if (<= a 2100000000.0)
(- (+ (log (* z (+ x y))) (* (log t) (- a 0.5))) t)
(- (* a (log t)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-15) {
tmp = ((a + -0.5) * log(t)) - t;
} else if (a <= 2100000000.0) {
tmp = (log((z * (x + y))) + (log(t) * (a - 0.5))) - t;
} else {
tmp = (a * log(t)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.4d-15)) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else if (a <= 2100000000.0d0) then
tmp = (log((z * (x + y))) + (log(t) * (a - 0.5d0))) - t
else
tmp = (a * log(t)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-15) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else if (a <= 2100000000.0) {
tmp = (Math.log((z * (x + y))) + (Math.log(t) * (a - 0.5))) - t;
} else {
tmp = (a * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e-15: tmp = ((a + -0.5) * math.log(t)) - t elif a <= 2100000000.0: tmp = (math.log((z * (x + y))) + (math.log(t) * (a - 0.5))) - t else: tmp = (a * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e-15) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); elseif (a <= 2100000000.0) tmp = Float64(Float64(log(Float64(z * Float64(x + y))) + Float64(log(t) * Float64(a - 0.5))) - t); else tmp = Float64(Float64(a * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e-15) tmp = ((a + -0.5) * log(t)) - t; elseif (a <= 2100000000.0) tmp = (log((z * (x + y))) + (log(t) * (a - 0.5))) - t; else tmp = (a * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-15], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 2100000000.0], 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], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-15}:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{elif}\;a \leq 2100000000:\\
\;\;\;\;\left(\log \left(z \cdot \left(x + y\right)\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if a < -1.40000000000000007e-15Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 80.4%
remove-double-neg80.4%
log-rec80.4%
mul-1-neg80.4%
+-commutative80.4%
associate--l+80.4%
mul-1-neg80.4%
log-rec80.4%
remove-double-neg80.4%
Simplified80.4%
Taylor expanded in t around inf 98.0%
neg-mul-198.0%
Simplified98.0%
if -1.40000000000000007e-15 < a < 2.1e9Initial program 99.5%
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.5%
sum-log81.2%
Applied egg-rr81.2%
if 2.1e9 < a Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 72.2%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification91.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.45e-15) (not (<= a 1.85e-50))) (- (* (+ a -0.5) (log t)) t) (- (log (* z (+ x y))) (+ t (* (log t) 0.5)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e-15) || !(a <= 1.85e-50)) {
tmp = ((a + -0.5) * log(t)) - t;
} else {
tmp = log((z * (x + y))) - (t + (log(t) * 0.5));
}
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 <= (-1.45d-15)) .or. (.not. (a <= 1.85d-50))) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else
tmp = log((z * (x + y))) - (t + (log(t) * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e-15) || !(a <= 1.85e-50)) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else {
tmp = Math.log((z * (x + y))) - (t + (Math.log(t) * 0.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.45e-15) or not (a <= 1.85e-50): tmp = ((a + -0.5) * math.log(t)) - t else: tmp = math.log((z * (x + y))) - (t + (math.log(t) * 0.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.45e-15) || !(a <= 1.85e-50)) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); else tmp = Float64(log(Float64(z * Float64(x + y))) - Float64(t + Float64(log(t) * 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.45e-15) || ~((a <= 1.85e-50))) tmp = ((a + -0.5) * log(t)) - t; else tmp = log((z * (x + y))) - (t + (log(t) * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.45e-15], N[Not[LessEqual[a, 1.85e-50]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(t + N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-15} \lor \neg \left(a \leq 1.85 \cdot 10^{-50}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(z \cdot \left(x + y\right)\right) - \left(t + \log t \cdot 0.5\right)\\
\end{array}
\end{array}
if a < -1.45000000000000009e-15 or 1.85e-50 < a Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 74.3%
remove-double-neg74.3%
log-rec74.3%
mul-1-neg74.3%
+-commutative74.3%
associate--l+74.3%
mul-1-neg74.3%
log-rec74.3%
remove-double-neg74.3%
Simplified74.3%
Taylor expanded in t around inf 97.4%
neg-mul-197.4%
Simplified97.4%
if -1.45000000000000009e-15 < a < 1.85e-50Initial program 99.5%
associate-+l-99.5%
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 0 99.5%
log-prod82.2%
+-commutative82.2%
*-commutative82.2%
Simplified82.2%
Final simplification91.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25e-15) (not (<= a 1.65e-52))) (- (* (+ a -0.5) (log t)) t) (- (log (* y z)) (+ t (* (log t) 0.5)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-15) || !(a <= 1.65e-52)) {
tmp = ((a + -0.5) * log(t)) - t;
} else {
tmp = log((y * z)) - (t + (log(t) * 0.5));
}
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 <= (-1.25d-15)) .or. (.not. (a <= 1.65d-52))) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else
tmp = log((y * z)) - (t + (log(t) * 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-15) || !(a <= 1.65e-52)) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else {
tmp = Math.log((y * z)) - (t + (Math.log(t) * 0.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.25e-15) or not (a <= 1.65e-52): tmp = ((a + -0.5) * math.log(t)) - t else: tmp = math.log((y * z)) - (t + (math.log(t) * 0.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.25e-15) || !(a <= 1.65e-52)) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); else tmp = Float64(log(Float64(y * z)) - Float64(t + Float64(log(t) * 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.25e-15) || ~((a <= 1.65e-52))) tmp = ((a + -0.5) * log(t)) - t; else tmp = log((y * z)) - (t + (log(t) * 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.25e-15], N[Not[LessEqual[a, 1.65e-52]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(t + N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-15} \lor \neg \left(a \leq 1.65 \cdot 10^{-52}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot z\right) - \left(t + \log t \cdot 0.5\right)\\
\end{array}
\end{array}
if a < -1.25e-15 or 1.64999999999999998e-52 < a Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 74.3%
remove-double-neg74.3%
log-rec74.3%
mul-1-neg74.3%
+-commutative74.3%
associate--l+74.3%
mul-1-neg74.3%
log-rec74.3%
remove-double-neg74.3%
Simplified74.3%
Taylor expanded in t around inf 97.4%
neg-mul-197.4%
Simplified97.4%
if -1.25e-15 < a < 1.64999999999999998e-52Initial program 99.5%
associate-+l-99.5%
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 0 99.5%
log-prod82.2%
+-commutative82.2%
*-commutative82.2%
Simplified82.2%
Taylor expanded in y around inf 60.4%
mul-1-neg60.4%
log-rec60.4%
remove-double-neg60.4%
log-prod51.4%
Simplified51.4%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.6e-122) (not (<= a -1.5e-207))) (- (* (+ a -0.5) (log t)) t) (- (log (* y z)) (* (log t) 0.5))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.6e-122) || !(a <= -1.5e-207)) {
tmp = ((a + -0.5) * log(t)) - t;
} else {
tmp = log((y * z)) - (log(t) * 0.5);
}
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.6d-122)) .or. (.not. (a <= (-1.5d-207)))) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else
tmp = log((y * z)) - (log(t) * 0.5d0)
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.6e-122) || !(a <= -1.5e-207)) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else {
tmp = Math.log((y * z)) - (Math.log(t) * 0.5);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.6e-122) or not (a <= -1.5e-207): tmp = ((a + -0.5) * math.log(t)) - t else: tmp = math.log((y * z)) - (math.log(t) * 0.5) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.6e-122) || !(a <= -1.5e-207)) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); else tmp = Float64(log(Float64(y * z)) - Float64(log(t) * 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6.6e-122) || ~((a <= -1.5e-207))) tmp = ((a + -0.5) * log(t)) - t; else tmp = log((y * z)) - (log(t) * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.6e-122], N[Not[LessEqual[a, -1.5e-207]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{-122} \lor \neg \left(a \leq -1.5 \cdot 10^{-207}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot z\right) - \log t \cdot 0.5\\
\end{array}
\end{array}
if a < -6.59999999999999999e-122 or -1.5e-207 < a Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 70.3%
remove-double-neg70.3%
log-rec70.3%
mul-1-neg70.3%
+-commutative70.3%
associate--l+70.3%
mul-1-neg70.3%
log-rec70.3%
remove-double-neg70.3%
Simplified70.3%
Taylor expanded in t around inf 84.0%
neg-mul-184.0%
Simplified84.0%
if -6.59999999999999999e-122 < a < -1.5e-207Initial program 99.4%
associate-+l-99.5%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.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 0 99.5%
log-prod94.8%
+-commutative94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in y around inf 48.0%
mul-1-neg48.0%
log-rec48.0%
remove-double-neg48.0%
log-prod42.6%
Simplified42.6%
Taylor expanded in t around 0 29.2%
*-commutative29.2%
Simplified29.2%
Final simplification79.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.55e-17) (+ (log (* y z)) (* (log t) (- a 0.5))) (- (* (+ a -0.5) (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.55e-17) {
tmp = log((y * z)) + (log(t) * (a - 0.5));
} else {
tmp = ((a + -0.5) * log(t)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 1.55d-17) then
tmp = log((y * z)) + (log(t) * (a - 0.5d0))
else
tmp = ((a + (-0.5d0)) * log(t)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.55e-17) {
tmp = Math.log((y * z)) + (Math.log(t) * (a - 0.5));
} else {
tmp = ((a + -0.5) * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.55e-17: tmp = math.log((y * z)) + (math.log(t) * (a - 0.5)) else: tmp = ((a + -0.5) * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.55e-17) tmp = Float64(log(Float64(y * z)) + Float64(log(t) * Float64(a - 0.5))); else tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.55e-17) tmp = log((y * z)) + (log(t) * (a - 0.5)); else tmp = ((a + -0.5) * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.55e-17], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.55 \cdot 10^{-17}:\\
\;\;\;\;\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if t < 1.5499999999999999e-17Initial program 99.3%
associate-+l-99.3%
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 t around 0 99.3%
log-prod78.5%
+-commutative78.5%
Simplified78.5%
Taylor expanded in y around inf 61.3%
mul-1-neg23.2%
log-rec23.2%
remove-double-neg23.2%
log-prod20.7%
Simplified46.8%
if 1.5499999999999999e-17 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 74.9%
remove-double-neg74.9%
log-rec74.9%
mul-1-neg74.9%
+-commutative74.9%
associate--l+74.9%
mul-1-neg74.9%
log-rec74.9%
remove-double-neg74.9%
Simplified74.9%
Taylor expanded in t around inf 96.5%
neg-mul-196.5%
Simplified96.5%
Final simplification73.2%
(FPCore (x y z t a) :precision binary64 (if (<= t 4.2e+69) (* (log t) (- a 0.5)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 4.2e+69) {
tmp = log(t) * (a - 0.5);
} 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 <= 4.2d+69) then
tmp = log(t) * (a - 0.5d0)
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 <= 4.2e+69) {
tmp = Math.log(t) * (a - 0.5);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 4.2e+69: tmp = math.log(t) * (a - 0.5) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 4.2e+69) tmp = Float64(log(t) * Float64(a - 0.5)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 4.2e+69) tmp = log(t) * (a - 0.5); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 4.2e+69], N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.2 \cdot 10^{+69}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 4.2000000000000003e69Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 65.0%
remove-double-neg65.0%
log-rec65.0%
mul-1-neg65.0%
+-commutative65.0%
associate--l+65.0%
mul-1-neg65.0%
log-rec65.0%
remove-double-neg65.0%
Simplified65.0%
Taylor expanded in t around inf 66.7%
neg-mul-166.7%
Simplified66.7%
Taylor expanded in t around 0 60.9%
if 4.2000000000000003e69 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 74.2%
Taylor expanded in t around inf 82.4%
neg-mul-182.4%
Simplified82.4%
Final simplification69.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.000155) (* (log t) (- a 0.5)) (- (* a (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.000155) {
tmp = log(t) * (a - 0.5);
} else {
tmp = (a * log(t)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 0.000155d0) then
tmp = log(t) * (a - 0.5d0)
else
tmp = (a * log(t)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.000155) {
tmp = Math.log(t) * (a - 0.5);
} else {
tmp = (a * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.000155: tmp = math.log(t) * (a - 0.5) else: tmp = (a * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.000155) tmp = Float64(log(t) * Float64(a - 0.5)); else tmp = Float64(Float64(a * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.000155) tmp = log(t) * (a - 0.5); else tmp = (a * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.000155], N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.000155:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if t < 1.55e-4Initial program 99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 62.0%
remove-double-neg62.0%
log-rec62.0%
mul-1-neg62.0%
+-commutative62.0%
associate--l+62.0%
mul-1-neg62.0%
log-rec62.0%
remove-double-neg62.0%
Simplified62.0%
Taylor expanded in t around inf 60.8%
neg-mul-160.8%
Simplified60.8%
Taylor expanded in t around 0 60.8%
if 1.55e-4 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 74.7%
Taylor expanded in a around inf 97.1%
*-commutative97.1%
Simplified97.1%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 800000.0) (log (+ x y)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 800000.0) {
tmp = log((x + y));
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 800000.0d0) then
tmp = log((x + y))
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 800000.0) {
tmp = Math.log((x + y));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 800000.0: tmp = math.log((x + y)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 800000.0) tmp = log(Float64(x + y)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 800000.0) tmp = log((x + y)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 800000.0], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 800000:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 8e5Initial program 99.3%
associate-+l-99.3%
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 t around inf 8.3%
neg-mul-18.3%
Simplified8.3%
Taylor expanded in t around 0 8.4%
+-commutative8.4%
Simplified8.4%
if 8e5 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 75.7%
Taylor expanded in t around inf 72.9%
neg-mul-172.9%
Simplified72.9%
Final simplification39.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.4e+69) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.4e+69) {
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 <= 2.4d+69) 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 <= 2.4e+69) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.4e+69: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.4e+69) 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 <= 2.4e+69) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.4e+69], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.4 \cdot 10^{+69}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 2.4000000000000002e69Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 65.0%
remove-double-neg65.0%
log-rec65.0%
mul-1-neg65.0%
+-commutative65.0%
associate--l+65.0%
mul-1-neg65.0%
log-rec65.0%
remove-double-neg65.0%
Simplified65.0%
Taylor expanded in a around inf 56.9%
*-commutative56.9%
Simplified56.9%
if 2.4000000000000002e69 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 74.2%
Taylor expanded in t around inf 82.4%
neg-mul-182.4%
Simplified82.4%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (- (* (+ a -0.5) (log t)) t))
double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * log(t)) - t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((a + (-0.5d0)) * log(t)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * Math.log(t)) - t;
}
def code(x, y, z, t, a): return ((a + -0.5) * math.log(t)) - t
function code(x, y, z, t, a) return Float64(Float64(Float64(a + -0.5) * log(t)) - t) end
function tmp = code(x, y, z, t, a) tmp = ((a + -0.5) * log(t)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.5\right) \cdot \log t - t
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.5%
remove-double-neg68.5%
log-rec68.5%
mul-1-neg68.5%
+-commutative68.5%
associate--l+68.5%
mul-1-neg68.5%
log-rec68.5%
remove-double-neg68.5%
Simplified68.5%
Taylor expanded in t around inf 79.3%
neg-mul-179.3%
Simplified79.3%
Final simplification79.3%
(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%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.5%
Taylor expanded in t around inf 36.8%
neg-mul-136.8%
Simplified36.8%
Final simplification36.8%
(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 2024031
(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))))