
(FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ (+ alpha beta) (* 2.0 1.0)))) (/ (/ (/ (+ (+ (+ alpha beta) (* beta alpha)) 1.0) t_0) t_0) (+ t_0 1.0))))
double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = (alpha + beta) + (2.0d0 * 1.0d0)
code = (((((alpha + beta) + (beta * alpha)) + 1.0d0) / t_0) / t_0) / (t_0 + 1.0d0)
end function
public static double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
def code(alpha, beta): t_0 = (alpha + beta) + (2.0 * 1.0) return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0)
function code(alpha, beta) t_0 = Float64(Float64(alpha + beta) + Float64(2.0 * 1.0)) return Float64(Float64(Float64(Float64(Float64(Float64(alpha + beta) + Float64(beta * alpha)) + 1.0) / t_0) / t_0) / Float64(t_0 + 1.0)) end
function tmp = code(alpha, beta) t_0 = (alpha + beta) + (2.0 * 1.0); tmp = (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0); end
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(alpha + beta), $MachinePrecision] + N[(2.0 * 1.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(alpha + beta), $MachinePrecision] + N[(beta * alpha), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\alpha + \beta\right) + 2 \cdot 1\\
\frac{\frac{\frac{\left(\left(\alpha + \beta\right) + \beta \cdot \alpha\right) + 1}{t\_0}}{t\_0}}{t\_0 + 1}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ (+ alpha beta) (* 2.0 1.0)))) (/ (/ (/ (+ (+ (+ alpha beta) (* beta alpha)) 1.0) t_0) t_0) (+ t_0 1.0))))
double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = (alpha + beta) + (2.0d0 * 1.0d0)
code = (((((alpha + beta) + (beta * alpha)) + 1.0d0) / t_0) / t_0) / (t_0 + 1.0d0)
end function
public static double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
def code(alpha, beta): t_0 = (alpha + beta) + (2.0 * 1.0) return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0)
function code(alpha, beta) t_0 = Float64(Float64(alpha + beta) + Float64(2.0 * 1.0)) return Float64(Float64(Float64(Float64(Float64(Float64(alpha + beta) + Float64(beta * alpha)) + 1.0) / t_0) / t_0) / Float64(t_0 + 1.0)) end
function tmp = code(alpha, beta) t_0 = (alpha + beta) + (2.0 * 1.0); tmp = (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0); end
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(alpha + beta), $MachinePrecision] + N[(2.0 * 1.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(alpha + beta), $MachinePrecision] + N[(beta * alpha), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\alpha + \beta\right) + 2 \cdot 1\\
\frac{\frac{\frac{\left(\left(\alpha + \beta\right) + \beta \cdot \alpha\right) + 1}{t\_0}}{t\_0}}{t\_0 + 1}
\end{array}
\end{array}
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ alpha (+ beta 2.0)))) (* (/ (/ (+ 1.0 alpha) t_0) t_0) (/ (+ 1.0 beta) (+ alpha (+ beta 3.0))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (alpha + (beta + 3.0)));
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = alpha + (beta + 2.0d0)
code = (((1.0d0 + alpha) / t_0) / t_0) * ((1.0d0 + beta) / (alpha + (beta + 3.0d0)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (alpha + (beta + 3.0)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (alpha + (beta + 3.0)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) return Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0) * Float64(Float64(1.0 + beta) / Float64(alpha + Float64(beta + 3.0)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (alpha + (beta + 3.0)));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\frac{\frac{1 + \alpha}{t\_0}}{t\_0} \cdot \frac{1 + \beta}{\alpha + \left(\beta + 3\right)}
\end{array}
\end{array}
Initial program 93.3%
Simplified82.8%
times-frac95.2%
+-commutative95.2%
Applied egg-rr95.2%
associate-*r/95.3%
+-commutative95.3%
+-commutative95.3%
+-commutative95.3%
+-commutative95.3%
+-commutative95.3%
+-commutative95.3%
+-commutative95.3%
associate-+r+95.3%
+-commutative95.3%
+-commutative95.3%
Simplified95.3%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.7%
Applied egg-rr99.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 3.0))) (t_1 (+ alpha (+ beta 2.0))))
(if (<= alpha 2.55e+14)
(* (/ (- -1.0 alpha) t_1) (/ (- -1.0 beta) (* t_1 t_0)))
(* (/ (+ 1.0 beta) t_0) (/ (/ alpha t_1) t_1)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double t_1 = alpha + (beta + 2.0);
double tmp;
if (alpha <= 2.55e+14) {
tmp = ((-1.0 - alpha) / t_1) * ((-1.0 - beta) / (t_1 * t_0));
} else {
tmp = ((1.0 + beta) / t_0) * ((alpha / t_1) / t_1);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = alpha + (beta + 3.0d0)
t_1 = alpha + (beta + 2.0d0)
if (alpha <= 2.55d+14) then
tmp = (((-1.0d0) - alpha) / t_1) * (((-1.0d0) - beta) / (t_1 * t_0))
else
tmp = ((1.0d0 + beta) / t_0) * ((alpha / t_1) / t_1)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double t_1 = alpha + (beta + 2.0);
double tmp;
if (alpha <= 2.55e+14) {
tmp = ((-1.0 - alpha) / t_1) * ((-1.0 - beta) / (t_1 * t_0));
} else {
tmp = ((1.0 + beta) / t_0) * ((alpha / t_1) / t_1);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 3.0) t_1 = alpha + (beta + 2.0) tmp = 0 if alpha <= 2.55e+14: tmp = ((-1.0 - alpha) / t_1) * ((-1.0 - beta) / (t_1 * t_0)) else: tmp = ((1.0 + beta) / t_0) * ((alpha / t_1) / t_1) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 3.0)) t_1 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (alpha <= 2.55e+14) tmp = Float64(Float64(Float64(-1.0 - alpha) / t_1) * Float64(Float64(-1.0 - beta) / Float64(t_1 * t_0))); else tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(alpha / t_1) / t_1)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 3.0);
t_1 = alpha + (beta + 2.0);
tmp = 0.0;
if (alpha <= 2.55e+14)
tmp = ((-1.0 - alpha) / t_1) * ((-1.0 - beta) / (t_1 * t_0));
else
tmp = ((1.0 + beta) / t_0) * ((alpha / t_1) / t_1);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[alpha, 2.55e+14], N[(N[(N[(-1.0 - alpha), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(N[(-1.0 - beta), $MachinePrecision] / N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(alpha / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 3\right)\\
t_1 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\alpha \leq 2.55 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1 - \alpha}{t\_1} \cdot \frac{-1 - \beta}{t\_1 \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \beta}{t\_0} \cdot \frac{\frac{\alpha}{t\_1}}{t\_1}\\
\end{array}
\end{array}
if alpha < 2.55e14Initial program 99.8%
Simplified93.8%
times-frac99.4%
+-commutative99.4%
Applied egg-rr99.4%
if 2.55e14 < alpha Initial program 82.4%
Simplified64.5%
times-frac88.3%
+-commutative88.3%
Applied egg-rr88.3%
associate-*r/88.3%
+-commutative88.3%
+-commutative88.3%
+-commutative88.3%
+-commutative88.3%
+-commutative88.3%
+-commutative88.3%
+-commutative88.3%
associate-+r+88.3%
+-commutative88.3%
+-commutative88.3%
Simplified88.3%
times-frac99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
Applied egg-rr99.6%
Taylor expanded in alpha around inf 99.6%
Final simplification99.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 1.75e+15)
(/ (/ (+ 1.0 (+ alpha beta)) t_0) (* t_0 (+ 3.0 (+ alpha beta))))
(/ (/ (+ 1.0 alpha) t_0) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.75e+15) {
tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * (3.0 + (alpha + beta)));
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 1.75d+15) then
tmp = ((1.0d0 + (alpha + beta)) / t_0) / (t_0 * (3.0d0 + (alpha + beta)))
else
tmp = ((1.0d0 + alpha) / t_0) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.75e+15) {
tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * (3.0 + (alpha + beta)));
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1.75e+15: tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * (3.0 + (alpha + beta))) else: tmp = ((1.0 + alpha) / t_0) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 1.75e+15) tmp = Float64(Float64(Float64(1.0 + Float64(alpha + beta)) / t_0) / Float64(t_0 * Float64(3.0 + Float64(alpha + beta)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 1.75e+15)
tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * (3.0 + (alpha + beta)));
else
tmp = ((1.0 + alpha) / t_0) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.75e+15], N[(N[(N[(1.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 * N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 1.75 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \left(\alpha + \beta\right)}{t\_0}}{t\_0 \cdot \left(3 + \left(\alpha + \beta\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if beta < 1.75e15Initial program 99.8%
associate-/l/99.7%
+-commutative99.7%
associate-+l+99.7%
*-commutative99.7%
metadata-eval99.7%
associate-+l+99.7%
metadata-eval99.7%
associate-+l+99.7%
metadata-eval99.7%
metadata-eval99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in alpha around 0 98.6%
if 1.75e15 < beta Initial program 80.3%
Simplified61.4%
times-frac86.5%
+-commutative86.5%
Applied egg-rr86.5%
associate-*r/86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
associate-+r+86.7%
+-commutative86.7%
+-commutative86.7%
Simplified86.7%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
Applied egg-rr99.7%
*-commutative99.7%
clear-num99.6%
frac-times98.9%
*-un-lft-identity98.9%
associate-+r+98.9%
+-commutative98.9%
associate-+l+98.9%
Applied egg-rr98.9%
Taylor expanded in beta around inf 80.5%
Final simplification92.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 1.75e+15)
(/ (/ (+ 1.0 beta) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0)))
(/ (/ (+ 1.0 alpha) t_0) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.75e+15) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 1.75d+15) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / t_0) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.75e+15) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1.75e+15: tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / t_0) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 1.75e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 1.75e+15)
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / t_0) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.75e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 1.75 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if beta < 1.75e15Initial program 99.8%
Simplified93.7%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in alpha around 0 58.5%
+-commutative58.5%
*-commutative58.5%
+-commutative58.5%
Simplified58.5%
if 1.75e15 < beta Initial program 80.3%
Simplified61.4%
times-frac86.5%
+-commutative86.5%
Applied egg-rr86.5%
associate-*r/86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
+-commutative86.7%
associate-+r+86.7%
+-commutative86.7%
+-commutative86.7%
Simplified86.7%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
Applied egg-rr99.7%
*-commutative99.7%
clear-num99.6%
frac-times98.9%
*-un-lft-identity98.9%
associate-+r+98.9%
+-commutative98.9%
associate-+l+98.9%
Applied egg-rr98.9%
Taylor expanded in beta around inf 80.5%
Final simplification65.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1e+16) (/ (/ (+ 1.0 beta) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0))) (/ (/ (+ 1.0 alpha) beta) (* beta (- (/ (- alpha -3.0) beta) -1.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1e+16) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (beta * (((alpha - -3.0) / beta) - -1.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 1d+16) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (beta * (((alpha - (-3.0d0)) / beta) - (-1.0d0)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1e+16) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (beta * (((alpha - -3.0) / beta) - -1.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1e+16: tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (beta * (((alpha - -3.0) / beta) - -1.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1e+16) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(beta * Float64(Float64(Float64(alpha - -3.0) / beta) - -1.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1e+16)
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (beta * (((alpha - -3.0) / beta) - -1.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 1e+16], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta * N[(N[(N[(alpha - -3.0), $MachinePrecision] / beta), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 10^{+16}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta \cdot \left(\frac{\alpha - -3}{\beta} - -1\right)}\\
\end{array}
\end{array}
if beta < 1e16Initial program 99.8%
Simplified93.7%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in alpha around 0 58.5%
+-commutative58.5%
*-commutative58.5%
+-commutative58.5%
Simplified58.5%
if 1e16 < beta Initial program 80.3%
Taylor expanded in beta around inf 80.0%
Taylor expanded in beta around -inf 80.0%
associate-*r*80.0%
mul-1-neg80.0%
sub-neg80.0%
associate-*r/80.0%
distribute-lft-in80.0%
metadata-eval80.0%
metadata-eval80.0%
mul-1-neg80.0%
unsub-neg80.0%
metadata-eval80.0%
metadata-eval80.0%
Simplified80.0%
Final simplification65.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.4e+15) (/ (/ (+ 1.0 beta) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ 3.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4e+15) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.4d+15) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (3.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4e+15) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.4e+15: tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.4e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(3.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.4e+15)
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.4e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{3 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 5.4e15Initial program 99.8%
Simplified93.7%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in alpha around 0 58.5%
+-commutative58.5%
*-commutative58.5%
+-commutative58.5%
Simplified58.5%
if 5.4e15 < beta Initial program 80.3%
Taylor expanded in beta around inf 80.0%
div-inv79.9%
metadata-eval79.9%
associate-+l+79.9%
metadata-eval79.9%
associate-+r+79.9%
Applied egg-rr79.9%
associate-*r/80.0%
*-rgt-identity80.0%
associate-+r+80.0%
+-commutative80.0%
Simplified80.0%
Final simplification65.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 21.0) (/ (/ (+ 1.0 alpha) (+ alpha 2.0)) (* (+ alpha 2.0) (+ alpha 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ 3.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 21.0) {
tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 21.0d0) then
tmp = ((1.0d0 + alpha) / (alpha + 2.0d0)) / ((alpha + 2.0d0) * (alpha + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (3.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 21.0) {
tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 21.0: tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 21.0) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0)) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(3.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 21.0)
tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (3.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 21.0], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 21:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + 2}}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{3 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 21Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around 0 96.7%
Taylor expanded in beta around 0 96.8%
if 21 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
div-inv76.0%
metadata-eval76.0%
associate-+l+76.0%
metadata-eval76.0%
associate-+r+76.0%
Applied egg-rr76.0%
associate-*r/76.1%
*-rgt-identity76.1%
associate-+r+76.1%
+-commutative76.1%
Simplified76.1%
Final simplification89.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 3.0 (+ alpha beta))))
(if (<= beta 4.8)
(/ 0.5 (* (+ beta 2.0) t_0))
(/ (/ (+ 1.0 alpha) beta) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 3.0 + (alpha + beta);
double tmp;
if (beta <= 4.8) {
tmp = 0.5 / ((beta + 2.0) * t_0);
} else {
tmp = ((1.0 + alpha) / beta) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = 3.0d0 + (alpha + beta)
if (beta <= 4.8d0) then
tmp = 0.5d0 / ((beta + 2.0d0) * t_0)
else
tmp = ((1.0d0 + alpha) / beta) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 3.0 + (alpha + beta);
double tmp;
if (beta <= 4.8) {
tmp = 0.5 / ((beta + 2.0) * t_0);
} else {
tmp = ((1.0 + alpha) / beta) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 3.0 + (alpha + beta) tmp = 0 if beta <= 4.8: tmp = 0.5 / ((beta + 2.0) * t_0) else: tmp = ((1.0 + alpha) / beta) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(3.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 4.8) tmp = Float64(0.5 / Float64(Float64(beta + 2.0) * t_0)); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 3.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 4.8)
tmp = 0.5 / ((beta + 2.0) * t_0);
else
tmp = ((1.0 + alpha) / beta) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 4.8], N[(0.5 / N[(N[(beta + 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 3 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 4.8:\\
\;\;\;\;\frac{0.5}{\left(\beta + 2\right) \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t\_0}\\
\end{array}
\end{array}
if beta < 4.79999999999999982Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.5%
Taylor expanded in alpha around 0 58.3%
+-commutative58.3%
Simplified58.3%
if 4.79999999999999982 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
div-inv76.0%
metadata-eval76.0%
associate-+l+76.0%
metadata-eval76.0%
associate-+r+76.0%
Applied egg-rr76.0%
associate-*r/76.1%
*-rgt-identity76.1%
associate-+r+76.1%
+-commutative76.1%
Simplified76.1%
Final simplification64.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.5) (/ 0.5 (* (+ beta 2.0) (+ 3.0 (+ alpha beta)))) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.5) {
tmp = 0.5 / ((beta + 2.0) * (3.0 + (alpha + beta)));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 6.5d0) then
tmp = 0.5d0 / ((beta + 2.0d0) * (3.0d0 + (alpha + beta)))
else
tmp = ((1.0d0 + alpha) / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.5) {
tmp = 0.5 / ((beta + 2.0) * (3.0 + (alpha + beta)));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.5: tmp = 0.5 / ((beta + 2.0) * (3.0 + (alpha + beta))) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.5) tmp = Float64(0.5 / Float64(Float64(beta + 2.0) * Float64(3.0 + Float64(alpha + beta)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 6.5)
tmp = 0.5 / ((beta + 2.0) * (3.0 + (alpha + beta)));
else
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 6.5], N[(0.5 / N[(N[(beta + 2.0), $MachinePrecision] * N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6.5:\\
\;\;\;\;\frac{0.5}{\left(\beta + 2\right) \cdot \left(3 + \left(\alpha + \beta\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 6.5Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.5%
Taylor expanded in alpha around 0 58.3%
+-commutative58.3%
Simplified58.3%
if 6.5 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
Taylor expanded in alpha around 0 75.8%
+-commutative75.8%
Simplified75.8%
Final simplification64.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 24.5) (/ 0.5 (* (+ alpha 2.0) (+ 3.0 (+ alpha beta)))) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 24.5) {
tmp = 0.5 / ((alpha + 2.0) * (3.0 + (alpha + beta)));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 24.5d0) then
tmp = 0.5d0 / ((alpha + 2.0d0) * (3.0d0 + (alpha + beta)))
else
tmp = ((1.0d0 + alpha) / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 24.5) {
tmp = 0.5 / ((alpha + 2.0) * (3.0 + (alpha + beta)));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 24.5: tmp = 0.5 / ((alpha + 2.0) * (3.0 + (alpha + beta))) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 24.5) tmp = Float64(0.5 / Float64(Float64(alpha + 2.0) * Float64(3.0 + Float64(alpha + beta)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 24.5)
tmp = 0.5 / ((alpha + 2.0) * (3.0 + (alpha + beta)));
else
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 24.5], N[(0.5 / N[(N[(alpha + 2.0), $MachinePrecision] * N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 24.5:\\
\;\;\;\;\frac{0.5}{\left(\alpha + 2\right) \cdot \left(3 + \left(\alpha + \beta\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 24.5Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.5%
Taylor expanded in beta around 0 81.4%
if 24.5 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
Taylor expanded in alpha around 0 75.8%
+-commutative75.8%
Simplified75.8%
Final simplification79.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.6) (/ 0.5 (* (+ beta 2.0) (+ beta 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.6) {
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.6d0) then
tmp = 0.5d0 / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.6) {
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.6: tmp = 0.5 / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.6) tmp = Float64(0.5 / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.6)
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.6], N[(0.5 / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.6:\\
\;\;\;\;\frac{0.5}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 4.5999999999999996Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.5%
Taylor expanded in alpha around 0 56.4%
+-commutative58.7%
*-commutative58.7%
+-commutative58.7%
Simplified56.4%
if 4.5999999999999996 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
Taylor expanded in alpha around 0 75.8%
+-commutative75.8%
Simplified75.8%
Final simplification63.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 9.8) (/ 0.5 (* (+ beta 2.0) (+ beta 3.0))) (/ 1.0 (* beta (/ beta (+ 1.0 alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 9.8) {
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = 1.0 / (beta * (beta / (1.0 + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 9.8d0) then
tmp = 0.5d0 / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = 1.0d0 / (beta * (beta / (1.0d0 + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 9.8) {
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = 1.0 / (beta * (beta / (1.0 + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 9.8: tmp = 0.5 / ((beta + 2.0) * (beta + 3.0)) else: tmp = 1.0 / (beta * (beta / (1.0 + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 9.8) tmp = Float64(0.5 / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(1.0 / Float64(beta * Float64(beta / Float64(1.0 + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 9.8)
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
else
tmp = 1.0 / (beta * (beta / (1.0 + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 9.8], N[(0.5 / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta / N[(1.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 9.8:\\
\;\;\;\;\frac{0.5}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \frac{\beta}{1 + \alpha}}\\
\end{array}
\end{array}
if beta < 9.8000000000000007Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.5%
Taylor expanded in alpha around 0 56.4%
+-commutative58.7%
*-commutative58.7%
+-commutative58.7%
Simplified56.4%
if 9.8000000000000007 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
clear-num75.6%
inv-pow75.6%
metadata-eval75.6%
associate-+l+75.6%
metadata-eval75.6%
associate-+r+75.6%
Applied egg-rr75.6%
unpow-175.6%
associate-/r/75.7%
associate-+r+75.7%
+-commutative75.7%
Simplified75.7%
Taylor expanded in beta around inf 75.3%
Final simplification63.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.5) (/ 0.5 (* (+ beta 2.0) (+ beta 3.0))) (/ (/ 1.0 beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.5) {
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = (1.0 / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.5d0) then
tmp = 0.5d0 / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = (1.0d0 / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.5) {
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = (1.0 / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.5: tmp = 0.5 / ((beta + 2.0) * (beta + 3.0)) else: tmp = (1.0 / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.5) tmp = Float64(0.5 / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(1.0 / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.5)
tmp = 0.5 / ((beta + 2.0) * (beta + 3.0));
else
tmp = (1.0 / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.5], N[(0.5 / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.5:\\
\;\;\;\;\frac{0.5}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 4.5Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.5%
Taylor expanded in alpha around 0 56.4%
+-commutative58.7%
*-commutative58.7%
+-commutative58.7%
Simplified56.4%
if 4.5 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
clear-num75.6%
inv-pow75.6%
metadata-eval75.6%
associate-+l+75.6%
metadata-eval75.6%
associate-+r+75.6%
Applied egg-rr75.6%
unpow-175.6%
associate-/r/75.7%
associate-+r+75.7%
+-commutative75.7%
Simplified75.7%
Taylor expanded in alpha around 0 70.9%
+-commutative70.9%
Simplified70.9%
*-un-lft-identity70.9%
*-commutative70.9%
Applied egg-rr70.9%
*-lft-identity70.9%
associate-/r*71.4%
Simplified71.4%
Final simplification61.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 33.0) (/ 0.5 (* (+ alpha 2.0) (+ alpha 3.0))) (/ (/ 1.0 beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 33.0) {
tmp = 0.5 / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = (1.0 / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 33.0d0) then
tmp = 0.5d0 / ((alpha + 2.0d0) * (alpha + 3.0d0))
else
tmp = (1.0d0 / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 33.0) {
tmp = 0.5 / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = (1.0 / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 33.0: tmp = 0.5 / ((alpha + 2.0) * (alpha + 3.0)) else: tmp = (1.0 / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 33.0) tmp = Float64(0.5 / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))); else tmp = Float64(Float64(1.0 / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 33.0)
tmp = 0.5 / ((alpha + 2.0) * (alpha + 3.0));
else
tmp = (1.0 / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 33.0], N[(0.5 / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 33:\\
\;\;\;\;\frac{0.5}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 33Initial program 99.8%
Simplified94.0%
times-frac99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 82.9%
+-commutative82.9%
Simplified82.9%
Taylor expanded in beta around 0 80.6%
+-commutative80.6%
Simplified80.6%
if 33 < beta Initial program 81.5%
Taylor expanded in beta around inf 76.1%
clear-num75.6%
inv-pow75.6%
metadata-eval75.6%
associate-+l+75.6%
metadata-eval75.6%
associate-+r+75.6%
Applied egg-rr75.6%
unpow-175.6%
associate-/r/75.7%
associate-+r+75.7%
+-commutative75.7%
Simplified75.7%
Taylor expanded in alpha around 0 70.9%
+-commutative70.9%
Simplified70.9%
*-un-lft-identity70.9%
*-commutative70.9%
Applied egg-rr70.9%
*-lft-identity70.9%
associate-/r*71.4%
Simplified71.4%
Final simplification77.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (/ 1.0 beta) (+ beta 3.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return (1.0 / beta) / (beta + 3.0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = (1.0d0 / beta) / (beta + 3.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return (1.0 / beta) / (beta + 3.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return (1.0 / beta) / (beta + 3.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(1.0 / beta) / Float64(beta + 3.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = (1.0 / beta) / (beta + 3.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\frac{1}{\beta}}{\beta + 3}
\end{array}
Initial program 93.3%
Taylor expanded in beta around inf 29.3%
clear-num29.1%
inv-pow29.1%
metadata-eval29.1%
associate-+l+29.1%
metadata-eval29.1%
associate-+r+29.1%
Applied egg-rr29.1%
unpow-129.1%
associate-/r/29.2%
associate-+r+29.2%
+-commutative29.2%
Simplified29.2%
Taylor expanded in alpha around 0 27.5%
+-commutative27.5%
Simplified27.5%
*-un-lft-identity27.5%
*-commutative27.5%
Applied egg-rr27.5%
*-lft-identity27.5%
associate-/r*27.7%
Simplified27.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 (* beta (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / (beta * (beta + 3.0));
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 1.0d0 / (beta * (beta + 3.0d0))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / (beta * (beta + 3.0));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / (beta * (beta + 3.0))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / Float64(beta * Float64(beta + 3.0))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / (beta * (beta + 3.0));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / N[(beta * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\beta \cdot \left(\beta + 3\right)}
\end{array}
Initial program 93.3%
Taylor expanded in beta around inf 29.3%
Taylor expanded in alpha around 0 27.5%
+-commutative27.5%
Simplified27.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.3333333333333333 beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.3333333333333333 / beta;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.3333333333333333d0 / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.3333333333333333 / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.3333333333333333 / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.3333333333333333 / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.3333333333333333 / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.3333333333333333 / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.3333333333333333}{\beta}
\end{array}
Initial program 93.3%
Taylor expanded in beta around inf 29.3%
clear-num29.1%
inv-pow29.1%
metadata-eval29.1%
associate-+l+29.1%
metadata-eval29.1%
associate-+r+29.1%
Applied egg-rr29.1%
unpow-129.1%
associate-/r/29.2%
associate-+r+29.2%
+-commutative29.2%
Simplified29.2%
Taylor expanded in alpha around 0 27.5%
+-commutative27.5%
Simplified27.5%
Taylor expanded in beta around 0 4.5%
herbie shell --seed 2024123
(FPCore (alpha beta)
:name "Octave 3.8, jcobi/3"
:precision binary64
:pre (and (> alpha -1.0) (> beta -1.0))
(/ (/ (/ (+ (+ (+ alpha beta) (* beta alpha)) 1.0) (+ (+ alpha beta) (* 2.0 1.0))) (+ (+ alpha beta) (* 2.0 1.0))) (+ (+ (+ alpha beta) (* 2.0 1.0)) 1.0)))