
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (fma (+ a -0.5) (log t) (log (+ x y)))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + fma((a + -0.5), log(t), log((x + y)));
}
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + fma(Float64(a + -0.5), log(t), log(Float64(x + y)))) end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \mathsf{fma}\left(a + -0.5, \log t, \log \left(x + y\right)\right)
\end{array}
Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t 0.00046)
(+ (+ (log z) (log y)) (* (+ a -0.5) (log t)))
(if (<= t 1.38e+144)
(* t (+ (+ (/ (log (* z (+ x y))) t) (* (log t) (/ (+ a -0.5) t))) -1.0))
(+ -1.0 (- 1.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.00046) {
tmp = (log(z) + log(y)) + ((a + -0.5) * log(t));
} else if (t <= 1.38e+144) {
tmp = t * (((log((z * (x + y))) / t) + (log(t) * ((a + -0.5) / t))) + -1.0);
} 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 <= 0.00046d0) then
tmp = (log(z) + log(y)) + ((a + (-0.5d0)) * log(t))
else if (t <= 1.38d+144) then
tmp = t * (((log((z * (x + y))) / t) + (log(t) * ((a + (-0.5d0)) / t))) + (-1.0d0))
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 <= 0.00046) {
tmp = (Math.log(z) + Math.log(y)) + ((a + -0.5) * Math.log(t));
} else if (t <= 1.38e+144) {
tmp = t * (((Math.log((z * (x + y))) / t) + (Math.log(t) * ((a + -0.5) / t))) + -1.0);
} else {
tmp = -1.0 + (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.00046: tmp = (math.log(z) + math.log(y)) + ((a + -0.5) * math.log(t)) elif t <= 1.38e+144: tmp = t * (((math.log((z * (x + y))) / t) + (math.log(t) * ((a + -0.5) / t))) + -1.0) else: tmp = -1.0 + (1.0 - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.00046) tmp = Float64(Float64(log(z) + log(y)) + Float64(Float64(a + -0.5) * log(t))); elseif (t <= 1.38e+144) tmp = Float64(t * Float64(Float64(Float64(log(Float64(z * Float64(x + y))) / t) + Float64(log(t) * Float64(Float64(a + -0.5) / t))) + -1.0)); 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 <= 0.00046) tmp = (log(z) + log(y)) + ((a + -0.5) * log(t)); elseif (t <= 1.38e+144) tmp = t * (((log((z * (x + y))) / t) + (log(t) * ((a + -0.5) / t))) + -1.0); else tmp = -1.0 + (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.00046], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.38e+144], N[(t * N[(N[(N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.00046:\\
\;\;\;\;\left(\log z + \log y\right) + \left(a + -0.5\right) \cdot \log t\\
\mathbf{elif}\;t \leq 1.38 \cdot 10^{+144}:\\
\;\;\;\;t \cdot \left(\left(\frac{\log \left(z \cdot \left(x + y\right)\right)}{t} + \log t \cdot \frac{a + -0.5}{t}\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(1 - t\right)\\
\end{array}
\end{array}
if t < 4.6000000000000001e-4Initial program 99.3%
remove-double-neg99.3%
associate--l+99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
add-sqr-sqrt56.8%
pow256.8%
+-commutative56.8%
*-commutative56.8%
fma-define56.8%
associate-+r-56.8%
sum-log36.5%
Applied egg-rr36.5%
Taylor expanded in t around 0 70.2%
+-commutative70.2%
sub-neg70.2%
metadata-eval70.2%
+-commutative70.2%
Simplified70.2%
Taylor expanded in y around inf 64.8%
mul-1-neg64.8%
log-rec64.8%
remove-double-neg64.8%
Simplified64.8%
if 4.6000000000000001e-4 < t < 1.37999999999999998e144Initial program 99.6%
remove-double-neg99.6%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt25.4%
pow225.4%
+-commutative25.4%
*-commutative25.4%
fma-define25.4%
associate-+r-25.4%
sum-log22.5%
Applied egg-rr22.5%
Taylor expanded in t around inf 74.1%
sub-neg74.1%
+-commutative74.1%
mul-1-neg74.1%
unsub-neg74.1%
+-commutative74.1%
sub-neg74.1%
metadata-eval74.1%
associate-/l*74.1%
log-rec74.1%
metadata-eval74.1%
Simplified74.1%
if 1.37999999999999998e144 < t Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 89.2%
neg-mul-189.2%
Simplified89.2%
expm1-log1p-u0.0%
expm1-undefine0.0%
Applied egg-rr0.0%
sub-neg0.0%
log1p-undefine0.0%
rem-exp-log89.2%
unsub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Final simplification73.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t 0.00048)
(+ (log y) (+ (log z) (* (log t) (- a 0.5))))
(if (<= t 5.2e+143)
(* t (+ (+ (/ (log (* z (+ x y))) t) (* (log t) (/ (+ a -0.5) t))) -1.0))
(+ -1.0 (- 1.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.00048) {
tmp = log(y) + (log(z) + (log(t) * (a - 0.5)));
} else if (t <= 5.2e+143) {
tmp = t * (((log((z * (x + y))) / t) + (log(t) * ((a + -0.5) / t))) + -1.0);
} 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 <= 0.00048d0) then
tmp = log(y) + (log(z) + (log(t) * (a - 0.5d0)))
else if (t <= 5.2d+143) then
tmp = t * (((log((z * (x + y))) / t) + (log(t) * ((a + (-0.5d0)) / t))) + (-1.0d0))
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 <= 0.00048) {
tmp = Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)));
} else if (t <= 5.2e+143) {
tmp = t * (((Math.log((z * (x + y))) / t) + (Math.log(t) * ((a + -0.5) / t))) + -1.0);
} else {
tmp = -1.0 + (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.00048: tmp = math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5))) elif t <= 5.2e+143: tmp = t * (((math.log((z * (x + y))) / t) + (math.log(t) * ((a + -0.5) / t))) + -1.0) else: tmp = -1.0 + (1.0 - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.00048) tmp = Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))); elseif (t <= 5.2e+143) tmp = Float64(t * Float64(Float64(Float64(log(Float64(z * Float64(x + y))) / t) + Float64(log(t) * Float64(Float64(a + -0.5) / t))) + -1.0)); 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 <= 0.00048) tmp = log(y) + (log(z) + (log(t) * (a - 0.5))); elseif (t <= 5.2e+143) tmp = t * (((log((z * (x + y))) / t) + (log(t) * ((a + -0.5) / t))) + -1.0); else tmp = -1.0 + (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.00048], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+143], N[(t * N[(N[(N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(N[(a + -0.5), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.00048:\\
\;\;\;\;\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+143}:\\
\;\;\;\;t \cdot \left(\left(\frac{\log \left(z \cdot \left(x + y\right)\right)}{t} + \log t \cdot \frac{a + -0.5}{t}\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(1 - t\right)\\
\end{array}
\end{array}
if t < 4.80000000000000012e-4Initial program 99.3%
+-commutative99.3%
associate--l+99.3%
associate-+r+99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 65.4%
Taylor expanded in t around 0 64.8%
if 4.80000000000000012e-4 < t < 5.1999999999999998e143Initial program 99.6%
remove-double-neg99.6%
associate--l+99.7%
remove-double-neg99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
add-sqr-sqrt25.4%
pow225.4%
+-commutative25.4%
*-commutative25.4%
fma-define25.4%
associate-+r-25.4%
sum-log22.5%
Applied egg-rr22.5%
Taylor expanded in t around inf 74.1%
sub-neg74.1%
+-commutative74.1%
mul-1-neg74.1%
unsub-neg74.1%
+-commutative74.1%
sub-neg74.1%
metadata-eval74.1%
associate-/l*74.1%
log-rec74.1%
metadata-eval74.1%
Simplified74.1%
if 5.1999999999999998e143 < t Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 89.2%
neg-mul-189.2%
Simplified89.2%
expm1-log1p-u0.0%
expm1-undefine0.0%
Applied egg-rr0.0%
sub-neg0.0%
log1p-undefine0.0%
rem-exp-log89.2%
unsub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (+ (+ (- (log z) t) (log (+ x y))) (* (+ a -0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log(z) - t) + log((x + 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((x + 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((x + y))) + ((a + -0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log(z) - t) + math.log((x + y))) + ((a + -0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(z) - t) + log(Float64(x + y))) + Float64(Float64(a + -0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log(z) - t) + log((x + y))) + ((a + -0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log z - t\right) + \log \left(x + y\right)\right) + \left(a + -0.5\right) \cdot \log t
\end{array}
Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(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(log(z) + log(y)) + Float64(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[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z + \log y\right) + \left(\log t \cdot \left(a - 0.5\right) - 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 x around 0 70.1%
Final simplification70.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.9e+53) (not (<= a 6e+29))) (* a (log t)) (- (log (* z (* (+ x y) (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e+53) || !(a <= 6e+29)) {
tmp = a * log(t);
} else {
tmp = log((z * ((x + y) * 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 <= (-2.9d+53)) .or. (.not. (a <= 6d+29))) then
tmp = a * log(t)
else
tmp = log((z * ((x + y) * (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 <= -2.9e+53) || !(a <= 6e+29)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log((z * ((x + y) * Math.pow(t, -0.5)))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.9e+53) or not (a <= 6e+29): tmp = a * math.log(t) else: tmp = math.log((z * ((x + y) * math.pow(t, -0.5)))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e+53) || !(a <= 6e+29)) tmp = Float64(a * log(t)); else tmp = Float64(log(Float64(z * Float64(Float64(x + y) * (t ^ -0.5)))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.9e+53) || ~((a <= 6e+29))) tmp = a * log(t); else tmp = log((z * ((x + y) * (t ^ -0.5)))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e+53], N[Not[LessEqual[a, 6e+29]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(z * N[(N[(x + y), $MachinePrecision] * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+53} \lor \neg \left(a \leq 6 \cdot 10^{+29}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log \left(z \cdot \left(\left(x + y\right) \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -2.9000000000000002e53 or 5.9999999999999998e29 < 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 81.8%
*-commutative81.8%
Simplified81.8%
if -2.9000000000000002e53 < a < 5.9999999999999998e29Initial program 99.5%
+-commutative99.5%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 93.1%
add-log-exp85.9%
sum-log68.3%
exp-sum68.3%
add-exp-log68.4%
+-commutative68.4%
*-commutative68.4%
exp-to-pow68.5%
Applied egg-rr68.5%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -14.0) (not (<= a 5.2))) (* a (log t)) (- (log (* y (* z (pow t (+ a -0.5))))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -14.0) || !(a <= 5.2)) {
tmp = a * log(t);
} else {
tmp = log((y * (z * pow(t, (a + -0.5))))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-14.0d0)) .or. (.not. (a <= 5.2d0))) then
tmp = a * log(t)
else
tmp = log((y * (z * (t ** (a + (-0.5d0)))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -14.0) || !(a <= 5.2)) {
tmp = a * Math.log(t);
} else {
tmp = Math.log((y * (z * Math.pow(t, (a + -0.5))))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -14.0) or not (a <= 5.2): tmp = a * math.log(t) else: tmp = math.log((y * (z * math.pow(t, (a + -0.5))))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -14.0) || !(a <= 5.2)) tmp = Float64(a * log(t)); else tmp = Float64(log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -14.0) || ~((a <= 5.2))) tmp = a * log(t); else tmp = log((y * (z * (t ^ (a + -0.5))))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -14.0], N[Not[LessEqual[a, 5.2]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -14 \lor \neg \left(a \leq 5.2\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right) - t\\
\end{array}
\end{array}
if a < -14 or 5.20000000000000018 < 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 76.5%
*-commutative76.5%
Simplified76.5%
if -14 < a < 5.20000000000000018Initial program 99.5%
+-commutative99.5%
associate--l+99.5%
associate-+r+99.5%
+-commutative99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 63.6%
add-log-exp54.2%
sum-log43.1%
exp-sum43.1%
add-exp-log43.2%
sub-neg43.2%
metadata-eval43.2%
exp-to-pow43.2%
Applied egg-rr43.2%
Final simplification61.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 9.5e+143) (+ (- (log (* z (+ x y))) t) (* (log t) (- a 0.5))) (+ -1.0 (- 1.0 t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9.5e+143) {
tmp = (log((z * (x + y))) - t) + (log(t) * (a - 0.5));
} 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 <= 9.5d+143) then
tmp = (log((z * (x + y))) - t) + (log(t) * (a - 0.5d0))
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 <= 9.5e+143) {
tmp = (Math.log((z * (x + y))) - t) + (Math.log(t) * (a - 0.5));
} else {
tmp = -1.0 + (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9.5e+143: tmp = (math.log((z * (x + y))) - t) + (math.log(t) * (a - 0.5)) else: tmp = -1.0 + (1.0 - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9.5e+143) tmp = Float64(Float64(log(Float64(z * Float64(x + y))) - t) + Float64(log(t) * Float64(a - 0.5))); 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 <= 9.5e+143) tmp = (log((z * (x + y))) - t) + (log(t) * (a - 0.5)); else tmp = -1.0 + (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9.5e+143], N[(N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \cdot 10^{+143}:\\
\;\;\;\;\left(\log \left(z \cdot \left(x + y\right)\right) - t\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(1 - t\right)\\
\end{array}
\end{array}
if t < 9.50000000000000066e143Initial program 99.4%
sum-log71.5%
Applied egg-rr71.5%
if 9.50000000000000066e143 < t Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 89.2%
neg-mul-189.2%
Simplified89.2%
expm1-log1p-u0.0%
expm1-undefine0.0%
Applied egg-rr0.0%
sub-neg0.0%
log1p-undefine0.0%
rem-exp-log89.2%
unsub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Final simplification76.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e+53) (not (<= a 1.9e+35))) (* a (log t)) (+ (- (log z) t) (log (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e+53) || !(a <= 1.9e+35)) {
tmp = a * log(t);
} else {
tmp = (log(z) - t) + log((x + y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.5d+53)) .or. (.not. (a <= 1.9d+35))) then
tmp = a * log(t)
else
tmp = (log(z) - t) + log((x + y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e+53) || !(a <= 1.9e+35)) {
tmp = a * Math.log(t);
} else {
tmp = (Math.log(z) - t) + Math.log((x + y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e+53) or not (a <= 1.9e+35): tmp = a * math.log(t) else: tmp = (math.log(z) - t) + math.log((x + y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e+53) || !(a <= 1.9e+35)) tmp = Float64(a * log(t)); else tmp = Float64(Float64(log(z) - t) + log(Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e+53) || ~((a <= 1.9e+35))) tmp = a * log(t); else tmp = (log(z) - t) + log((x + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e+53], N[Not[LessEqual[a, 1.9e+35]], $MachinePrecision]], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+53} \lor \neg \left(a \leq 1.9 \cdot 10^{+35}\right):\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(\log z - t\right) + \log \left(x + y\right)\\
\end{array}
\end{array}
if a < -5.49999999999999975e53 or 1.9e35 < 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 83.1%
*-commutative83.1%
Simplified83.1%
if -5.49999999999999975e53 < a < 1.9e35Initial program 99.5%
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 61.6%
Final simplification71.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t 9500000.0)
(+ (* (+ a -0.5) (log t)) (log (* z y)))
(if (<= t 6e+34)
(+ (- (log z) t) (log (+ x y)))
(if (<= t 1e+88) (* a (log t)) (- t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9500000.0) {
tmp = ((a + -0.5) * log(t)) + log((z * y));
} else if (t <= 6e+34) {
tmp = (log(z) - t) + log((x + y));
} else if (t <= 1e+88) {
tmp = a * log(t);
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 9500000.0d0) then
tmp = ((a + (-0.5d0)) * log(t)) + log((z * y))
else if (t <= 6d+34) then
tmp = (log(z) - t) + log((x + y))
else if (t <= 1d+88) then
tmp = a * log(t)
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9500000.0) {
tmp = ((a + -0.5) * Math.log(t)) + Math.log((z * y));
} else if (t <= 6e+34) {
tmp = (Math.log(z) - t) + Math.log((x + y));
} else if (t <= 1e+88) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9500000.0: tmp = ((a + -0.5) * math.log(t)) + math.log((z * y)) elif t <= 6e+34: tmp = (math.log(z) - t) + math.log((x + y)) elif t <= 1e+88: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9500000.0) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) + log(Float64(z * y))); elseif (t <= 6e+34) tmp = Float64(Float64(log(z) - t) + log(Float64(x + y))); elseif (t <= 1e+88) tmp = Float64(a * log(t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 9500000.0) tmp = ((a + -0.5) * log(t)) + log((z * y)); elseif (t <= 6e+34) tmp = (log(z) - t) + log((x + y)); elseif (t <= 1e+88) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9500000.0], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+34], N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+88], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9500000:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t + \log \left(z \cdot y\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+34}:\\
\;\;\;\;\left(\log z - t\right) + \log \left(x + y\right)\\
\mathbf{elif}\;t \leq 10^{+88}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 9.5e6Initial program 99.3%
remove-double-neg99.3%
associate--l+99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
add-sqr-sqrt56.9%
pow256.9%
+-commutative56.9%
*-commutative56.9%
fma-define56.9%
associate-+r-56.9%
sum-log37.4%
Applied egg-rr37.4%
Taylor expanded in t around 0 69.0%
+-commutative69.0%
sub-neg69.0%
metadata-eval69.0%
+-commutative69.0%
Simplified69.0%
Taylor expanded in x around 0 45.4%
*-commutative45.4%
Simplified45.4%
if 9.5e6 < t < 6.00000000000000037e34Initial program 99.7%
associate-+l-99.7%
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 56.9%
if 6.00000000000000037e34 < t < 9.99999999999999959e87Initial program 99.8%
associate-+l-99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
fma-undefine99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in a around inf 73.5%
*-commutative73.5%
Simplified73.5%
if 9.99999999999999959e87 < 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 85.1%
neg-mul-185.1%
Simplified85.1%
Final simplification62.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.75e+143) (- (+ (log (* z y)) (* (log t) (- a 0.5))) t) (+ -1.0 (- 1.0 t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.75e+143) {
tmp = (log((z * y)) + (log(t) * (a - 0.5))) - 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 <= 2.75d+143) then
tmp = (log((z * y)) + (log(t) * (a - 0.5d0))) - 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 <= 2.75e+143) {
tmp = (Math.log((z * y)) + (Math.log(t) * (a - 0.5))) - t;
} else {
tmp = -1.0 + (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.75e+143: tmp = (math.log((z * y)) + (math.log(t) * (a - 0.5))) - t else: tmp = -1.0 + (1.0 - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.75e+143) tmp = Float64(Float64(log(Float64(z * y)) + Float64(log(t) * Float64(a - 0.5))) - 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 <= 2.75e+143) tmp = (log((z * y)) + (log(t) * (a - 0.5))) - t; else tmp = -1.0 + (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.75e+143], N[(N[(N[Log[N[(z * y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(-1.0 + N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.75 \cdot 10^{+143}:\\
\;\;\;\;\left(\log \left(z \cdot y\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;-1 + \left(1 - t\right)\\
\end{array}
\end{array}
if t < 2.74999999999999985e143Initial program 99.4%
remove-double-neg99.4%
associate--l+99.4%
remove-double-neg99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
add-sqr-sqrt46.2%
pow246.2%
+-commutative46.2%
*-commutative46.2%
fma-define46.2%
associate-+r-46.2%
sum-log31.8%
Applied egg-rr31.8%
Taylor expanded in x around 0 49.9%
if 2.74999999999999985e143 < t Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 89.2%
neg-mul-189.2%
Simplified89.2%
expm1-log1p-u0.0%
expm1-undefine0.0%
Applied egg-rr0.0%
sub-neg0.0%
log1p-undefine0.0%
rem-exp-log89.2%
unsub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.66e+87) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.66e+87) {
tmp = a * log(t);
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 1.66d+87) then
tmp = a * log(t)
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.66e+87) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.66e+87: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.66e+87) tmp = Float64(a * log(t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.66e+87) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.66e+87], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.66 \cdot 10^{+87}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.65999999999999994e87Initial program 99.4%
associate-+l-99.4%
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 57.8%
*-commutative57.8%
Simplified57.8%
if 1.65999999999999994e87 < 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 85.1%
neg-mul-185.1%
Simplified85.1%
Final simplification67.4%
(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 37.5%
neg-mul-137.5%
Simplified37.5%
(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 37.5%
neg-mul-137.5%
Simplified37.5%
expm1-log1p-u1.4%
expm1-undefine1.3%
Applied egg-rr1.3%
sub-neg1.3%
log1p-undefine1.3%
rem-exp-log37.4%
unsub-neg37.4%
metadata-eval37.4%
Simplified37.4%
Taylor expanded in t around 0 2.3%
metadata-eval2.3%
Applied egg-rr2.3%
(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 2024185
(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))))