
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (log (+ 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 (+ x y)) (log z))))
(if (or (<= t_1 -800.0) (not (<= t_1 610.0)))
(+ (- (log z) t) (* (log t) a))
(+ (log (* (+ x y) z)) (- (* (log t) (+ a -0.5)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double tmp;
if ((t_1 <= -800.0) || !(t_1 <= 610.0)) {
tmp = (log(z) - t) + (log(t) * a);
} else {
tmp = log(((x + y) * z)) + ((log(t) * (a + -0.5)) - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = log((x + y)) + log(z)
if ((t_1 <= (-800.0d0)) .or. (.not. (t_1 <= 610.0d0))) then
tmp = (log(z) - t) + (log(t) * a)
else
tmp = log(((x + y) * z)) + ((log(t) * (a + (-0.5d0))) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log((x + y)) + Math.log(z);
double tmp;
if ((t_1 <= -800.0) || !(t_1 <= 610.0)) {
tmp = (Math.log(z) - t) + (Math.log(t) * a);
} else {
tmp = Math.log(((x + y) * z)) + ((Math.log(t) * (a + -0.5)) - t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) tmp = 0 if (t_1 <= -800.0) or not (t_1 <= 610.0): tmp = (math.log(z) - t) + (math.log(t) * a) else: tmp = math.log(((x + y) * z)) + ((math.log(t) * (a + -0.5)) - t) return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) tmp = 0.0 if ((t_1 <= -800.0) || !(t_1 <= 610.0)) tmp = Float64(Float64(log(z) - t) + Float64(log(t) * a)); else tmp = Float64(log(Float64(Float64(x + y) * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); tmp = 0.0; if ((t_1 <= -800.0) || ~((t_1 <= 610.0))) tmp = (log(z) - t) + (log(t) * a); else tmp = log(((x + y) * z)) + ((log(t) * (a + -0.5)) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -800.0], N[Not[LessEqual[t$95$1, 610.0]], $MachinePrecision]], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -800 \lor \neg \left(t\_1 \leq 610\right):\\
\;\;\;\;\left(\log z - t\right) + \log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\log \left(\left(x + y\right) \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -800 or 610 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 75.4%
Taylor expanded in a around inf 85.4%
*-commutative85.4%
Simplified85.4%
if -800 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 610Initial program 99.5%
remove-double-neg99.5%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
metadata-eval99.5%
sub-neg99.5%
associate-+r-99.5%
associate-+l-99.5%
+-commutative99.5%
sum-log99.7%
sub-neg99.7%
metadata-eval99.7%
*-commutative99.7%
Applied egg-rr99.7%
Final simplification95.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -1e+18) (not (<= (- a 0.5) -0.4))) (- (* (log t) a) t) (- (+ (log y) (+ (log z) (* (log t) -0.5))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -1e+18) || !((a - 0.5) <= -0.4)) {
tmp = (log(t) * a) - t;
} else {
tmp = (log(y) + (log(z) + (log(t) * -0.5))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (((a - 0.5d0) <= (-1d+18)) .or. (.not. ((a - 0.5d0) <= (-0.4d0)))) then
tmp = (log(t) * a) - t
else
tmp = (log(y) + (log(z) + (log(t) * (-0.5d0)))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -1e+18) || !((a - 0.5) <= -0.4)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = (Math.log(y) + (Math.log(z) + (Math.log(t) * -0.5))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a - 0.5) <= -1e+18) or not ((a - 0.5) <= -0.4): tmp = (math.log(t) * a) - t else: tmp = (math.log(y) + (math.log(z) + (math.log(t) * -0.5))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -1e+18) || !(Float64(a - 0.5) <= -0.4)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(log(t) * -0.5))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a - 0.5) <= -1e+18) || ~(((a - 0.5) <= -0.4))) tmp = (log(t) * a) - t; else tmp = (log(y) + (log(z) + (log(t) * -0.5))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -1e+18], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -1 \cdot 10^{+18} \lor \neg \left(a - 0.5 \leq -0.4\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \left(\log z + \log t \cdot -0.5\right)\right) - t\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -1e18 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 80.9%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
Simplified99.7%
if -1e18 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.5%
remove-double-neg99.5%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 60.3%
Taylor expanded in a around 0 60.3%
*-commutative60.3%
Simplified60.3%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -1e+18) (not (<= (- a 0.5) -0.4))) (- (* (log t) a) t) (+ (- (log z) t) (+ (log y) (* (log t) -0.5)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -1e+18) || !((a - 0.5) <= -0.4)) {
tmp = (log(t) * a) - t;
} else {
tmp = (log(z) - t) + (log(y) + (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 - 0.5d0) <= (-1d+18)) .or. (.not. ((a - 0.5d0) <= (-0.4d0)))) then
tmp = (log(t) * a) - t
else
tmp = (log(z) - t) + (log(y) + (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 - 0.5) <= -1e+18) || !((a - 0.5) <= -0.4)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = (Math.log(z) - t) + (Math.log(y) + (Math.log(t) * -0.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a - 0.5) <= -1e+18) or not ((a - 0.5) <= -0.4): tmp = (math.log(t) * a) - t else: tmp = (math.log(z) - t) + (math.log(y) + (math.log(t) * -0.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -1e+18) || !(Float64(a - 0.5) <= -0.4)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(Float64(log(z) - t) + Float64(log(y) + Float64(log(t) * -0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a - 0.5) <= -1e+18) || ~(((a - 0.5) <= -0.4))) tmp = (log(t) * a) - t; else tmp = (log(z) - t) + (log(y) + (log(t) * -0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -1e+18], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -1 \cdot 10^{+18} \lor \neg \left(a - 0.5 \leq -0.4\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + \left(\log y + \log t \cdot -0.5\right)\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -1e18 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 80.9%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
Simplified99.7%
if -1e18 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.5%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 60.3%
Taylor expanded in a around 0 60.3%
*-commutative60.3%
Simplified60.3%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -48000000000.0) (not (<= a 1.1e-17))) (- (* (log t) a) t) (- (+ (log y) (log (* z (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -48000000000.0) || !(a <= 1.1e-17)) {
tmp = (log(t) * a) - t;
} else {
tmp = (log(y) + log((z * pow(t, -0.5)))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-48000000000.0d0)) .or. (.not. (a <= 1.1d-17))) then
tmp = (log(t) * a) - t
else
tmp = (log(y) + log((z * (t ** (-0.5d0))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -48000000000.0) || !(a <= 1.1e-17)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = (Math.log(y) + Math.log((z * Math.pow(t, -0.5)))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -48000000000.0) or not (a <= 1.1e-17): tmp = (math.log(t) * a) - t else: tmp = (math.log(y) + math.log((z * math.pow(t, -0.5)))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -48000000000.0) || !(a <= 1.1e-17)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(Float64(log(y) + log(Float64(z * (t ^ -0.5)))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -48000000000.0) || ~((a <= 1.1e-17))) tmp = (log(t) * a) - t; else tmp = (log(y) + log((z * (t ^ -0.5)))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -48000000000.0], N[Not[LessEqual[a, 1.1e-17]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[Log[N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -48000000000 \lor \neg \left(a \leq 1.1 \cdot 10^{-17}\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \log \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -4.8e10 or 1.1e-17 < a Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 80.1%
Taylor expanded in a around inf 98.9%
*-commutative98.9%
Simplified98.9%
if -4.8e10 < a < 1.1e-17Initial program 99.5%
remove-double-neg99.5%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 60.3%
Taylor expanded in a around 0 60.3%
*-commutative60.3%
Simplified60.3%
+-commutative60.3%
*-un-lft-identity60.3%
fma-define60.3%
add-log-exp60.3%
sum-log55.8%
exp-to-pow55.8%
Applied egg-rr55.8%
fma-undefine55.8%
*-lft-identity55.8%
Simplified55.8%
Final simplification77.2%
(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 (+ 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(log(Float64(x + y)) + Float64(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[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \log t \cdot \left(a + -0.5\right)
\end{array}
Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
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%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 70.1%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (+ (log y) (* (log t) (- a 0.5)))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (log(y) + (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(z) - t) + (log(y) + (log(t) * (a - 0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + (Math.log(y) + (Math.log(t) * (a - 0.5)));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (math.log(y) + (math.log(t) * (a - 0.5)))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(log(y) + Float64(log(t) * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (log(y) + (log(t) * (a - 0.5))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\log y + \log t \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 70.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-23) (not (<= a 1.7e-19))) (- (* (log t) a) t) (- (log (* y (* z (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-23) || !(a <= 1.7e-19)) {
tmp = (log(t) * a) - t;
} else {
tmp = log((y * (z * pow(t, -0.5)))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.5d-23)) .or. (.not. (a <= 1.7d-19))) then
tmp = (log(t) * a) - t
else
tmp = log((y * (z * (t ** (-0.5d0))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-23) || !(a <= 1.7e-19)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = Math.log((y * (z * Math.pow(t, -0.5)))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-23) or not (a <= 1.7e-19): tmp = (math.log(t) * a) - t else: tmp = math.log((y * (z * math.pow(t, -0.5)))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-23) || !(a <= 1.7e-19)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(log(Float64(y * Float64(z * (t ^ -0.5)))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e-23) || ~((a <= 1.7e-19))) tmp = (log(t) * a) - t; else tmp = log((y * (z * (t ^ -0.5)))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-23], N[Not[LessEqual[a, 1.7e-19]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-23} \lor \neg \left(a \leq 1.7 \cdot 10^{-19}\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -5.5000000000000001e-23 or 1.7000000000000001e-19 < a Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 79.8%
Taylor expanded in a around inf 98.9%
*-commutative98.9%
Simplified98.9%
if -5.5000000000000001e-23 < a < 1.7000000000000001e-19Initial program 99.5%
remove-double-neg99.5%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 60.1%
Taylor expanded in a around 0 60.1%
*-commutative60.1%
Simplified60.1%
*-un-lft-identity60.1%
*-commutative60.1%
add-log-exp55.5%
sum-log43.9%
exp-sum43.9%
add-exp-log44.0%
exp-to-pow44.0%
Applied egg-rr44.0%
*-rgt-identity44.0%
Simplified44.0%
Final simplification71.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.65e-38) (+ (log (* (+ x y) z)) (* (log t) (+ a -0.5))) (+ (- (log z) t) (* (log t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.65e-38) {
tmp = log(((x + y) * z)) + (log(t) * (a + -0.5));
} else {
tmp = (log(z) - t) + (log(t) * a);
}
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.65d-38) then
tmp = log(((x + y) * z)) + (log(t) * (a + (-0.5d0)))
else
tmp = (log(z) - t) + (log(t) * a)
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.65e-38) {
tmp = Math.log(((x + y) * z)) + (Math.log(t) * (a + -0.5));
} else {
tmp = (Math.log(z) - t) + (Math.log(t) * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.65e-38: tmp = math.log(((x + y) * z)) + (math.log(t) * (a + -0.5)) else: tmp = (math.log(z) - t) + (math.log(t) * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.65e-38) tmp = Float64(log(Float64(Float64(x + y) * z)) + Float64(log(t) * Float64(a + -0.5))); else tmp = Float64(Float64(log(z) - t) + Float64(log(t) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.65e-38) tmp = log(((x + y) * z)) + (log(t) * (a + -0.5)); else tmp = (log(z) - t) + (log(t) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.65e-38], N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.65 \cdot 10^{-38}:\\
\;\;\;\;\log \left(\left(x + y\right) \cdot z\right) + \log t \cdot \left(a + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + \log t \cdot a\\
\end{array}
\end{array}
if t < 2.65000000000000008e-38Initial program 99.2%
remove-double-neg99.2%
associate--l+99.2%
remove-double-neg99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
metadata-eval99.2%
sub-neg99.2%
associate-+r-99.2%
associate-+l-99.2%
+-commutative99.2%
sum-log82.7%
sub-neg82.7%
metadata-eval82.7%
*-commutative82.7%
Applied egg-rr82.7%
Taylor expanded in t around 0 82.7%
+-commutative82.7%
+-commutative82.7%
sub-neg82.7%
metadata-eval82.7%
Simplified82.7%
if 2.65000000000000008e-38 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 76.0%
Taylor expanded in a around inf 96.5%
*-commutative96.5%
Simplified96.5%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.6e+15) (not (<= a 1.8))) (- (* (log t) a) t) (- (fabs (log y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.6e+15) || !(a <= 1.8)) {
tmp = (log(t) * a) - t;
} else {
tmp = fabs(log(y)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-8.6d+15)) .or. (.not. (a <= 1.8d0))) then
tmp = (log(t) * a) - t
else
tmp = abs(log(y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.6e+15) || !(a <= 1.8)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = Math.abs(Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.6e+15) or not (a <= 1.8): tmp = (math.log(t) * a) - t else: tmp = math.fabs(math.log(y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.6e+15) || !(a <= 1.8)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(abs(log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.6e+15) || ~((a <= 1.8))) tmp = (log(t) * a) - t; else tmp = abs(log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.6e+15], N[Not[LessEqual[a, 1.8]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[Abs[N[Log[y], $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+15} \lor \neg \left(a \leq 1.8\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\left|\log y\right| - t\\
\end{array}
\end{array}
if a < -8.6e15 or 1.80000000000000004 < a Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 80.9%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
Simplified99.7%
if -8.6e15 < a < 1.80000000000000004Initial program 99.5%
associate-+l-99.5%
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 59.4%
neg-mul-159.4%
Simplified59.4%
add-sqr-sqrt44.7%
sqrt-unprod59.5%
pow259.5%
Applied egg-rr59.5%
unpow259.5%
rem-sqrt-square59.5%
+-commutative59.5%
Simplified59.5%
Taylor expanded in y around inf 45.9%
mul-1-neg45.9%
log-rec45.9%
remove-double-neg45.9%
Simplified45.9%
Final simplification71.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (log t) a))) (if (<= t 245.0) (+ (log (+ x y)) t_1) (- t_1 t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(t) * a;
double tmp;
if (t <= 245.0) {
tmp = log((x + y)) + t_1;
} else {
tmp = 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
if (t <= 245.0d0) then
tmp = log((x + y)) + t_1
else
tmp = 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;
double tmp;
if (t <= 245.0) {
tmp = Math.log((x + y)) + t_1;
} else {
tmp = t_1 - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(t) * a tmp = 0 if t <= 245.0: tmp = math.log((x + y)) + t_1 else: tmp = t_1 - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(t) * a) tmp = 0.0 if (t <= 245.0) tmp = Float64(log(Float64(x + y)) + t_1); else tmp = Float64(t_1 - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(t) * a; tmp = 0.0; if (t <= 245.0) tmp = log((x + y)) + t_1; else tmp = t_1 - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, 245.0], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot a\\
\mathbf{if}\;t \leq 245:\\
\;\;\;\;\log \left(x + y\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\\
\end{array}
\end{array}
if t < 245Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 56.9%
*-commutative56.9%
Simplified56.9%
if 245 < t Initial program 99.9%
remove-double-neg99.9%
associate--l+99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 77.8%
Taylor expanded in a around inf 99.3%
*-commutative99.3%
Simplified99.3%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (* (log t) a)))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (log(t) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(z) - t) + (log(t) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + (Math.log(t) * a);
}
def code(x, y, z, t, a): return (math.log(z) - t) + (math.log(t) * a)
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(log(t) * a)) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (log(t) * a); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \log t \cdot a
\end{array}
Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 70.1%
Taylor expanded in a around inf 77.3%
*-commutative77.3%
Simplified77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.6e+15) (not (<= a 1.05))) (- (* (log t) a) t) (- (log y) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.6e+15) || !(a <= 1.05)) {
tmp = (log(t) * a) - t;
} else {
tmp = log(y) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-8.6d+15)) .or. (.not. (a <= 1.05d0))) then
tmp = (log(t) * a) - t
else
tmp = log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.6e+15) || !(a <= 1.05)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.6e+15) or not (a <= 1.05): tmp = (math.log(t) * a) - t else: tmp = math.log(y) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.6e+15) || !(a <= 1.05)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(log(y) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.6e+15) || ~((a <= 1.05))) tmp = (log(t) * a) - t; else tmp = log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.6e+15], N[Not[LessEqual[a, 1.05]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+15} \lor \neg \left(a \leq 1.05\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\log y - t\\
\end{array}
\end{array}
if a < -8.6e15 or 1.05000000000000004 < a Initial program 99.7%
remove-double-neg99.7%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 80.9%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
Simplified99.7%
if -8.6e15 < a < 1.05000000000000004Initial program 99.5%
associate-+l-99.5%
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 59.4%
neg-mul-159.4%
Simplified59.4%
Taylor expanded in x around 0 44.4%
Final simplification70.7%
(FPCore (x y z t a) :precision binary64 (- (log y) t))
double code(double x, double y, double z, double t, double a) {
return 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 = log(y) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log(y) - t;
}
def code(x, y, z, t, a): return math.log(y) - t
function code(x, y, z, t, a) return Float64(log(y) - t) end
function tmp = code(x, y, z, t, a) tmp = log(y) - t; end
code[x_, y_, z_, t_, a_] := N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log y - 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 41.0%
neg-mul-141.0%
Simplified41.0%
Taylor expanded in x around 0 30.7%
Final simplification30.7%
(FPCore (x y z t a) :precision binary64 (- t))
double code(double x, double y, double z, double t, double a) {
return -t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -t
end function
public static double code(double x, double y, double z, double t, double a) {
return -t;
}
def code(x, y, z, t, a): return -t
function code(x, y, z, t, a) return Float64(-t) end
function tmp = code(x, y, z, t, a) tmp = -t; end
code[x_, y_, z_, t_, a_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-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 91.2%
mul-1-neg91.2%
unsub-neg91.2%
associate-/l*91.2%
log-rec91.2%
Simplified91.2%
Taylor expanded in t around inf 37.5%
neg-mul-137.5%
Simplified37.5%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = log((x + y)) + ((log(z) - t) + ((a - 0.5d0) * log(t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log((x + y)) + ((Math.log(z) - t) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return math.log((x + y)) + ((math.log(z) - t) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(Float64(log(z) - t) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)
\end{array}
herbie shell --seed 2024118
(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))))