
(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) (* 2.0 (log (sqrt t))))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * (2.0 * log(sqrt(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) * (2.0d0 * log(sqrt(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) * (2.0 * Math.log(Math.sqrt(t))));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * (2.0 * math.log(math.sqrt(t))))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * Float64(2.0 * log(sqrt(t))))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * (2.0 * log(sqrt(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[(2.0 * N[Log[N[Sqrt[t], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \left(2 \cdot \log \left(\sqrt{t}\right)\right)
\end{array}
Initial program 99.6%
add-sqr-sqrt99.6%
log-prod99.6%
Applied egg-rr99.6%
count-299.6%
Simplified99.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.43) (+ (log z) (+ (log y) (* (- a 0.5) (log t)))) (+ (- (log z) t) (+ (log y) (* a (log t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.43) {
tmp = log(z) + (log(y) + ((a - 0.5) * log(t)));
} else {
tmp = (log(z) - t) + (log(y) + (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 <= 0.43d0) then
tmp = log(z) + (log(y) + ((a - 0.5d0) * log(t)))
else
tmp = (log(z) - t) + (log(y) + (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 <= 0.43) {
tmp = Math.log(z) + (Math.log(y) + ((a - 0.5) * Math.log(t)));
} else {
tmp = (Math.log(z) - t) + (Math.log(y) + (a * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.43: tmp = math.log(z) + (math.log(y) + ((a - 0.5) * math.log(t))) else: tmp = (math.log(z) - t) + (math.log(y) + (a * math.log(t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.43) tmp = Float64(log(z) + Float64(log(y) + Float64(Float64(a - 0.5) * log(t)))); else tmp = Float64(Float64(log(z) - t) + Float64(log(y) + Float64(a * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.43) tmp = log(z) + (log(y) + ((a - 0.5) * log(t))); else tmp = (log(z) - t) + (log(y) + (a * log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.43], N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.43:\\
\;\;\;\;\log z + \left(\log y + \left(a - 0.5\right) \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + \left(\log y + a \cdot \log t\right)\\
\end{array}
\end{array}
if t < 0.429999999999999993Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-define99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 66.7%
Taylor expanded in t around 0 66.6%
if 0.429999999999999993 < t Initial program 99.9%
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 81.1%
Taylor expanded in a around inf 80.6%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 380.0) (+ (log z) (+ (log y) (* (- a 0.5) (log t)))) (* t (+ (* (log t) (/ (+ a -0.5) t)) -1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 380.0) {
tmp = log(z) + (log(y) + ((a - 0.5) * log(t)));
} else {
tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0);
}
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 <= 380.0d0) then
tmp = log(z) + (log(y) + ((a - 0.5d0) * log(t)))
else
tmp = t * ((log(t) * ((a + (-0.5d0)) / t)) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 380.0) {
tmp = Math.log(z) + (Math.log(y) + ((a - 0.5) * Math.log(t)));
} else {
tmp = t * ((Math.log(t) * ((a + -0.5) / t)) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 380.0: tmp = math.log(z) + (math.log(y) + ((a - 0.5) * math.log(t))) else: tmp = t * ((math.log(t) * ((a + -0.5) / t)) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 380.0) tmp = Float64(log(z) + Float64(log(y) + Float64(Float64(a - 0.5) * log(t)))); else tmp = Float64(t * Float64(Float64(log(t) * Float64(Float64(a + -0.5) / t)) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 380.0) tmp = log(z) + (log(y) + ((a - 0.5) * log(t))); else tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 380.0], N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 380:\\
\;\;\;\;\log z + \left(\log y + \left(a - 0.5\right) \cdot \log t\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\log t \cdot \frac{a + -0.5}{t} + -1\right)\\
\end{array}
\end{array}
if t < 380Initial program 99.3%
associate--l+99.3%
+-commutative99.3%
associate-+l+99.3%
+-commutative99.3%
fma-define99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 67.0%
Taylor expanded in t around 0 66.3%
if 380 < t Initial program 99.9%
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 81.0%
Taylor expanded in t around inf 80.9%
associate--l+80.9%
mul-1-neg80.9%
associate-/l*80.8%
distribute-lft-neg-in80.8%
log-rec80.8%
remove-double-neg80.8%
sub-neg80.8%
metadata-eval80.8%
+-commutative80.8%
associate--l+80.9%
Simplified80.9%
Taylor expanded in t around inf 99.1%
Final simplification83.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(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}
Initial program 99.6%
(FPCore (x y z t a) :precision binary64 (- (+ (log y) (+ (log z) (* (- a 0.5) (log t)))) t))
double code(double x, double y, double z, double t, double a) {
return (log(y) + (log(z) + ((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 = (log(y) + (log(z) + ((a - 0.5d0) * log(t)))) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(y) + (Math.log(z) + ((a - 0.5) * Math.log(t)))) - t;
}
def code(x, y, z, t, a): return (math.log(y) + (math.log(z) + ((a - 0.5) * math.log(t)))) - t
function code(x, y, z, t, a) return Float64(Float64(log(y) + Float64(log(z) + Float64(Float64(a - 0.5) * log(t)))) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(y) + (log(z) + ((a - 0.5) * log(t)))) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y + \left(\log z + \left(a - 0.5\right) \cdot \log t\right)\right) - t
\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 74.1%
Final simplification74.1%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (+ (log y) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (log(y) + ((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) + ((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) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (math.log(y) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(log(y) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (log(y) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\log y + \left(a - 0.5\right) \cdot \log t\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 74.1%
Final simplification74.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t 1.05e-53)
(* a (log t))
(if (<= t 7.5e-19)
(log (* (pow t (+ a -0.5)) (* (+ x y) z)))
(* t (+ (* (log t) (/ (+ a -0.5) t)) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.05e-53) {
tmp = a * log(t);
} else if (t <= 7.5e-19) {
tmp = log((pow(t, (a + -0.5)) * ((x + y) * z)));
} else {
tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0);
}
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.05d-53) then
tmp = a * log(t)
else if (t <= 7.5d-19) then
tmp = log(((t ** (a + (-0.5d0))) * ((x + y) * z)))
else
tmp = t * ((log(t) * ((a + (-0.5d0)) / t)) + (-1.0d0))
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.05e-53) {
tmp = a * Math.log(t);
} else if (t <= 7.5e-19) {
tmp = Math.log((Math.pow(t, (a + -0.5)) * ((x + y) * z)));
} else {
tmp = t * ((Math.log(t) * ((a + -0.5) / t)) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.05e-53: tmp = a * math.log(t) elif t <= 7.5e-19: tmp = math.log((math.pow(t, (a + -0.5)) * ((x + y) * z))) else: tmp = t * ((math.log(t) * ((a + -0.5) / t)) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.05e-53) tmp = Float64(a * log(t)); elseif (t <= 7.5e-19) tmp = log(Float64((t ^ Float64(a + -0.5)) * Float64(Float64(x + y) * z))); else tmp = Float64(t * Float64(Float64(log(t) * Float64(Float64(a + -0.5) / t)) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.05e-53) tmp = a * log(t); elseif (t <= 7.5e-19) tmp = log(((t ^ (a + -0.5)) * ((x + y) * z))); else tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.05e-53], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e-19], N[Log[N[(N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision] * N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t * N[(N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.05 \cdot 10^{-53}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-19}:\\
\;\;\;\;\log \left({t}^{\left(a + -0.5\right)} \cdot \left(\left(x + y\right) \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\log t \cdot \frac{a + -0.5}{t} + -1\right)\\
\end{array}
\end{array}
if t < 1.04999999999999989e-53Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 55.4%
*-commutative55.4%
Simplified55.4%
if 1.04999999999999989e-53 < t < 7.49999999999999957e-19Initial program 99.1%
associate--l+99.1%
+-commutative99.1%
associate-+l+99.0%
+-commutative99.0%
fma-define99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
add-log-exp84.5%
+-commutative84.5%
exp-sum84.6%
fma-undefine84.6%
metadata-eval84.6%
sub-neg84.6%
exp-sum84.2%
add-exp-log84.7%
sub-neg84.7%
metadata-eval84.7%
*-commutative84.7%
exp-to-pow84.8%
exp-diff84.8%
add-exp-log85.4%
Applied egg-rr85.4%
associate-*l*85.0%
associate-*r/85.0%
*-commutative85.0%
+-commutative85.0%
Simplified85.0%
Taylor expanded in t around 0 85.0%
+-commutative85.0%
Simplified85.0%
if 7.49999999999999957e-19 < t 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 80.1%
Taylor expanded in t around inf 80.0%
associate--l+80.0%
mul-1-neg80.0%
associate-/l*80.0%
distribute-lft-neg-in80.0%
log-rec80.0%
remove-double-neg80.0%
sub-neg80.0%
metadata-eval80.0%
+-commutative80.0%
associate--l+80.0%
Simplified80.0%
Taylor expanded in t around inf 96.5%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t 2.25e-52)
(* a (log t))
(if (<= t 8.6e-19)
(log (* (* y z) (pow t (+ a -0.5))))
(* t (+ (* (log t) (/ (+ a -0.5) t)) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.25e-52) {
tmp = a * log(t);
} else if (t <= 8.6e-19) {
tmp = log(((y * z) * pow(t, (a + -0.5))));
} else {
tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0);
}
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.25d-52) then
tmp = a * log(t)
else if (t <= 8.6d-19) then
tmp = log(((y * z) * (t ** (a + (-0.5d0)))))
else
tmp = t * ((log(t) * ((a + (-0.5d0)) / t)) + (-1.0d0))
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.25e-52) {
tmp = a * Math.log(t);
} else if (t <= 8.6e-19) {
tmp = Math.log(((y * z) * Math.pow(t, (a + -0.5))));
} else {
tmp = t * ((Math.log(t) * ((a + -0.5) / t)) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.25e-52: tmp = a * math.log(t) elif t <= 8.6e-19: tmp = math.log(((y * z) * math.pow(t, (a + -0.5)))) else: tmp = t * ((math.log(t) * ((a + -0.5) / t)) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.25e-52) tmp = Float64(a * log(t)); elseif (t <= 8.6e-19) tmp = log(Float64(Float64(y * z) * (t ^ Float64(a + -0.5)))); else tmp = Float64(t * Float64(Float64(log(t) * Float64(Float64(a + -0.5) / t)) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.25e-52) tmp = a * log(t); elseif (t <= 8.6e-19) tmp = log(((y * z) * (t ^ (a + -0.5)))); else tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.25e-52], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e-19], N[Log[N[(N[(y * z), $MachinePrecision] * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t * N[(N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.25 \cdot 10^{-52}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-19}:\\
\;\;\;\;\log \left(\left(y \cdot z\right) \cdot {t}^{\left(a + -0.5\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\log t \cdot \frac{a + -0.5}{t} + -1\right)\\
\end{array}
\end{array}
if t < 2.25e-52Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 55.4%
*-commutative55.4%
Simplified55.4%
if 2.25e-52 < t < 8.6e-19Initial program 99.1%
associate--l+99.1%
+-commutative99.1%
associate-+l+99.0%
+-commutative99.0%
fma-define99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in x around 0 70.6%
Taylor expanded in t around 0 70.6%
*-un-lft-identity70.6%
add-log-exp56.0%
sum-log56.0%
sub-neg56.0%
metadata-eval56.0%
exp-sum55.9%
add-exp-log56.5%
pow-to-exp56.7%
Applied egg-rr56.7%
*-lft-identity56.7%
associate-*r*56.3%
*-commutative56.3%
metadata-eval56.3%
sub-neg56.3%
exp-to-pow56.1%
exp-to-pow56.3%
sub-neg56.3%
metadata-eval56.3%
+-commutative56.3%
Simplified56.3%
if 8.6e-19 < t 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 80.1%
Taylor expanded in t around inf 80.0%
associate--l+80.0%
mul-1-neg80.0%
associate-/l*80.0%
distribute-lft-neg-in80.0%
log-rec80.0%
remove-double-neg80.0%
sub-neg80.0%
metadata-eval80.0%
+-commutative80.0%
associate--l+80.0%
Simplified80.0%
Taylor expanded in t around inf 96.5%
Final simplification77.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 520.0) (- (+ (* (- a 0.5) (log t)) (log (* (+ x y) z))) t) (* t (+ (* (log t) (/ (+ a -0.5) t)) -1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 520.0) {
tmp = (((a - 0.5) * log(t)) + log(((x + y) * z))) - t;
} else {
tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0);
}
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 <= 520.0d0) then
tmp = (((a - 0.5d0) * log(t)) + log(((x + y) * z))) - t
else
tmp = t * ((log(t) * ((a + (-0.5d0)) / t)) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 520.0) {
tmp = (((a - 0.5) * Math.log(t)) + Math.log(((x + y) * z))) - t;
} else {
tmp = t * ((Math.log(t) * ((a + -0.5) / t)) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 520.0: tmp = (((a - 0.5) * math.log(t)) + math.log(((x + y) * z))) - t else: tmp = t * ((math.log(t) * ((a + -0.5) / t)) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 520.0) tmp = Float64(Float64(Float64(Float64(a - 0.5) * log(t)) + log(Float64(Float64(x + y) * z))) - t); else tmp = Float64(t * Float64(Float64(log(t) * Float64(Float64(a + -0.5) / t)) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 520.0) tmp = (((a - 0.5) * log(t)) + log(((x + y) * z))) - t; else tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 520.0], N[(N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(t * N[(N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 520:\\
\;\;\;\;\left(\left(a - 0.5\right) \cdot \log t + \log \left(\left(x + y\right) \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\log t \cdot \frac{a + -0.5}{t} + -1\right)\\
\end{array}
\end{array}
if t < 520Initial 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%
associate-+r-99.3%
fma-undefine99.3%
associate--r+99.3%
sum-log76.1%
Applied egg-rr76.1%
if 520 < t Initial program 99.9%
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 81.0%
Taylor expanded in t around inf 80.9%
associate--l+80.9%
mul-1-neg80.9%
associate-/l*80.8%
distribute-lft-neg-in80.8%
log-rec80.8%
remove-double-neg80.8%
sub-neg80.8%
metadata-eval80.8%
+-commutative80.8%
associate--l+80.9%
Simplified80.9%
Taylor expanded in t around inf 99.1%
Final simplification87.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 680.0) (- (+ (* (- a 0.5) (log t)) (log (* y z))) t) (* t (+ (* (log t) (/ (+ a -0.5) t)) -1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 680.0) {
tmp = (((a - 0.5) * log(t)) + log((y * z))) - t;
} else {
tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0);
}
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 <= 680.0d0) then
tmp = (((a - 0.5d0) * log(t)) + log((y * z))) - t
else
tmp = t * ((log(t) * ((a + (-0.5d0)) / t)) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 680.0) {
tmp = (((a - 0.5) * Math.log(t)) + Math.log((y * z))) - t;
} else {
tmp = t * ((Math.log(t) * ((a + -0.5) / t)) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 680.0: tmp = (((a - 0.5) * math.log(t)) + math.log((y * z))) - t else: tmp = t * ((math.log(t) * ((a + -0.5) / t)) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 680.0) tmp = Float64(Float64(Float64(Float64(a - 0.5) * log(t)) + log(Float64(y * z))) - t); else tmp = Float64(t * Float64(Float64(log(t) * Float64(Float64(a + -0.5) / t)) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 680.0) tmp = (((a - 0.5) * log(t)) + log((y * z))) - t; else tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 680.0], N[(N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(t * N[(N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 680:\\
\;\;\;\;\left(\left(a - 0.5\right) \cdot \log t + \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\log t \cdot \frac{a + -0.5}{t} + -1\right)\\
\end{array}
\end{array}
if t < 680Initial program 99.3%
add-cbrt-cube65.5%
pow365.5%
sub-neg65.5%
metadata-eval65.5%
*-commutative65.5%
Applied egg-rr65.5%
sum-log51.9%
Applied egg-rr51.9%
Taylor expanded in x around 0 52.8%
if 680 < t Initial program 99.9%
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 81.0%
Taylor expanded in t around inf 80.9%
associate--l+80.9%
mul-1-neg80.9%
associate-/l*80.8%
distribute-lft-neg-in80.8%
log-rec80.8%
remove-double-neg80.8%
sub-neg80.8%
metadata-eval80.8%
+-commutative80.8%
associate--l+80.9%
Simplified80.9%
Taylor expanded in t around inf 99.1%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 6.4e-55) (* a (log t)) (* t (+ (* (log t) (/ (+ a -0.5) t)) -1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 6.4e-55) {
tmp = a * log(t);
} else {
tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0);
}
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 <= 6.4d-55) then
tmp = a * log(t)
else
tmp = t * ((log(t) * ((a + (-0.5d0)) / t)) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 6.4e-55) {
tmp = a * Math.log(t);
} else {
tmp = t * ((Math.log(t) * ((a + -0.5) / t)) + -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 6.4e-55: tmp = a * math.log(t) else: tmp = t * ((math.log(t) * ((a + -0.5) / t)) + -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 6.4e-55) tmp = Float64(a * log(t)); else tmp = Float64(t * Float64(Float64(log(t) * Float64(Float64(a + -0.5) / t)) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 6.4e-55) tmp = a * log(t); else tmp = t * ((log(t) * ((a + -0.5) / t)) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 6.4e-55], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.4 \cdot 10^{-55}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\log t \cdot \frac{a + -0.5}{t} + -1\right)\\
\end{array}
\end{array}
if t < 6.4000000000000003e-55Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 55.0%
*-commutative55.0%
Simplified55.0%
if 6.4000000000000003e-55 < t Initial program 99.8%
associate--l+99.8%
+-commutative99.8%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 79.4%
Taylor expanded in t around inf 79.3%
associate--l+79.3%
mul-1-neg79.3%
associate-/l*79.3%
distribute-lft-neg-in79.3%
log-rec79.3%
remove-double-neg79.3%
sub-neg79.3%
metadata-eval79.3%
+-commutative79.3%
associate--l+79.3%
Simplified79.3%
Taylor expanded in t around inf 90.7%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.4e+39) (not (<= a 5.5e+30))) (* a (log t)) (- -1.0 (* t (- (/ -1.0 t) -1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.4e+39) || !(a <= 5.5e+30)) {
tmp = a * log(t);
} else {
tmp = -1.0 - (t * ((-1.0 / t) - -1.0));
}
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 <= (-3.4d+39)) .or. (.not. (a <= 5.5d+30))) then
tmp = a * log(t)
else
tmp = (-1.0d0) - (t * (((-1.0d0) / t) - (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.4e+39) || !(a <= 5.5e+30)) {
tmp = a * Math.log(t);
} else {
tmp = -1.0 - (t * ((-1.0 / t) - -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.4e+39) or not (a <= 5.5e+30): tmp = a * math.log(t) else: tmp = -1.0 - (t * ((-1.0 / t) - -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.4e+39) || !(a <= 5.5e+30)) tmp = Float64(a * log(t)); else tmp = Float64(-1.0 - Float64(t * Float64(Float64(-1.0 / t) - -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.4e+39) || ~((a <= 5.5e+30))) tmp = a * log(t); else tmp = -1.0 - (t * ((-1.0 / t) - -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.4e+39], N[Not[LessEqual[a, 5.5e+30]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(-1.0 - N[(t * N[(N[(-1.0 / t), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+39} \lor \neg \left(a \leq 5.5 \cdot 10^{+30}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-1 - t \cdot \left(\frac{-1}{t} - -1\right)\\
\end{array}
\end{array}
if a < -3.3999999999999999e39 or 5.50000000000000025e30 < a Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 78.5%
*-commutative78.5%
Simplified78.5%
if -3.3999999999999999e39 < a < 5.50000000000000025e30Initial program 99.6%
associate-+l-99.6%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-undefine99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in t around inf 50.4%
neg-mul-150.4%
Simplified50.4%
expm1-log1p-u1.4%
expm1-undefine1.6%
Applied egg-rr1.6%
sub-neg1.6%
log1p-undefine1.6%
rem-exp-log50.6%
unsub-neg50.6%
metadata-eval50.6%
Simplified50.6%
Taylor expanded in t around inf 50.6%
Final simplification64.4%
(FPCore (x y z t a) :precision binary64 (- -1.0 (* t (- (/ -1.0 t) -1.0))))
double code(double x, double y, double z, double t, double a) {
return -1.0 - (t * ((-1.0 / t) - -1.0));
}
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 = (-1.0d0) - (t * (((-1.0d0) / t) - (-1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 - (t * ((-1.0 / t) - -1.0));
}
def code(x, y, z, t, a): return -1.0 - (t * ((-1.0 / t) - -1.0))
function code(x, y, z, t, a) return Float64(-1.0 - Float64(t * Float64(Float64(-1.0 / t) - -1.0))) end
function tmp = code(x, y, z, t, a) tmp = -1.0 - (t * ((-1.0 / t) - -1.0)); end
code[x_, y_, z_, t_, a_] := N[(-1.0 - N[(t * N[(N[(-1.0 / t), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-1 - t \cdot \left(\frac{-1}{t} - -1\right)
\end{array}
Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t around inf 35.8%
neg-mul-135.8%
Simplified35.8%
expm1-log1p-u1.3%
expm1-undefine1.4%
Applied egg-rr1.4%
sub-neg1.4%
log1p-undefine1.4%
rem-exp-log35.8%
unsub-neg35.8%
metadata-eval35.8%
Simplified35.8%
Taylor expanded in t around inf 35.9%
Final simplification35.9%
(FPCore (x y z t a) :precision binary64 (+ -1.0 (- 1.0 t)))
double code(double x, double y, double z, double t, double a) {
return -1.0 + (1.0 - 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 = (-1.0d0) + (1.0d0 - t)
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 + (1.0 - t);
}
def code(x, y, z, t, a): return -1.0 + (1.0 - t)
function code(x, y, z, t, a) return Float64(-1.0 + Float64(1.0 - t)) end
function tmp = code(x, y, z, t, a) tmp = -1.0 + (1.0 - t); end
code[x_, y_, z_, t_, a_] := N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-1 + \left(1 - t\right)
\end{array}
Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t around inf 35.8%
neg-mul-135.8%
Simplified35.8%
expm1-log1p-u1.3%
expm1-undefine1.4%
Applied egg-rr1.4%
sub-neg1.4%
log1p-undefine1.4%
rem-exp-log35.8%
unsub-neg35.8%
metadata-eval35.8%
Simplified35.8%
Final simplification35.8%
(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 35.8%
neg-mul-135.8%
Simplified35.8%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\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 35.8%
neg-mul-135.8%
Simplified35.8%
expm1-log1p-u1.3%
expm1-undefine1.4%
Applied egg-rr1.4%
sub-neg1.4%
log1p-undefine1.4%
rem-exp-log35.8%
unsub-neg35.8%
metadata-eval35.8%
Simplified35.8%
Taylor expanded in t around 0 2.4%
metadata-eval2.4%
Applied egg-rr2.4%
(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 2024170
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (+ (log (+ x y)) (+ (- (log z) t) (* (- a 1/2) (log t)))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))