
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (- (log (+ y x)) (* (log (/ 1.0 t)) (- a 0.5)))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (log((y + x)) - (log((1.0 / 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 + x)) - (log((1.0d0 / 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 + x)) - (Math.log((1.0 / t)) * (a - 0.5)));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (math.log((y + x)) - (math.log((1.0 / t)) * (a - 0.5)))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(log(Float64(y + x)) - Float64(log(Float64(1.0 / t)) * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (log((y + x)) - (log((1.0 / t)) * (a - 0.5))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision] - N[(N[Log[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\log \left(y + x\right) - \log \left(\frac{1}{t}\right) \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (log z) t)))
(if (<= (- a 0.5) -500000.0)
(+ t_1 (* a (log t)))
(if (<= (- a 0.5) -0.5)
(+ t_1 (+ (log (+ y x)) (* -0.5 (log t))))
(- t_1 (* (log (/ 1.0 t)) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(z) - t;
double tmp;
if ((a - 0.5) <= -500000.0) {
tmp = t_1 + (a * log(t));
} else if ((a - 0.5) <= -0.5) {
tmp = t_1 + (log((y + x)) + (-0.5 * log(t)));
} else {
tmp = t_1 - (log((1.0 / 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) :: t_1
real(8) :: tmp
t_1 = log(z) - t
if ((a - 0.5d0) <= (-500000.0d0)) then
tmp = t_1 + (a * log(t))
else if ((a - 0.5d0) <= (-0.5d0)) then
tmp = t_1 + (log((y + x)) + ((-0.5d0) * log(t)))
else
tmp = t_1 - (log((1.0d0 / t)) * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log(z) - t;
double tmp;
if ((a - 0.5) <= -500000.0) {
tmp = t_1 + (a * Math.log(t));
} else if ((a - 0.5) <= -0.5) {
tmp = t_1 + (Math.log((y + x)) + (-0.5 * Math.log(t)));
} else {
tmp = t_1 - (Math.log((1.0 / t)) * a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(z) - t tmp = 0 if (a - 0.5) <= -500000.0: tmp = t_1 + (a * math.log(t)) elif (a - 0.5) <= -0.5: tmp = t_1 + (math.log((y + x)) + (-0.5 * math.log(t))) else: tmp = t_1 - (math.log((1.0 / t)) * a) return tmp
function code(x, y, z, t, a) t_1 = Float64(log(z) - t) tmp = 0.0 if (Float64(a - 0.5) <= -500000.0) tmp = Float64(t_1 + Float64(a * log(t))); elseif (Float64(a - 0.5) <= -0.5) tmp = Float64(t_1 + Float64(log(Float64(y + x)) + Float64(-0.5 * log(t)))); else tmp = Float64(t_1 - Float64(log(Float64(1.0 / t)) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(z) - t; tmp = 0.0; if ((a - 0.5) <= -500000.0) tmp = t_1 + (a * log(t)); elseif ((a - 0.5) <= -0.5) tmp = t_1 + (log((y + x)) + (-0.5 * log(t))); else tmp = t_1 - (log((1.0 / t)) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[N[(a - 0.5), $MachinePrecision], -500000.0], N[(t$95$1 + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.5], N[(t$95$1 + N[(N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision] + N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(N[Log[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log z - t\\
\mathbf{if}\;a - 0.5 \leq -500000:\\
\;\;\;\;t_1 + a \cdot \log t\\
\mathbf{elif}\;a - 0.5 \leq -0.5:\\
\;\;\;\;t_1 + \left(\log \left(y + x\right) + -0.5 \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 - \log \left(\frac{1}{t}\right) \cdot a\\
\end{array}
\end{array}
if (-.f64 a 1/2) < -5e5Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 98.5%
mul-1-neg98.5%
log-rec98.5%
distribute-rgt-neg-in98.5%
remove-double-neg98.5%
Simplified98.5%
if -5e5 < (-.f64 a 1/2) < -0.5Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 98.1%
+-commutative98.1%
Simplified98.1%
if -0.5 < (-.f64 a 1/2) Initial program 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in a around inf 99.1%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (log z) t)))
(if (<= (- a 0.5) -500000.0)
(+ t_1 (* a (log t)))
(if (<= (- a 0.5) -0.5)
(- (+ (log z) (+ (log y) (* -0.5 (log t)))) t)
(- t_1 (* (log (/ 1.0 t)) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log(z) - t;
double tmp;
if ((a - 0.5) <= -500000.0) {
tmp = t_1 + (a * log(t));
} else if ((a - 0.5) <= -0.5) {
tmp = (log(z) + (log(y) + (-0.5 * log(t)))) - t;
} else {
tmp = t_1 - (log((1.0 / 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) :: t_1
real(8) :: tmp
t_1 = log(z) - t
if ((a - 0.5d0) <= (-500000.0d0)) then
tmp = t_1 + (a * log(t))
else if ((a - 0.5d0) <= (-0.5d0)) then
tmp = (log(z) + (log(y) + ((-0.5d0) * log(t)))) - t
else
tmp = t_1 - (log((1.0d0 / t)) * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log(z) - t;
double tmp;
if ((a - 0.5) <= -500000.0) {
tmp = t_1 + (a * Math.log(t));
} else if ((a - 0.5) <= -0.5) {
tmp = (Math.log(z) + (Math.log(y) + (-0.5 * Math.log(t)))) - t;
} else {
tmp = t_1 - (Math.log((1.0 / t)) * a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log(z) - t tmp = 0 if (a - 0.5) <= -500000.0: tmp = t_1 + (a * math.log(t)) elif (a - 0.5) <= -0.5: tmp = (math.log(z) + (math.log(y) + (-0.5 * math.log(t)))) - t else: tmp = t_1 - (math.log((1.0 / t)) * a) return tmp
function code(x, y, z, t, a) t_1 = Float64(log(z) - t) tmp = 0.0 if (Float64(a - 0.5) <= -500000.0) tmp = Float64(t_1 + Float64(a * log(t))); elseif (Float64(a - 0.5) <= -0.5) tmp = Float64(Float64(log(z) + Float64(log(y) + Float64(-0.5 * log(t)))) - t); else tmp = Float64(t_1 - Float64(log(Float64(1.0 / t)) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log(z) - t; tmp = 0.0; if ((a - 0.5) <= -500000.0) tmp = t_1 + (a * log(t)); elseif ((a - 0.5) <= -0.5) tmp = (log(z) + (log(y) + (-0.5 * log(t)))) - t; else tmp = t_1 - (log((1.0 / t)) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[N[(a - 0.5), $MachinePrecision], -500000.0], N[(t$95$1 + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.5], N[(N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(t$95$1 - N[(N[Log[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log z - t\\
\mathbf{if}\;a - 0.5 \leq -500000:\\
\;\;\;\;t_1 + a \cdot \log t\\
\mathbf{elif}\;a - 0.5 \leq -0.5:\\
\;\;\;\;\left(\log z + \left(\log y + -0.5 \cdot \log t\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t_1 - \log \left(\frac{1}{t}\right) \cdot a\\
\end{array}
\end{array}
if (-.f64 a 1/2) < -5e5Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 98.5%
mul-1-neg98.5%
log-rec98.5%
distribute-rgt-neg-in98.5%
remove-double-neg98.5%
Simplified98.5%
if -5e5 < (-.f64 a 1/2) < -0.5Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 61.8%
Taylor expanded in a around 0 60.5%
if -0.5 < (-.f64 a 1/2) Initial program 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in a around inf 99.1%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (+ (+ (- (log z) t) (log (+ y x))) (* (+ a -0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log(z) - t) + log((y + x))) + ((a + -0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log(z) - t) + log((y + x))) + ((a + (-0.5d0)) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log(z) - t) + Math.log((y + x))) + ((a + -0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log(z) - t) + math.log((y + x))) + ((a + -0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(z) - t) + log(Float64(y + x))) + Float64(Float64(a + -0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log(z) - t) + log((y + x))) + ((a + -0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log z - t\right) + \log \left(y + x\right)\right) + \left(a + -0.5\right) \cdot \log t
\end{array}
Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (+ (* (- a 0.5) (log t)) (log y))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (((a - 0.5) * log(t)) + log(y));
}
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) + (((a - 0.5d0) * log(t)) + log(y))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + (((a - 0.5) * Math.log(t)) + Math.log(y));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (((a - 0.5) * math.log(t)) + math.log(y))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(Float64(Float64(a - 0.5) * log(t)) + log(y))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (((a - 0.5) * log(t)) + log(y)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\left(a - 0.5\right) \cdot \log t + \log y\right)
\end{array}
Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 72.5%
Final simplification72.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.5e-9) (- (log (* z (+ y x))) (- t (* (+ a -0.5) (log t)))) (- (- (log z) t) (* (log (/ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.5e-9) {
tmp = log((z * (y + x))) - (t - ((a + -0.5) * log(t)));
} else {
tmp = (log(z) - t) - (log((1.0 / 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 <= 1.5d-9) then
tmp = log((z * (y + x))) - (t - ((a + (-0.5d0)) * log(t)))
else
tmp = (log(z) - t) - (log((1.0d0 / 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 <= 1.5e-9) {
tmp = Math.log((z * (y + x))) - (t - ((a + -0.5) * Math.log(t)));
} else {
tmp = (Math.log(z) - t) - (Math.log((1.0 / t)) * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.5e-9: tmp = math.log((z * (y + x))) - (t - ((a + -0.5) * math.log(t))) else: tmp = (math.log(z) - t) - (math.log((1.0 / t)) * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.5e-9) tmp = Float64(log(Float64(z * Float64(y + x))) - Float64(t - Float64(Float64(a + -0.5) * log(t)))); else tmp = Float64(Float64(log(z) - t) - Float64(log(Float64(1.0 / t)) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.5e-9) tmp = log((z * (y + x))) - (t - ((a + -0.5) * log(t))); else tmp = (log(z) - t) - (log((1.0 / t)) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.5e-9], N[(N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(t - N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] - N[(N[Log[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;\log \left(z \cdot \left(y + x\right)\right) - \left(t - \left(a + -0.5\right) \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) - \log \left(\frac{1}{t}\right) \cdot a\\
\end{array}
\end{array}
if t < 1.49999999999999999e-9Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
metadata-eval99.6%
sub-neg99.6%
associate-+r-99.6%
associate-+l-99.6%
+-commutative99.6%
sum-log79.7%
sub-neg79.7%
metadata-eval79.7%
Applied egg-rr79.7%
if 1.49999999999999999e-9 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 98.5%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 9.5e-10) (+ (* (+ a -0.5) (log t)) (log (* z (+ y x)))) (+ (- (log z) t) (* a (log t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9.5e-10) {
tmp = ((a + -0.5) * log(t)) + log((z * (y + x)));
} else {
tmp = (log(z) - t) + (a * log(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 <= 9.5d-10) then
tmp = ((a + (-0.5d0)) * log(t)) + log((z * (y + x)))
else
tmp = (log(z) - t) + (a * log(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 <= 9.5e-10) {
tmp = ((a + -0.5) * Math.log(t)) + Math.log((z * (y + x)));
} else {
tmp = (Math.log(z) - t) + (a * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9.5e-10: tmp = ((a + -0.5) * math.log(t)) + math.log((z * (y + x))) else: tmp = (math.log(z) - t) + (a * math.log(t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9.5e-10) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) + log(Float64(z * Float64(y + x)))); else tmp = Float64(Float64(log(z) - t) + Float64(a * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 9.5e-10) tmp = ((a + -0.5) * log(t)) + log((z * (y + x))); else tmp = (log(z) - t) + (a * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9.5e-10], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \cdot 10^{-10}:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t + \log \left(z \cdot \left(y + x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + a \cdot \log t\\
\end{array}
\end{array}
if t < 9.50000000000000028e-10Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around 0 99.3%
+-commutative99.3%
log-prod79.5%
+-commutative79.5%
Simplified79.5%
if 9.50000000000000028e-10 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 98.5%
mul-1-neg98.5%
log-rec98.5%
distribute-rgt-neg-in98.5%
remove-double-neg98.5%
Simplified98.5%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.1e-9) (+ (* (+ a -0.5) (log t)) (log (* z (+ y x)))) (- (- (log z) t) (* (log (/ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.1e-9) {
tmp = ((a + -0.5) * log(t)) + log((z * (y + x)));
} else {
tmp = (log(z) - t) - (log((1.0 / 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 <= 1.1d-9) then
tmp = ((a + (-0.5d0)) * log(t)) + log((z * (y + x)))
else
tmp = (log(z) - t) - (log((1.0d0 / 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 <= 1.1e-9) {
tmp = ((a + -0.5) * Math.log(t)) + Math.log((z * (y + x)));
} else {
tmp = (Math.log(z) - t) - (Math.log((1.0 / t)) * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.1e-9: tmp = ((a + -0.5) * math.log(t)) + math.log((z * (y + x))) else: tmp = (math.log(z) - t) - (math.log((1.0 / t)) * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.1e-9) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) + log(Float64(z * Float64(y + x)))); else tmp = Float64(Float64(log(z) - t) - Float64(log(Float64(1.0 / t)) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.1e-9) tmp = ((a + -0.5) * log(t)) + log((z * (y + x))); else tmp = (log(z) - t) - (log((1.0 / t)) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.1e-9], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] - N[(N[Log[N[(1.0 / t), $MachinePrecision]], $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{-9}:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t + \log \left(z \cdot \left(y + x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) - \log \left(\frac{1}{t}\right) \cdot a\\
\end{array}
\end{array}
if t < 1.0999999999999999e-9Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around 0 99.3%
+-commutative99.3%
log-prod79.5%
+-commutative79.5%
Simplified79.5%
if 1.0999999999999999e-9 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 98.5%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.1e-9) (+ (* (- a 0.5) (log t)) (log (* z y))) (+ (- (log z) t) (* a (log t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.1e-9) {
tmp = ((a - 0.5) * log(t)) + log((z * y));
} else {
tmp = (log(z) - t) + (a * log(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.1d-9) then
tmp = ((a - 0.5d0) * log(t)) + log((z * y))
else
tmp = (log(z) - t) + (a * log(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.1e-9) {
tmp = ((a - 0.5) * Math.log(t)) + Math.log((z * y));
} else {
tmp = (Math.log(z) - t) + (a * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.1e-9: tmp = ((a - 0.5) * math.log(t)) + math.log((z * y)) else: tmp = (math.log(z) - t) + (a * math.log(t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.1e-9) tmp = Float64(Float64(Float64(a - 0.5) * log(t)) + log(Float64(z * y))); else tmp = Float64(Float64(log(z) - t) + Float64(a * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.1e-9) tmp = ((a - 0.5) * log(t)) + log((z * y)); else tmp = (log(z) - t) + (a * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.1e-9], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.1 \cdot 10^{-9}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \log t + \log \left(z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + a \cdot \log t\\
\end{array}
\end{array}
if t < 1.0999999999999999e-9Initial program 99.6%
add-exp-log64.5%
+-commutative64.5%
sum-log49.8%
Applied egg-rr49.8%
Taylor expanded in t around 0 79.5%
Taylor expanded in y around inf 51.6%
*-commutative51.6%
Simplified51.6%
if 1.0999999999999999e-9 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in a around inf 98.5%
mul-1-neg98.5%
log-rec98.5%
distribute-rgt-neg-in98.5%
remove-double-neg98.5%
Simplified98.5%
Final simplification72.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 9.2e+58) (+ (log z) (* a (log t))) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9.2e+58) {
tmp = log(z) + (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 <= 9.2d+58) then
tmp = log(z) + (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 <= 9.2e+58) {
tmp = Math.log(z) + (a * Math.log(t));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9.2e+58: tmp = math.log(z) + (a * math.log(t)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9.2e+58) tmp = Float64(log(z) + 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 <= 9.2e+58) tmp = log(z) + (a * log(t)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9.2e+58], N[(N[Log[z], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.2 \cdot 10^{+58}:\\
\;\;\;\;\log z + a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 9.2000000000000001e58Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 99.6%
Taylor expanded in a around inf 62.7%
mul-1-neg62.7%
log-rec62.7%
distribute-rgt-neg-in62.7%
remove-double-neg62.7%
Simplified62.7%
Taylor expanded in t around 0 58.8%
if 9.2000000000000001e58 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 100.0%
Taylor expanded in t around inf 86.1%
neg-mul-186.1%
Simplified86.1%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 9.2e+58) (+ (log y) (* a (log t))) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9.2e+58) {
tmp = log(y) + (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 <= 9.2d+58) then
tmp = log(y) + (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 <= 9.2e+58) {
tmp = Math.log(y) + (a * Math.log(t));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9.2e+58: tmp = math.log(y) + (a * math.log(t)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9.2e+58) tmp = Float64(log(y) + 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 <= 9.2e+58) tmp = log(y) + (a * log(t)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9.2e+58], N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.2 \cdot 10^{+58}:\\
\;\;\;\;\log y + a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 9.2000000000000001e58Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.5%
remove-double-neg99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in a around inf 59.9%
*-commutative59.9%
Simplified59.9%
Taylor expanded in x around 0 49.1%
if 9.2000000000000001e58 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 100.0%
Taylor expanded in t around inf 86.1%
neg-mul-186.1%
Simplified86.1%
Final simplification61.9%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (* a (log t))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (a * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(z) - t) + (a * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + (a * Math.log(t));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (a * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(a * log(t))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (a * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + a \cdot \log t
\end{array}
Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in a around inf 75.7%
mul-1-neg75.7%
log-rec75.7%
distribute-rgt-neg-in75.7%
remove-double-neg75.7%
Simplified75.7%
Final simplification75.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 720.0) (log (+ y x)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 720.0) {
tmp = log((y + x));
} 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 <= 720.0d0) then
tmp = log((y + x))
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 <= 720.0) {
tmp = Math.log((y + x));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 720.0: tmp = math.log((y + x)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 720.0) tmp = log(Float64(y + x)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 720.0) tmp = log((y + x)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 720.0], N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 720:\\
\;\;\;\;\log \left(y + x\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 720Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
remove-double-neg99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 8.9%
neg-mul-18.9%
Simplified8.9%
Taylor expanded in t around 0 8.9%
if 720 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 77.1%
neg-mul-177.1%
Simplified77.1%
Final simplification37.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.55e+58) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.55e+58) {
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 <= 1.55d+58) 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 <= 1.55e+58) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.55e+58: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.55e+58) 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 <= 1.55e+58) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.55e+58], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.55 \cdot 10^{+58}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.55e58Initial program 99.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 99.6%
Taylor expanded in a around inf 62.7%
mul-1-neg62.7%
log-rec62.7%
distribute-rgt-neg-in62.7%
remove-double-neg62.7%
Simplified62.7%
Taylor expanded in a around inf 55.1%
if 1.55e58 < t Initial program 99.9%
associate--l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 100.0%
Taylor expanded in t around inf 86.1%
neg-mul-186.1%
Simplified86.1%
Final simplification65.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.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in t around inf 34.1%
neg-mul-134.1%
Simplified34.1%
Final simplification34.1%
(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 2023200
(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))))