
(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 (let* ((t_1 (- (* (+ a -0.5) (log t)) t))) (if (<= (log z) 310.0) (+ t_1 (log (* (+ x y) z))) t_1)))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((a + -0.5) * log(t)) - t;
double tmp;
if (log(z) <= 310.0) {
tmp = t_1 + log(((x + y) * z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((a + (-0.5d0)) * log(t)) - t
if (log(z) <= 310.0d0) then
tmp = t_1 + log(((x + y) * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((a + -0.5) * Math.log(t)) - t;
double tmp;
if (Math.log(z) <= 310.0) {
tmp = t_1 + Math.log(((x + y) * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((a + -0.5) * math.log(t)) - t tmp = 0 if math.log(z) <= 310.0: tmp = t_1 + math.log(((x + y) * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(a + -0.5) * log(t)) - t) tmp = 0.0 if (log(z) <= 310.0) tmp = Float64(t_1 + log(Float64(Float64(x + y) * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((a + -0.5) * log(t)) - t; tmp = 0.0; if (log(z) <= 310.0) tmp = t_1 + log(((x + y) * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[N[Log[z], $MachinePrecision], 310.0], N[(t$95$1 + N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot \log t - t\\
\mathbf{if}\;\log z \leq 310:\\
\;\;\;\;t_1 + \log \left(\left(x + y\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (log.f64 z) < 310Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
associate-+r-99.6%
associate-+l-99.6%
sum-log94.1%
Applied egg-rr94.1%
if 310 < (log.f64 z) Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 75.7%
neg-mul-175.7%
Simplified75.7%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 255.0) (+ (log z) (+ (log (+ x y)) (* (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 <= 255.0) {
tmp = log(z) + (log((x + y)) + (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 <= 255.0d0) then
tmp = log(z) + (log((x + y)) + (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 <= 255.0) {
tmp = Math.log(z) + (Math.log((x + y)) + (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 <= 255.0: tmp = math.log(z) + (math.log((x + y)) + (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 <= 255.0) tmp = Float64(log(z) + Float64(log(Float64(x + y)) + 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 <= 255.0) tmp = log(z) + (log((x + y)) + (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, 255.0], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 255:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if t < 255Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around 0 98.0%
if 255 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 98.7%
neg-mul-198.7%
Simplified98.7%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 290.0) (+ (log y) (- (log z) (* (log t) (- 0.5 a)))) (- (* (+ a -0.5) (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 290.0) {
tmp = log(y) + (log(z) - (log(t) * (0.5 - a)));
} 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 <= 290.0d0) then
tmp = log(y) + (log(z) - (log(t) * (0.5d0 - a)))
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 <= 290.0) {
tmp = Math.log(y) + (Math.log(z) - (Math.log(t) * (0.5 - a)));
} else {
tmp = ((a + -0.5) * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 290.0: tmp = math.log(y) + (math.log(z) - (math.log(t) * (0.5 - a))) else: tmp = ((a + -0.5) * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 290.0) tmp = Float64(log(y) + Float64(log(z) - Float64(log(t) * Float64(0.5 - a)))); 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 <= 290.0) tmp = log(y) + (log(z) - (log(t) * (0.5 - a))); else tmp = ((a + -0.5) * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 290.0], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision]), $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 290:\\
\;\;\;\;\log y + \left(\log z - \log t \cdot \left(0.5 - a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\end{array}
\end{array}
if t < 290Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around 0 98.0%
Taylor expanded in x around 0 62.3%
if 290 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 98.7%
neg-mul-198.7%
Simplified98.7%
Final simplification80.3%
(FPCore (x y z t a) :precision binary64 (+ (* (+ a -0.5) (log t)) (+ (- (log z) t) (log y))))
double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * log(t)) + ((log(z) - 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 = ((a + (-0.5d0)) * log(t)) + ((log(z) - t) + log(y))
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) - t) + Math.log(y));
}
def code(x, y, z, t, a): return ((a + -0.5) * math.log(t)) + ((math.log(z) - t) + math.log(y))
function code(x, y, z, t, a) return Float64(Float64(Float64(a + -0.5) * log(t)) + Float64(Float64(log(z) - t) + log(y))) end
function tmp = code(x, y, z, t, a) tmp = ((a + -0.5) * log(t)) + ((log(z) - t) + log(y)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.5\right) \cdot \log t + \left(\left(\log z - t\right) + \log y\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.1%
associate--l+68.1%
Simplified68.1%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (- (+ (log y) (- (log z) (* (log t) (- 0.5 a)))) t))
double code(double x, double y, double z, double t, double a) {
return (log(y) + (log(z) - (log(t) * (0.5 - a)))) - 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) * (0.5d0 - a)))) - 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) * (0.5 - a)))) - t;
}
def code(x, y, z, t, a): return (math.log(y) + (math.log(z) - (math.log(t) * (0.5 - a)))) - t
function code(x, y, z, t, a) return Float64(Float64(log(y) + Float64(log(z) - Float64(log(t) * Float64(0.5 - a)))) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(y) + (log(z) - (log(t) * (0.5 - a)))) - 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[(0.5 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y + \left(\log z - \log t \cdot \left(0.5 - a\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.0%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -2e+14) (not (<= (- a 0.5) -0.499999999))) (- (* (+ a -0.5) (log t)) t) (- (+ (log (* y z)) (* -0.5 (log t))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -2e+14) || !((a - 0.5) <= -0.499999999)) {
tmp = ((a + -0.5) * log(t)) - t;
} else {
tmp = (log((y * z)) + (-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 (((a - 0.5d0) <= (-2d+14)) .or. (.not. ((a - 0.5d0) <= (-0.499999999d0)))) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else
tmp = (log((y * z)) + ((-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 (((a - 0.5) <= -2e+14) || !((a - 0.5) <= -0.499999999)) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else {
tmp = (Math.log((y * z)) + (-0.5 * Math.log(t))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a - 0.5) <= -2e+14) or not ((a - 0.5) <= -0.499999999): tmp = ((a + -0.5) * math.log(t)) - t else: tmp = (math.log((y * z)) + (-0.5 * math.log(t))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -2e+14) || !(Float64(a - 0.5) <= -0.499999999)) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); else tmp = Float64(Float64(log(Float64(y * z)) + Float64(-0.5 * log(t))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a - 0.5) <= -2e+14) || ~(((a - 0.5) <= -0.499999999))) tmp = ((a + -0.5) * log(t)) - t; else tmp = (log((y * z)) + (-0.5 * log(t))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -2e+14], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.499999999]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -2 \cdot 10^{+14} \lor \neg \left(a - 0.5 \leq -0.499999999\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + -0.5 \cdot \log t\right) - t\\
\end{array}
\end{array}
if (-.f64 a 1/2) < -2e14 or -0.499999998999999973 < (-.f64 a 1/2) Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 97.4%
neg-mul-197.4%
Simplified97.4%
if -2e14 < (-.f64 a 1/2) < -0.499999998999999973Initial program 99.6%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-exp-log35.1%
associate-+r-35.1%
sum-log21.2%
Applied egg-rr21.2%
Taylor expanded in a around 0 75.1%
Taylor expanded in x around 0 48.4%
*-commutative48.4%
Simplified48.4%
Taylor expanded in a around 0 47.6%
*-commutative47.6%
+-commutative47.6%
log-prod61.3%
+-commutative61.3%
log-prod47.6%
Simplified47.6%
Final simplification70.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -0.5 (log t))))
(if (or (<= (- a 0.5) -2e+14) (not (<= (- a 0.5) -0.499999999)))
(- (+ t_1 (* a (log t))) t)
(- (+ (log (* y z)) t_1) t))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -0.5 * log(t);
double tmp;
if (((a - 0.5) <= -2e+14) || !((a - 0.5) <= -0.499999999)) {
tmp = (t_1 + (a * log(t))) - t;
} else {
tmp = (log((y * z)) + t_1) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.5d0) * log(t)
if (((a - 0.5d0) <= (-2d+14)) .or. (.not. ((a - 0.5d0) <= (-0.499999999d0)))) then
tmp = (t_1 + (a * log(t))) - t
else
tmp = (log((y * z)) + t_1) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -0.5 * Math.log(t);
double tmp;
if (((a - 0.5) <= -2e+14) || !((a - 0.5) <= -0.499999999)) {
tmp = (t_1 + (a * Math.log(t))) - t;
} else {
tmp = (Math.log((y * z)) + t_1) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -0.5 * math.log(t) tmp = 0 if ((a - 0.5) <= -2e+14) or not ((a - 0.5) <= -0.499999999): tmp = (t_1 + (a * math.log(t))) - t else: tmp = (math.log((y * z)) + t_1) - t return tmp
function code(x, y, z, t, a) t_1 = Float64(-0.5 * log(t)) tmp = 0.0 if ((Float64(a - 0.5) <= -2e+14) || !(Float64(a - 0.5) <= -0.499999999)) tmp = Float64(Float64(t_1 + Float64(a * log(t))) - t); else tmp = Float64(Float64(log(Float64(y * z)) + t_1) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -0.5 * log(t); tmp = 0.0; if (((a - 0.5) <= -2e+14) || ~(((a - 0.5) <= -0.499999999))) tmp = (t_1 + (a * log(t))) - t; else tmp = (log((y * z)) + t_1) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -2e+14], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.499999999]], $MachinePrecision]], N[(N[(t$95$1 + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.5 \cdot \log t\\
\mathbf{if}\;a - 0.5 \leq -2 \cdot 10^{+14} \lor \neg \left(a - 0.5 \leq -0.499999999\right):\\
\;\;\;\;\left(t_1 + a \cdot \log t\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + t_1\right) - t\\
\end{array}
\end{array}
if (-.f64 a 1/2) < -2e14 or -0.499999998999999973 < (-.f64 a 1/2) Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 97.4%
neg-mul-197.4%
Simplified97.4%
Taylor expanded in a around 0 97.4%
if -2e14 < (-.f64 a 1/2) < -0.499999998999999973Initial program 99.6%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-exp-log35.1%
associate-+r-35.1%
sum-log21.2%
Applied egg-rr21.2%
Taylor expanded in a around 0 75.1%
Taylor expanded in x around 0 48.4%
*-commutative48.4%
Simplified48.4%
Taylor expanded in a around 0 47.6%
*-commutative47.6%
+-commutative47.6%
log-prod61.3%
+-commutative61.3%
log-prod47.6%
Simplified47.6%
Final simplification70.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (* (+ a -0.5) (log t)) t))) (if (<= z 3.25e+134) (+ t_1 (log (* y z))) t_1)))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((a + -0.5) * log(t)) - t;
double tmp;
if (z <= 3.25e+134) {
tmp = t_1 + log((y * z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((a + (-0.5d0)) * log(t)) - t
if (z <= 3.25d+134) then
tmp = t_1 + log((y * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((a + -0.5) * Math.log(t)) - t;
double tmp;
if (z <= 3.25e+134) {
tmp = t_1 + Math.log((y * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((a + -0.5) * math.log(t)) - t tmp = 0 if z <= 3.25e+134: tmp = t_1 + math.log((y * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(a + -0.5) * log(t)) - t) tmp = 0.0 if (z <= 3.25e+134) tmp = Float64(t_1 + log(Float64(y * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((a + -0.5) * log(t)) - t; tmp = 0.0; if (z <= 3.25e+134) tmp = t_1 + log((y * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[z, 3.25e+134], N[(t$95$1 + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot \log t - t\\
\mathbf{if}\;z \leq 3.25 \cdot 10^{+134}:\\
\;\;\;\;t_1 + \log \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < 3.25e134Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
add-exp-log26.0%
associate-+r-26.0%
sum-log23.8%
Applied egg-rr23.8%
Taylor expanded in x around 0 65.5%
associate--l+65.5%
sub-neg65.5%
metadata-eval65.5%
Simplified65.5%
if 3.25e134 < z Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 75.7%
neg-mul-175.7%
Simplified75.7%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6e-162) (not (<= a 1.25e-9))) (- (* (+ a -0.5) (log t)) 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 <= -6e-162) || !(a <= 1.25e-9)) {
tmp = ((a + -0.5) * log(t)) - 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 <= (-6d-162)) .or. (.not. (a <= 1.25d-9))) then
tmp = ((a + (-0.5d0)) * log(t)) - 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 <= -6e-162) || !(a <= 1.25e-9)) {
tmp = ((a + -0.5) * Math.log(t)) - 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 <= -6e-162) or not (a <= 1.25e-9): tmp = ((a + -0.5) * math.log(t)) - 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 <= -6e-162) || !(a <= 1.25e-9)) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); else tmp = Float64(log(Float64(Float64(y * z) * (t ^ -0.5))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6e-162) || ~((a <= 1.25e-9))) tmp = ((a + -0.5) * log(t)) - 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, -6e-162], N[Not[LessEqual[a, 1.25e-9]], $MachinePrecision]], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(N[(y * z), $MachinePrecision] * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-162} \lor \neg \left(a \leq 1.25 \cdot 10^{-9}\right):\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(\left(y \cdot z\right) \cdot {t}^{-0.5}\right) - t\\
\end{array}
\end{array}
if a < -5.99999999999999997e-162 or 1.25e-9 < a Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 88.4%
neg-mul-188.4%
Simplified88.4%
if -5.99999999999999997e-162 < a < 1.25e-9Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
add-exp-log40.8%
associate-+r-40.8%
sum-log24.2%
Applied egg-rr24.2%
Taylor expanded in a around 0 74.4%
Taylor expanded in x around 0 47.8%
*-commutative47.8%
Simplified47.8%
Taylor expanded in a around 0 47.8%
*-commutative47.8%
log-pow47.8%
log-prod40.4%
*-commutative40.4%
Simplified40.4%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- a 0.5) -7.5e+82) (not (<= (- a 0.5) 2.4))) (* (log t) (- a 0.5)) (- (* -0.5 (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a - 0.5) <= -7.5e+82) || !((a - 0.5) <= 2.4)) {
tmp = log(t) * (a - 0.5);
} else {
tmp = (-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 (((a - 0.5d0) <= (-7.5d+82)) .or. (.not. ((a - 0.5d0) <= 2.4d0))) then
tmp = log(t) * (a - 0.5d0)
else
tmp = ((-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 (((a - 0.5) <= -7.5e+82) || !((a - 0.5) <= 2.4)) {
tmp = Math.log(t) * (a - 0.5);
} else {
tmp = (-0.5 * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a - 0.5) <= -7.5e+82) or not ((a - 0.5) <= 2.4): tmp = math.log(t) * (a - 0.5) else: tmp = (-0.5 * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a - 0.5) <= -7.5e+82) || !(Float64(a - 0.5) <= 2.4)) tmp = Float64(log(t) * Float64(a - 0.5)); else tmp = Float64(Float64(-0.5 * log(t)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a - 0.5) <= -7.5e+82) || ~(((a - 0.5) <= 2.4))) tmp = log(t) * (a - 0.5); else tmp = (-0.5 * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -7.5e+82], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], 2.4]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -7.5 \cdot 10^{+82} \lor \neg \left(a - 0.5 \leq 2.4\right):\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \log t - t\\
\end{array}
\end{array}
if (-.f64 a 1/2) < -7.4999999999999999e82 or 2.39999999999999991 < (-.f64 a 1/2) Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 97.9%
neg-mul-197.9%
Simplified97.9%
Taylor expanded in t around 0 81.1%
if -7.4999999999999999e82 < (-.f64 a 1/2) < 2.39999999999999991Initial program 99.6%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 57.5%
neg-mul-157.5%
Simplified57.5%
Taylor expanded in a around 0 54.5%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 430.0) (+ t (* (+ a -0.5) (log t))) (- (* a (log t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 430.0) {
tmp = t + ((a + -0.5) * log(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 (t <= 430.0d0) then
tmp = t + ((a + (-0.5d0)) * log(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 (t <= 430.0) {
tmp = t + ((a + -0.5) * Math.log(t));
} else {
tmp = (a * Math.log(t)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 430.0: tmp = t + ((a + -0.5) * math.log(t)) else: tmp = (a * math.log(t)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 430.0) tmp = Float64(t + Float64(Float64(a + -0.5) * log(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 (t <= 430.0) tmp = t + ((a + -0.5) * log(t)); else tmp = (a * log(t)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 430.0], N[(t + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 430:\\
\;\;\;\;t + \left(a + -0.5\right) \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if t < 430Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around inf 49.8%
neg-mul-149.8%
Simplified49.8%
Taylor expanded in a around 0 49.8%
distribute-rgt-out49.8%
+-commutative49.8%
metadata-eval49.8%
sub-neg49.8%
add-sqr-sqrt27.9%
sqrt-unprod17.4%
pow217.4%
sub-neg17.4%
metadata-eval17.4%
Applied egg-rr17.4%
unpow217.4%
rem-sqrt-square28.2%
Simplified28.2%
sub-neg28.2%
distribute-rgt-in28.2%
+-commutative28.2%
add-sqr-sqrt27.9%
fabs-sqr27.9%
add-sqr-sqrt49.8%
distribute-rgt-out49.8%
add-sqr-sqrt0.0%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod50.0%
add-sqr-sqrt50.0%
Applied egg-rr50.0%
if 430 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in a around inf 98.7%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.75e+78) (* (log t) (- a 0.5)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.75e+78) {
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 <= 1.75d+78) 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 <= 1.75e+78) {
tmp = Math.log(t) * (a - 0.5);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.75e+78: tmp = math.log(t) * (a - 0.5) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.75e+78) 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 <= 1.75e+78) tmp = log(t) * (a - 0.5); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.75e+78], N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.75 \cdot 10^{+78}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.7500000000000001e78Initial program 99.4%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in t around inf 57.7%
neg-mul-157.7%
Simplified57.7%
Taylor expanded in t around 0 51.5%
if 1.7500000000000001e78 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
neg-mul-199.9%
Simplified99.9%
Taylor expanded in t around inf 79.7%
mul-1-neg79.7%
Simplified79.7%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 82.0) (* (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 <= 82.0) {
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 <= 82.0d0) 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 <= 82.0) {
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 <= 82.0: 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 <= 82.0) 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 <= 82.0) 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, 82.0], 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 82:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \log t - t\\
\end{array}
\end{array}
if t < 82Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around inf 49.8%
neg-mul-149.8%
Simplified49.8%
Taylor expanded in t around 0 49.9%
if 82 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in a around inf 98.7%
Final simplification74.1%
(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 t around inf 74.0%
neg-mul-174.0%
Simplified74.0%
Final simplification74.0%
(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 t around inf 74.0%
neg-mul-174.0%
Simplified74.0%
Taylor expanded in t around inf 36.6%
mul-1-neg36.6%
Simplified36.6%
Final simplification36.6%
(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 2023311
(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))))