
(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 18 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) (* (log t) (- a 0.5))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + (Math.log(t) * (a - 0.5));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + (math.log(t) * (a - 0.5))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(log(t) * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + (log(t) * (a - 0.5)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \log t \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -0.82)
(- (* a (* (log (cbrt t)) 3.0)) t)
(if (<= a 8.8e-20)
(- (+ (+ (log z) (log y)) (* (log t) -0.5)) t)
(- (+ (log y) (+ (log z) (* a (log t)))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.82) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else if (a <= 8.8e-20) {
tmp = ((log(z) + log(y)) + (log(t) * -0.5)) - t;
} else {
tmp = (log(y) + (log(z) + (a * log(t)))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.82) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else if (a <= 8.8e-20) {
tmp = ((Math.log(z) + Math.log(y)) + (Math.log(t) * -0.5)) - t;
} else {
tmp = (Math.log(y) + (Math.log(z) + (a * Math.log(t)))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.82) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); elseif (a <= 8.8e-20) tmp = Float64(Float64(Float64(log(z) + log(y)) + Float64(log(t) * -0.5)) - t); else tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(a * log(t)))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.82], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 8.8e-20], N[(N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.82:\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-20}:\\
\;\;\;\;\left(\left(\log z + \log y\right) + \log t \cdot -0.5\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \left(\log z + a \cdot \log t\right)\right) - t\\
\end{array}
\end{array}
if a < -0.819999999999999951Initial program 99.7%
add-exp-log56.9%
Applied egg-rr56.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 83.4%
Taylor expanded in a around inf 98.4%
*-commutative98.4%
associate-*r*98.2%
Simplified98.2%
if -0.819999999999999951 < a < 8.79999999999999964e-20Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
if 8.79999999999999964e-20 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 61.6%
Taylor expanded in a around inf 61.6%
Final simplification71.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -0.62)
(- (* a (* (log (cbrt t)) 3.0)) t)
(if (<= a 8.8e-20)
(- (+ (log y) (+ (log z) (* (log t) -0.5))) t)
(- (+ (log y) (+ (log z) (* a (log t)))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.62) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else if (a <= 8.8e-20) {
tmp = (log(y) + (log(z) + (log(t) * -0.5))) - t;
} else {
tmp = (log(y) + (log(z) + (a * log(t)))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.62) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else if (a <= 8.8e-20) {
tmp = (Math.log(y) + (Math.log(z) + (Math.log(t) * -0.5))) - t;
} else {
tmp = (Math.log(y) + (Math.log(z) + (a * Math.log(t)))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.62) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); elseif (a <= 8.8e-20) tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(log(t) * -0.5))) - t); else tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(a * log(t)))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.62], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 8.8e-20], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.62:\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-20}:\\
\;\;\;\;\left(\log y + \left(\log z + \log t \cdot -0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \left(\log z + a \cdot \log t\right)\right) - t\\
\end{array}
\end{array}
if a < -0.619999999999999996Initial program 99.7%
add-exp-log56.9%
Applied egg-rr56.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 83.4%
Taylor expanded in a around inf 98.4%
*-commutative98.4%
associate-*r*98.2%
Simplified98.2%
if -0.619999999999999996 < a < 8.79999999999999964e-20Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
Simplified64.4%
if 8.79999999999999964e-20 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 61.6%
Taylor expanded in a around inf 61.6%
Final simplification71.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -0.216)
(- (* a (* (log (cbrt t)) 3.0)) t)
(if (<= a 8.8e-20)
(- (+ (log y) (log (* z (pow t -0.5)))) t)
(- (+ (log y) (+ (log z) (* a (log t)))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.216) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else if (a <= 8.8e-20) {
tmp = (log(y) + log((z * pow(t, -0.5)))) - t;
} else {
tmp = (log(y) + (log(z) + (a * log(t)))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -0.216) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else if (a <= 8.8e-20) {
tmp = (Math.log(y) + Math.log((z * Math.pow(t, -0.5)))) - t;
} else {
tmp = (Math.log(y) + (Math.log(z) + (a * Math.log(t)))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -0.216) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); elseif (a <= 8.8e-20) tmp = Float64(Float64(log(y) + log(Float64(z * (t ^ -0.5)))) - t); else tmp = Float64(Float64(log(y) + Float64(log(z) + Float64(a * log(t)))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -0.216], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 8.8e-20], N[(N[(N[Log[y], $MachinePrecision] + N[Log[N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.216:\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-20}:\\
\;\;\;\;\left(\log y + \log \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \left(\log z + a \cdot \log t\right)\right) - t\\
\end{array}
\end{array}
if a < -0.215999999999999998Initial program 99.7%
add-exp-log56.9%
Applied egg-rr56.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 83.4%
Taylor expanded in a around inf 98.4%
*-commutative98.4%
associate-*r*98.2%
Simplified98.2%
if -0.215999999999999998 < a < 8.79999999999999964e-20Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
*-un-lft-identity64.4%
+-commutative64.4%
sum-log48.2%
add-log-exp48.2%
sum-log44.7%
add-exp-log44.6%
sum-log44.3%
+-commutative44.3%
sum-log44.6%
add-exp-log44.7%
*-commutative44.7%
pow-to-exp44.8%
Applied egg-rr44.8%
*-lft-identity44.8%
Simplified44.8%
associate-*l*46.5%
log-prod57.4%
Applied egg-rr57.4%
if 8.79999999999999964e-20 < a Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 61.6%
Taylor expanded in a around inf 61.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.124) (not (<= a 8.8e-20))) (- (* a (* (log (cbrt t)) 3.0)) t) (- (+ (log y) (log (* z (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.124) || !(a <= 8.8e-20)) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else {
tmp = (log(y) + log((z * pow(t, -0.5)))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.124) || !(a <= 8.8e-20)) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else {
tmp = (Math.log(y) + Math.log((z * Math.pow(t, -0.5)))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.124) || !(a <= 8.8e-20)) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); else tmp = Float64(Float64(log(y) + log(Float64(z * (t ^ -0.5)))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.124], N[Not[LessEqual[a, 8.8e-20]], $MachinePrecision]], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[Log[N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.124 \lor \neg \left(a \leq 8.8 \cdot 10^{-20}\right):\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + \log \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -0.124 or 8.79999999999999964e-20 < a Initial program 99.7%
add-exp-log52.5%
Applied egg-rr52.5%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 72.5%
Taylor expanded in a around inf 98.9%
*-commutative98.9%
associate-*r*98.8%
Simplified98.8%
if -0.124 < a < 8.79999999999999964e-20Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
*-un-lft-identity64.4%
+-commutative64.4%
sum-log48.2%
add-log-exp48.2%
sum-log44.7%
add-exp-log44.6%
sum-log44.3%
+-commutative44.3%
sum-log44.6%
add-exp-log44.7%
*-commutative44.7%
pow-to-exp44.8%
Applied egg-rr44.8%
*-lft-identity44.8%
Simplified44.8%
associate-*l*46.5%
log-prod57.4%
Applied egg-rr57.4%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (- (+ (+ (log z) (log y)) (* (log t) (+ a -0.5))) t))
double code(double x, double y, double z, double t, double a) {
return ((log(z) + log(y)) + (log(t) * (a + -0.5))) - t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log(z) + log(y)) + (log(t) * (a + (-0.5d0)))) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log(z) + Math.log(y)) + (Math.log(t) * (a + -0.5))) - t;
}
def code(x, y, z, t, a): return ((math.log(z) + math.log(y)) + (math.log(t) * (a + -0.5))) - t
function code(x, y, z, t, a) return Float64(Float64(Float64(log(z) + log(y)) + Float64(log(t) * Float64(a + -0.5))) - t) end
function tmp = code(x, y, z, t, a) tmp = ((log(z) + log(y)) + (log(t) * (a + -0.5))) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log z + \log y\right) + \log t \cdot \left(a + -0.5\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 68.2%
associate-+r+68.2%
sub-neg68.2%
metadata-eval68.2%
Simplified68.2%
Final simplification68.2%
(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 68.2%
Final simplification68.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.05e-5) (not (<= a 4.2e-36))) (- (* a (* (log (cbrt t)) 3.0)) t) (- (+ (* (log t) -0.5) (log (* y z))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.05e-5) || !(a <= 4.2e-36)) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else {
tmp = ((log(t) * -0.5) + log((y * z))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.05e-5) || !(a <= 4.2e-36)) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else {
tmp = ((Math.log(t) * -0.5) + Math.log((y * z))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.05e-5) || !(a <= 4.2e-36)) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); else tmp = Float64(Float64(Float64(log(t) * -0.5) + log(Float64(y * z))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.05e-5], N[Not[LessEqual[a, 4.2e-36]], $MachinePrecision]], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.05 \cdot 10^{-5} \lor \neg \left(a \leq 4.2 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log t \cdot -0.5 + \log \left(y \cdot z\right)\right) - t\\
\end{array}
\end{array}
if a < -3.04999999999999994e-5 or 4.19999999999999982e-36 < a Initial program 99.7%
add-exp-log52.9%
Applied egg-rr52.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 72.4%
Taylor expanded in a around inf 98.2%
*-commutative98.2%
associate-*r*98.1%
Simplified98.1%
if -3.04999999999999994e-5 < a < 4.19999999999999982e-36Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
*-un-lft-identity64.4%
+-commutative64.4%
sum-log48.6%
Applied egg-rr48.6%
*-lft-identity48.6%
Simplified48.6%
Final simplification72.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.00017) (not (<= a 9.5e-36))) (- (* a (* (log (cbrt t)) 3.0)) t) (- (log (* (pow t -0.5) (* y z))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.00017) || !(a <= 9.5e-36)) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else {
tmp = log((pow(t, -0.5) * (y * z))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.00017) || !(a <= 9.5e-36)) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else {
tmp = Math.log((Math.pow(t, -0.5) * (y * z))) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.00017) || !(a <= 9.5e-36)) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); else tmp = Float64(log(Float64((t ^ -0.5) * Float64(y * z))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.00017], N[Not[LessEqual[a, 9.5e-36]], $MachinePrecision]], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(N[Power[t, -0.5], $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00017 \lor \neg \left(a \leq 9.5 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log \left({t}^{-0.5} \cdot \left(y \cdot z\right)\right) - t\\
\end{array}
\end{array}
if a < -1.7e-4 or 9.5000000000000003e-36 < a Initial program 99.7%
add-exp-log52.9%
Applied egg-rr52.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 72.4%
Taylor expanded in a around inf 98.2%
*-commutative98.2%
associate-*r*98.1%
Simplified98.1%
if -1.7e-4 < a < 9.5000000000000003e-36Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
*-un-lft-identity64.4%
+-commutative64.4%
sum-log48.6%
add-log-exp48.6%
sum-log45.0%
add-exp-log44.8%
sum-log44.6%
+-commutative44.6%
sum-log44.8%
add-exp-log45.0%
*-commutative45.0%
pow-to-exp45.1%
Applied egg-rr45.1%
*-lft-identity45.1%
Simplified45.1%
Final simplification70.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.4e-5) (not (<= a 6e-36))) (- (* a (* (log (cbrt t)) 3.0)) 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 <= -1.4e-5) || !(a <= 6e-36)) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else {
tmp = log((y * (z * pow(t, -0.5)))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.4e-5) || !(a <= 6e-36)) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - 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 <= -1.4e-5) || !(a <= 6e-36)) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); else tmp = Float64(log(Float64(y * Float64(z * (t ^ -0.5)))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.4e-5], N[Not[LessEqual[a, 6e-36]], $MachinePrecision]], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-5} \lor \neg \left(a \leq 6 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -1.39999999999999998e-5 or 6.0000000000000003e-36 < a Initial program 99.7%
add-exp-log52.9%
Applied egg-rr52.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 72.4%
Taylor expanded in a around inf 98.2%
*-commutative98.2%
associate-*r*98.1%
Simplified98.1%
if -1.39999999999999998e-5 < a < 6.0000000000000003e-36Initial 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 64.4%
Taylor expanded in a around 0 64.4%
+-commutative64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
*-un-lft-identity64.4%
+-commutative64.4%
sum-log48.6%
add-log-exp48.6%
sum-log45.0%
add-exp-log44.8%
sum-log44.6%
+-commutative44.6%
sum-log44.8%
add-exp-log45.0%
*-commutative45.0%
pow-to-exp45.1%
Applied egg-rr45.1%
*-lft-identity45.1%
Simplified45.1%
add-sqr-sqrt22.0%
add-sqr-sqrt21.9%
difference-of-squares21.9%
associate-*l*21.2%
associate-*l*24.2%
Applied egg-rr24.2%
difference-of-squares24.2%
rem-square-sqrt46.5%
rem-square-sqrt46.8%
Simplified46.8%
Final simplification71.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 165000000000.0) (- (+ (log (* (+ x y) z)) (* (log t) (- a 0.5))) t) (- (* a (* (log (cbrt t)) 3.0)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 165000000000.0) {
tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5))) - t;
} else {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 165000000000.0) {
tmp = (Math.log(((x + y) * z)) + (Math.log(t) * (a - 0.5))) - t;
} else {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 165000000000.0) tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + Float64(log(t) * Float64(a - 0.5))) - t); else tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 165000000000.0], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 165000000000:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\end{array}
\end{array}
if t < 1.65e11Initial program 99.4%
associate-+l-99.4%
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.4%
fma-undefine99.4%
associate--r+99.4%
sum-log75.7%
Applied egg-rr75.7%
if 1.65e11 < t Initial program 99.9%
add-exp-log99.7%
Applied egg-rr99.7%
rem-exp-log99.9%
add-cube-cbrt99.9%
unpow299.9%
sum-log99.9%
log-pow99.9%
Applied egg-rr99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 77.7%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
associate-*r*99.7%
Simplified99.7%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.0) (not (<= a 9.5e-36))) (- (* a (* (log (cbrt t)) 3.0)) t) (+ (log y) (- (log z) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.0) || !(a <= 9.5e-36)) {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
} else {
tmp = log(y) + (log(z) - t);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.0) || !(a <= 9.5e-36)) {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
} else {
tmp = Math.log(y) + (Math.log(z) - t);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.0) || !(a <= 9.5e-36)) tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); else tmp = Float64(log(y) + Float64(log(z) - t)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 9.5e-36]], $MachinePrecision]], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 9.5 \cdot 10^{-36}\right):\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y + \left(\log z - t\right)\\
\end{array}
\end{array}
if a < -1 or 9.5000000000000003e-36 < a Initial program 99.7%
add-exp-log52.9%
Applied egg-rr52.9%
rem-exp-log99.7%
add-cube-cbrt99.7%
unpow299.7%
sum-log99.6%
log-pow99.6%
Applied egg-rr99.6%
distribute-lft1-in99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 72.4%
Taylor expanded in a around inf 98.2%
*-commutative98.2%
associate-*r*98.1%
Simplified98.1%
if -1 < a < 9.5000000000000003e-36Initial 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 64.4%
Taylor expanded in a around inf 42.6%
Taylor expanded in a around 0 42.6%
associate--l+42.6%
Simplified42.6%
Final simplification69.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 195000000000.0) (- (+ (* (log t) (+ a -0.5)) (log (* y z))) t) (- (* a (* (log (cbrt t)) 3.0)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 195000000000.0) {
tmp = ((log(t) * (a + -0.5)) + log((y * z))) - t;
} else {
tmp = (a * (log(cbrt(t)) * 3.0)) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 195000000000.0) {
tmp = ((Math.log(t) * (a + -0.5)) + Math.log((y * z))) - t;
} else {
tmp = (a * (Math.log(Math.cbrt(t)) * 3.0)) - t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 195000000000.0) tmp = Float64(Float64(Float64(log(t) * Float64(a + -0.5)) + log(Float64(y * z))) - t); else tmp = Float64(Float64(a * Float64(log(cbrt(t)) * 3.0)) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 195000000000.0], N[(N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(a * N[(N[Log[N[Power[t, 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 195000000000:\\
\;\;\;\;\left(\log t \cdot \left(a + -0.5\right) + \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(\log \left(\sqrt[3]{t}\right) \cdot 3\right) - t\\
\end{array}
\end{array}
if t < 1.95e11Initial program 99.4%
associate--l+99.4%
+-commutative99.4%
associate-+l+99.3%
+-commutative99.3%
fma-define99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 59.1%
*-un-lft-identity59.1%
add-log-exp27.8%
sum-log22.7%
exp-sum22.7%
add-exp-log22.8%
exp-to-pow22.9%
sub-neg22.9%
metadata-eval22.9%
Applied egg-rr22.9%
*-lft-identity22.9%
Simplified22.9%
associate-*r*23.3%
log-prod24.3%
log-pow44.0%
Applied egg-rr44.0%
if 1.95e11 < t Initial program 99.9%
add-exp-log99.7%
Applied egg-rr99.7%
rem-exp-log99.9%
add-cube-cbrt99.9%
unpow299.9%
sum-log99.9%
log-pow99.9%
Applied egg-rr99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 77.7%
Taylor expanded in a around inf 99.7%
*-commutative99.7%
associate-*r*99.7%
Simplified99.7%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 5.8e+20) (* a (log t)) (+ -1.0 (- 1.0 t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 5.8e+20) {
tmp = a * log(t);
} else {
tmp = -1.0 + (1.0 - 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 <= 5.8d+20) then
tmp = a * log(t)
else
tmp = (-1.0d0) + (1.0d0 - 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 <= 5.8e+20) {
tmp = a * Math.log(t);
} else {
tmp = -1.0 + (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 5.8e+20: tmp = a * math.log(t) else: tmp = -1.0 + (1.0 - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 5.8e+20) tmp = Float64(a * log(t)); else tmp = Float64(-1.0 + Float64(1.0 - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 5.8e+20) tmp = a * log(t); else tmp = -1.0 + (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 5.8e+20], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.8 \cdot 10^{+20}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(1 - t\right)\\
\end{array}
\end{array}
if t < 5.8e20Initial program 99.4%
associate-+l-99.4%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in a around inf 48.6%
*-commutative48.6%
Simplified48.6%
if 5.8e20 < t Initial program 99.9%
associate-+l-99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 84.1%
neg-mul-184.1%
Simplified84.1%
expm1-log1p-u0.0%
expm1-undefine0.0%
Applied egg-rr0.0%
sub-neg0.0%
log1p-undefine0.0%
rem-exp-log84.1%
unsub-neg84.1%
metadata-eval84.1%
Simplified84.1%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (+ -1.0 (* t (+ -1.0 (/ 1.0 t)))))
double code(double x, double y, double z, double t, double a) {
return -1.0 + (t * (-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) + (t * ((-1.0d0) + (1.0d0 / t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return -1.0 + (t * (-1.0 + (1.0 / t)));
}
def code(x, y, z, t, a): return -1.0 + (t * (-1.0 + (1.0 / t)))
function code(x, y, z, t, a) return Float64(-1.0 + Float64(t * Float64(-1.0 + Float64(1.0 / t)))) end
function tmp = code(x, y, z, t, a) tmp = -1.0 + (t * (-1.0 + (1.0 / t))); end
code[x_, y_, z_, t_, a_] := N[(-1.0 + N[(t * N[(-1.0 + N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-1 + t \cdot \left(-1 + \frac{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 41.9%
neg-mul-141.9%
Simplified41.9%
expm1-log1p-u1.3%
expm1-undefine1.3%
Applied egg-rr1.3%
sub-neg1.3%
log1p-undefine1.3%
rem-exp-log41.9%
unsub-neg41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in t around inf 41.9%
Final simplification41.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 41.9%
neg-mul-141.9%
Simplified41.9%
expm1-log1p-u1.3%
expm1-undefine1.3%
Applied egg-rr1.3%
sub-neg1.3%
log1p-undefine1.3%
rem-exp-log41.9%
unsub-neg41.9%
metadata-eval41.9%
Simplified41.9%
Final simplification41.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.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t around inf 41.9%
neg-mul-141.9%
Simplified41.9%
(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 41.9%
neg-mul-141.9%
Simplified41.9%
expm1-log1p-u1.3%
expm1-undefine1.3%
Applied egg-rr1.3%
sub-neg1.3%
log1p-undefine1.3%
rem-exp-log41.9%
unsub-neg41.9%
metadata-eval41.9%
Simplified41.9%
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 2024165
(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))))