
(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 15 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 (+ 2.0 beta))))
(if (<= beta 1.05e+88)
(/ (* (+ 1.0 beta) (+ 1.0 alpha)) (* t_0 (* (+ alpha (+ beta 3.0)) t_0)))
(/ (/ (+ 1.0 alpha) (+ 2.0 (+ beta alpha))) (+ 3.0 (+ beta alpha))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 1.05e+88) {
tmp = ((1.0 + beta) * (1.0 + alpha)) / (t_0 * ((alpha + (beta + 3.0)) * t_0));
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + 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) :: t_0
real(8) :: tmp
t_0 = alpha + (2.0d0 + beta)
if (beta <= 1.05d+88) then
tmp = ((1.0d0 + beta) * (1.0d0 + alpha)) / (t_0 * ((alpha + (beta + 3.0d0)) * t_0))
else
tmp = ((1.0d0 + alpha) / (2.0d0 + (beta + alpha))) / (3.0d0 + (beta + alpha))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 1.05e+88) {
tmp = ((1.0 + beta) * (1.0 + alpha)) / (t_0 * ((alpha + (beta + 3.0)) * t_0));
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + alpha));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) tmp = 0 if beta <= 1.05e+88: tmp = ((1.0 + beta) * (1.0 + alpha)) / (t_0 * ((alpha + (beta + 3.0)) * t_0)) else: tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + alpha)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 1.05e+88) tmp = Float64(Float64(Float64(1.0 + beta) * Float64(1.0 + alpha)) / Float64(t_0 * Float64(Float64(alpha + Float64(beta + 3.0)) * t_0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(2.0 + Float64(beta + alpha))) / Float64(3.0 + Float64(beta + alpha))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = 0.0;
if (beta <= 1.05e+88)
tmp = ((1.0 + beta) * (1.0 + alpha)) / (t_0 * ((alpha + (beta + 3.0)) * t_0));
else
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + alpha));
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[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.05e+88], N[(N[(N[(1.0 + beta), $MachinePrecision] * N[(1.0 + alpha), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 * N[(N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 1.05 \cdot 10^{+88}:\\
\;\;\;\;\frac{\left(1 + \beta\right) \cdot \left(1 + \alpha\right)}{t\_0 \cdot \left(\left(\alpha + \left(\beta + 3\right)\right) \cdot t\_0\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{2 + \left(\beta + \alpha\right)}}{3 + \left(\beta + \alpha\right)}\\
\end{array}
\end{array}
if beta < 1.05e88Initial program 99.8%
Simplified93.2%
if 1.05e88 < beta Initial program 70.3%
associate-/l/65.7%
+-commutative65.7%
associate-+l+65.7%
*-commutative65.7%
metadata-eval65.7%
associate-+l+65.7%
metadata-eval65.7%
associate-+l+65.7%
metadata-eval65.7%
metadata-eval65.7%
associate-+l+65.7%
Simplified65.7%
div-inv65.7%
+-commutative65.7%
distribute-rgt1-in65.7%
fma-define65.7%
*-commutative65.7%
associate-+r+65.7%
Applied egg-rr65.7%
associate-*r/65.7%
*-rgt-identity65.7%
+-commutative65.7%
fma-undefine65.7%
+-commutative65.7%
*-commutative65.7%
+-commutative65.7%
associate-+r+65.7%
distribute-lft1-in65.7%
+-commutative65.7%
+-commutative65.7%
associate-+r+65.7%
+-commutative65.7%
+-commutative65.7%
associate-+r+65.7%
+-commutative65.7%
+-commutative65.7%
+-commutative65.7%
+-commutative65.7%
+-commutative65.7%
Simplified65.7%
Taylor expanded in beta around inf 81.3%
*-un-lft-identity81.3%
+-commutative81.3%
associate-+r+81.3%
associate-+r+81.3%
+-commutative81.3%
Applied egg-rr81.3%
*-lft-identity81.3%
associate-/r*78.1%
associate-+l+78.1%
+-commutative78.1%
+-commutative78.1%
+-commutative78.1%
associate-+r+78.1%
Simplified78.1%
Final simplification89.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 3.0 (+ beta alpha))) (t_1 (+ 2.0 (+ beta alpha))))
(if (<= beta 1e+88)
(* (+ 1.0 beta) (/ (+ 1.0 alpha) (* t_1 (* t_1 t_0))))
(/ (/ (+ 1.0 alpha) t_1) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 3.0 + (beta + alpha);
double t_1 = 2.0 + (beta + alpha);
double tmp;
if (beta <= 1e+88) {
tmp = (1.0 + beta) * ((1.0 + alpha) / (t_1 * (t_1 * t_0)));
} else {
tmp = ((1.0 + alpha) / t_1) / 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) :: t_1
real(8) :: tmp
t_0 = 3.0d0 + (beta + alpha)
t_1 = 2.0d0 + (beta + alpha)
if (beta <= 1d+88) then
tmp = (1.0d0 + beta) * ((1.0d0 + alpha) / (t_1 * (t_1 * t_0)))
else
tmp = ((1.0d0 + alpha) / t_1) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 3.0 + (beta + alpha);
double t_1 = 2.0 + (beta + alpha);
double tmp;
if (beta <= 1e+88) {
tmp = (1.0 + beta) * ((1.0 + alpha) / (t_1 * (t_1 * t_0)));
} else {
tmp = ((1.0 + alpha) / t_1) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 3.0 + (beta + alpha) t_1 = 2.0 + (beta + alpha) tmp = 0 if beta <= 1e+88: tmp = (1.0 + beta) * ((1.0 + alpha) / (t_1 * (t_1 * t_0))) else: tmp = ((1.0 + alpha) / t_1) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(3.0 + Float64(beta + alpha)) t_1 = Float64(2.0 + Float64(beta + alpha)) tmp = 0.0 if (beta <= 1e+88) tmp = Float64(Float64(1.0 + beta) * Float64(Float64(1.0 + alpha) / Float64(t_1 * Float64(t_1 * t_0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_1) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 3.0 + (beta + alpha);
t_1 = 2.0 + (beta + alpha);
tmp = 0.0;
if (beta <= 1e+88)
tmp = (1.0 + beta) * ((1.0 + alpha) / (t_1 * (t_1 * t_0)));
else
tmp = ((1.0 + alpha) / t_1) / 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[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1e+88], N[(N[(1.0 + beta), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / N[(t$95$1 * N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 3 + \left(\beta + \alpha\right)\\
t_1 := 2 + \left(\beta + \alpha\right)\\
\mathbf{if}\;\beta \leq 10^{+88}:\\
\;\;\;\;\left(1 + \beta\right) \cdot \frac{1 + \alpha}{t\_1 \cdot \left(t\_1 \cdot t\_0\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_1}}{t\_0}\\
\end{array}
\end{array}
if beta < 9.99999999999999959e87Initial program 99.8%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
clear-num99.4%
inv-pow99.4%
*-commutative99.4%
associate-+r+99.4%
+-commutative99.4%
distribute-rgt1-in99.4%
fma-define99.4%
Applied egg-rr99.4%
unpow-199.4%
associate-/l*99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
fma-undefine99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-+r+99.4%
distribute-lft1-in99.4%
+-commutative99.4%
+-commutative99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
Simplified99.4%
associate-/l*99.4%
Applied egg-rr99.4%
associate-*r/99.4%
associate-*r/99.4%
clear-num99.4%
*-un-lft-identity99.4%
associate-/l/93.2%
associate-+l+93.2%
Applied egg-rr93.2%
*-lft-identity93.2%
associate-/l*93.2%
*-commutative93.2%
+-commutative93.2%
+-commutative93.2%
+-commutative93.2%
associate-+r+93.2%
Simplified93.2%
if 9.99999999999999959e87 < beta Initial program 70.3%
associate-/l/65.7%
+-commutative65.7%
associate-+l+65.7%
*-commutative65.7%
metadata-eval65.7%
associate-+l+65.7%
metadata-eval65.7%
associate-+l+65.7%
metadata-eval65.7%
metadata-eval65.7%
associate-+l+65.7%
Simplified65.7%
div-inv65.7%
+-commutative65.7%
distribute-rgt1-in65.7%
fma-define65.7%
*-commutative65.7%
associate-+r+65.7%
Applied egg-rr65.7%
associate-*r/65.7%
*-rgt-identity65.7%
+-commutative65.7%
fma-undefine65.7%
+-commutative65.7%
*-commutative65.7%
+-commutative65.7%
associate-+r+65.7%
distribute-lft1-in65.7%
+-commutative65.7%
+-commutative65.7%
associate-+r+65.7%
+-commutative65.7%
+-commutative65.7%
associate-+r+65.7%
+-commutative65.7%
+-commutative65.7%
+-commutative65.7%
+-commutative65.7%
+-commutative65.7%
Simplified65.7%
Taylor expanded in beta around inf 81.3%
*-un-lft-identity81.3%
+-commutative81.3%
associate-+r+81.3%
associate-+r+81.3%
+-commutative81.3%
Applied egg-rr81.3%
*-lft-identity81.3%
associate-/r*78.1%
associate-+l+78.1%
+-commutative78.1%
+-commutative78.1%
+-commutative78.1%
associate-+r+78.1%
Simplified78.1%
Final simplification89.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ beta alpha))))
(/
1.0
(*
(/ (+ alpha (+ beta 3.0)) (* (+ 1.0 beta) (/ (+ 1.0 alpha) t_0)))
t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (beta + alpha);
return 1.0 / (((alpha + (beta + 3.0)) / ((1.0 + beta) * ((1.0 + alpha) / t_0))) * t_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 = 2.0d0 + (beta + alpha)
code = 1.0d0 / (((alpha + (beta + 3.0d0)) / ((1.0d0 + beta) * ((1.0d0 + alpha) / t_0))) * t_0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (beta + alpha);
return 1.0 / (((alpha + (beta + 3.0)) / ((1.0 + beta) * ((1.0 + alpha) / t_0))) * t_0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (beta + alpha) return 1.0 / (((alpha + (beta + 3.0)) / ((1.0 + beta) * ((1.0 + alpha) / t_0))) * t_0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(beta + alpha)) return Float64(1.0 / Float64(Float64(Float64(alpha + Float64(beta + 3.0)) / Float64(Float64(1.0 + beta) * Float64(Float64(1.0 + alpha) / t_0))) * t_0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = 2.0 + (beta + alpha);
tmp = 1.0 / (((alpha + (beta + 3.0)) / ((1.0 + beta) * ((1.0 + alpha) / t_0))) * t_0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, N[(1.0 / N[(N[(N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + beta), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\beta + \alpha\right)\\
\frac{1}{\frac{\alpha + \left(\beta + 3\right)}{\left(1 + \beta\right) \cdot \frac{1 + \alpha}{t\_0}} \cdot t\_0}
\end{array}
\end{array}
Initial program 92.5%
associate-/l/91.1%
+-commutative91.1%
associate-+l+91.1%
*-commutative91.1%
metadata-eval91.1%
associate-+l+91.1%
metadata-eval91.1%
associate-+l+91.1%
metadata-eval91.1%
metadata-eval91.1%
associate-+l+91.1%
Simplified91.1%
clear-num91.1%
inv-pow91.1%
*-commutative91.1%
associate-+r+91.1%
+-commutative91.1%
distribute-rgt1-in91.1%
fma-define91.1%
Applied egg-rr91.1%
unpow-191.1%
associate-/l*91.9%
associate-+r+91.9%
+-commutative91.9%
+-commutative91.9%
+-commutative91.9%
+-commutative91.9%
+-commutative91.9%
+-commutative91.9%
fma-undefine91.9%
+-commutative91.9%
*-commutative91.9%
+-commutative91.9%
associate-+r+91.9%
distribute-lft1-in91.9%
+-commutative91.9%
+-commutative91.9%
associate-+r+91.9%
+-commutative91.9%
+-commutative91.9%
Simplified91.9%
associate-/l*99.2%
Applied egg-rr99.2%
Final simplification99.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 3.0 (+ beta alpha))))
(if (<= beta 7.8e+15)
(/ (/ (+ 1.0 beta) (+ 2.0 beta)) (* (+ 2.0 beta) t_0))
(/ (/ (+ 1.0 alpha) (+ 2.0 (+ beta alpha))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 3.0 + (beta + alpha);
double tmp;
if (beta <= 7.8e+15) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * t_0);
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / 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 + (beta + alpha)
if (beta <= 7.8d+15) then
tmp = ((1.0d0 + beta) / (2.0d0 + beta)) / ((2.0d0 + beta) * t_0)
else
tmp = ((1.0d0 + alpha) / (2.0d0 + (beta + alpha))) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 3.0 + (beta + alpha);
double tmp;
if (beta <= 7.8e+15) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * t_0);
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 3.0 + (beta + alpha) tmp = 0 if beta <= 7.8e+15: tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * t_0) else: tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(3.0 + Float64(beta + alpha)) tmp = 0.0 if (beta <= 7.8e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(2.0 + beta)) / Float64(Float64(2.0 + beta) * t_0)); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(2.0 + Float64(beta + alpha))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 3.0 + (beta + alpha);
tmp = 0.0;
if (beta <= 7.8e+15)
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * t_0);
else
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / 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[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 7.8e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + beta), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 3 + \left(\beta + \alpha\right)\\
\mathbf{if}\;\beta \leq 7.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{2 + \beta}}{\left(2 + \beta\right) \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{2 + \left(\beta + \alpha\right)}}{t\_0}\\
\end{array}
\end{array}
if beta < 7.8e15Initial program 99.9%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in alpha around 0 85.5%
+-commutative85.5%
Simplified85.5%
Taylor expanded in alpha around 0 61.4%
+-commutative60.6%
Simplified61.4%
if 7.8e15 < beta Initial program 78.6%
associate-/l/75.3%
+-commutative75.3%
associate-+l+75.3%
*-commutative75.3%
metadata-eval75.3%
associate-+l+75.3%
metadata-eval75.3%
associate-+l+75.3%
metadata-eval75.3%
metadata-eval75.3%
associate-+l+75.3%
Simplified75.3%
div-inv75.3%
+-commutative75.3%
distribute-rgt1-in75.3%
fma-define75.3%
*-commutative75.3%
associate-+r+75.3%
Applied egg-rr75.3%
associate-*r/75.3%
*-rgt-identity75.3%
+-commutative75.3%
fma-undefine75.3%
+-commutative75.3%
*-commutative75.3%
+-commutative75.3%
associate-+r+75.3%
distribute-lft1-in75.3%
+-commutative75.3%
+-commutative75.3%
associate-+r+75.3%
+-commutative75.3%
+-commutative75.3%
associate-+r+75.3%
+-commutative75.3%
+-commutative75.3%
+-commutative75.3%
+-commutative75.3%
+-commutative75.3%
Simplified75.3%
Taylor expanded in beta around inf 79.5%
*-un-lft-identity79.5%
+-commutative79.5%
associate-+r+79.5%
associate-+r+79.5%
+-commutative79.5%
Applied egg-rr79.5%
*-lft-identity79.5%
associate-/r*75.1%
associate-+l+75.1%
+-commutative75.1%
+-commutative75.1%
+-commutative75.1%
associate-+r+75.1%
Simplified75.1%
Final simplification66.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.4) (/ (+ 0.5 (* beta 0.25)) (* (+ 2.0 beta) (+ 3.0 (+ beta alpha)))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.4) {
tmp = (0.5 + (beta * 0.25)) / ((2.0 + beta) * (3.0 + (beta + alpha)));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (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.4d0) then
tmp = (0.5d0 + (beta * 0.25d0)) / ((2.0d0 + beta) * (3.0d0 + (beta + alpha)))
else
tmp = ((1.0d0 + alpha) / beta) / (alpha + (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.4) {
tmp = (0.5 + (beta * 0.25)) / ((2.0 + beta) * (3.0 + (beta + alpha)));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.4: tmp = (0.5 + (beta * 0.25)) / ((2.0 + beta) * (3.0 + (beta + alpha))) else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.4) tmp = Float64(Float64(0.5 + Float64(beta * 0.25)) / Float64(Float64(2.0 + beta) * Float64(3.0 + Float64(beta + alpha)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + 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.4)
tmp = (0.5 + (beta * 0.25)) / ((2.0 + beta) * (3.0 + (beta + alpha)));
else
tmp = ((1.0 + alpha) / beta) / (alpha + (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.4], N[(N[(0.5 + N[(beta * 0.25), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + beta), $MachinePrecision] * N[(3.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.4:\\
\;\;\;\;\frac{0.5 + \beta \cdot 0.25}{\left(2 + \beta\right) \cdot \left(3 + \left(\beta + \alpha\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 4.4000000000000004Initial program 99.9%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in alpha around 0 85.3%
+-commutative85.3%
Simplified85.3%
Taylor expanded in beta around 0 85.0%
Taylor expanded in alpha around 0 61.2%
+-commutative61.2%
Simplified61.2%
if 4.4000000000000004 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 73.3%
+-commutative73.3%
associate-+r+73.3%
+-commutative73.3%
+-commutative73.3%
+-commutative73.3%
Simplified73.3%
Final simplification65.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.1e+16) (/ (/ (+ 1.0 beta) (+ 2.0 beta)) (* (+ beta 3.0) (+ 2.0 beta))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.1e+16) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (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 <= 2.1d+16) then
tmp = ((1.0d0 + beta) / (2.0d0 + beta)) / ((beta + 3.0d0) * (2.0d0 + beta))
else
tmp = ((1.0d0 + alpha) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.1e+16) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.1e+16: tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta)) else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.1e+16) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(2.0 + beta)) / Float64(Float64(beta + 3.0) * Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + 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 <= 2.1e+16)
tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta));
else
tmp = ((1.0 + alpha) / beta) / (alpha + (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, 2.1e+16], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 3.0), $MachinePrecision] * N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.1 \cdot 10^{+16}:\\
\;\;\;\;\frac{\frac{1 + \beta}{2 + \beta}}{\left(\beta + 3\right) \cdot \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 2.1e16Initial program 99.9%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in alpha around 0 85.5%
+-commutative85.5%
Simplified85.5%
Taylor expanded in alpha around 0 59.7%
+-commutative58.9%
Simplified59.7%
if 2.1e16 < beta Initial program 78.6%
Taylor expanded in beta around inf 74.6%
Taylor expanded in alpha around 0 74.6%
+-commutative74.6%
associate-+r+74.6%
+-commutative74.6%
+-commutative74.6%
+-commutative74.6%
Simplified74.6%
Final simplification64.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.2e+15) (/ (/ (+ 1.0 beta) (+ 2.0 beta)) (* (+ beta 3.0) (+ 2.0 beta))) (/ (/ (+ 1.0 alpha) (+ 2.0 (+ beta alpha))) (+ 3.0 (+ beta alpha)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.2e+15) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + 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 <= 4.2d+15) then
tmp = ((1.0d0 + beta) / (2.0d0 + beta)) / ((beta + 3.0d0) * (2.0d0 + beta))
else
tmp = ((1.0d0 + alpha) / (2.0d0 + (beta + alpha))) / (3.0d0 + (beta + alpha))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.2e+15) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + alpha));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.2e+15: tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta)) else: tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + alpha)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.2e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(2.0 + beta)) / Float64(Float64(beta + 3.0) * Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(2.0 + Float64(beta + alpha))) / Float64(3.0 + Float64(beta + alpha))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.2e+15)
tmp = ((1.0 + beta) / (2.0 + beta)) / ((beta + 3.0) * (2.0 + beta));
else
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / (3.0 + (beta + 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, 4.2e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 3.0), $MachinePrecision] * N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{2 + \beta}}{\left(\beta + 3\right) \cdot \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{2 + \left(\beta + \alpha\right)}}{3 + \left(\beta + \alpha\right)}\\
\end{array}
\end{array}
if beta < 4.2e15Initial program 99.9%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in alpha around 0 85.5%
+-commutative85.5%
Simplified85.5%
Taylor expanded in alpha around 0 59.7%
+-commutative58.9%
Simplified59.7%
if 4.2e15 < beta Initial program 78.6%
associate-/l/75.3%
+-commutative75.3%
associate-+l+75.3%
*-commutative75.3%
metadata-eval75.3%
associate-+l+75.3%
metadata-eval75.3%
associate-+l+75.3%
metadata-eval75.3%
metadata-eval75.3%
associate-+l+75.3%
Simplified75.3%
div-inv75.3%
+-commutative75.3%
distribute-rgt1-in75.3%
fma-define75.3%
*-commutative75.3%
associate-+r+75.3%
Applied egg-rr75.3%
associate-*r/75.3%
*-rgt-identity75.3%
+-commutative75.3%
fma-undefine75.3%
+-commutative75.3%
*-commutative75.3%
+-commutative75.3%
associate-+r+75.3%
distribute-lft1-in75.3%
+-commutative75.3%
+-commutative75.3%
associate-+r+75.3%
+-commutative75.3%
+-commutative75.3%
associate-+r+75.3%
+-commutative75.3%
+-commutative75.3%
+-commutative75.3%
+-commutative75.3%
+-commutative75.3%
Simplified75.3%
Taylor expanded in beta around inf 79.5%
*-un-lft-identity79.5%
+-commutative79.5%
associate-+r+79.5%
associate-+r+79.5%
+-commutative79.5%
Applied egg-rr79.5%
*-lft-identity79.5%
associate-/r*75.1%
associate-+l+75.1%
+-commutative75.1%
+-commutative75.1%
+-commutative75.1%
associate-+r+75.1%
Simplified75.1%
Final simplification65.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.0) (/ 1.0 (* (+ 2.0 (+ beta alpha)) (+ (* 2.0 beta) 6.0))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.0) {
tmp = 1.0 / ((2.0 + (beta + alpha)) * ((2.0 * beta) + 6.0));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (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 <= 5.0d0) then
tmp = 1.0d0 / ((2.0d0 + (beta + alpha)) * ((2.0d0 * beta) + 6.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.0) {
tmp = 1.0 / ((2.0 + (beta + alpha)) * ((2.0 * beta) + 6.0));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.0: tmp = 1.0 / ((2.0 + (beta + alpha)) * ((2.0 * beta) + 6.0)) else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.0) tmp = Float64(1.0 / Float64(Float64(2.0 + Float64(beta + alpha)) * Float64(Float64(2.0 * beta) + 6.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + 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 <= 5.0)
tmp = 1.0 / ((2.0 + (beta + alpha)) * ((2.0 * beta) + 6.0));
else
tmp = ((1.0 + alpha) / beta) / (alpha + (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, 5.0], N[(1.0 / N[(N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * beta), $MachinePrecision] + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5:\\
\;\;\;\;\frac{1}{\left(2 + \left(\beta + \alpha\right)\right) \cdot \left(2 \cdot \beta + 6\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5Initial program 99.9%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
clear-num99.4%
inv-pow99.4%
*-commutative99.4%
associate-+r+99.4%
+-commutative99.4%
distribute-rgt1-in99.4%
fma-define99.4%
Applied egg-rr99.4%
unpow-199.4%
associate-/l*99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
fma-undefine99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-+r+99.4%
distribute-lft1-in99.4%
+-commutative99.4%
+-commutative99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in beta around 0 97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in alpha around 0 59.9%
distribute-lft-in59.9%
metadata-eval59.9%
+-commutative59.9%
Simplified59.9%
if 5 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 73.3%
+-commutative73.3%
associate-+r+73.3%
+-commutative73.3%
+-commutative73.3%
+-commutative73.3%
Simplified73.3%
Final simplification64.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.0) (/ (+ 0.5 (* beta 0.25)) (* (+ beta 3.0) (+ 2.0 beta))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = (0.5 + (beta * 0.25)) / ((beta + 3.0) * (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (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.0d0) then
tmp = (0.5d0 + (beta * 0.25d0)) / ((beta + 3.0d0) * (2.0d0 + beta))
else
tmp = ((1.0d0 + alpha) / beta) / (alpha + (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.0) {
tmp = (0.5 + (beta * 0.25)) / ((beta + 3.0) * (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.0: tmp = (0.5 + (beta * 0.25)) / ((beta + 3.0) * (2.0 + beta)) else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.0) tmp = Float64(Float64(0.5 + Float64(beta * 0.25)) / Float64(Float64(beta + 3.0) * Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + 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.0)
tmp = (0.5 + (beta * 0.25)) / ((beta + 3.0) * (2.0 + beta));
else
tmp = ((1.0 + alpha) / beta) / (alpha + (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.0], N[(N[(0.5 + N[(beta * 0.25), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 3.0), $MachinePrecision] * N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4:\\
\;\;\;\;\frac{0.5 + \beta \cdot 0.25}{\left(\beta + 3\right) \cdot \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 4Initial program 99.9%
associate-/l/99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
associate-+l+99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in alpha around 0 85.3%
+-commutative85.3%
Simplified85.3%
Taylor expanded in beta around 0 85.0%
Taylor expanded in alpha around 0 59.5%
+-commutative59.5%
Simplified59.5%
if 4 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 73.3%
+-commutative73.3%
associate-+r+73.3%
+-commutative73.3%
+-commutative73.3%
+-commutative73.3%
Simplified73.3%
Final simplification64.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.3) 0.08333333333333333 (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (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 <= 2.3d0) then
tmp = 0.08333333333333333d0
else
tmp = ((1.0d0 + alpha) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.3: tmp = 0.08333333333333333 else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.3) tmp = 0.08333333333333333; else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + 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 <= 2.3)
tmp = 0.08333333333333333;
else
tmp = ((1.0 + alpha) / beta) / (alpha + (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, 2.3], 0.08333333333333333, N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.3:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 2.2999999999999998Initial program 99.9%
Simplified94.4%
Taylor expanded in beta around 0 93.2%
Taylor expanded in alpha around 0 58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in beta around 0 58.7%
if 2.2999999999999998 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 73.3%
+-commutative73.3%
associate-+r+73.3%
+-commutative73.3%
+-commutative73.3%
+-commutative73.3%
Simplified73.3%
Final simplification63.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.5) 0.08333333333333333 (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.5) {
tmp = 0.08333333333333333;
} 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 <= 2.5d0) then
tmp = 0.08333333333333333d0
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 <= 2.5) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.5: tmp = 0.08333333333333333 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 <= 2.5) tmp = 0.08333333333333333; 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 <= 2.5)
tmp = 0.08333333333333333;
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, 2.5], 0.08333333333333333, 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 2.5:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 2.5Initial program 99.9%
Simplified94.4%
Taylor expanded in beta around 0 93.2%
Taylor expanded in alpha around 0 58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in beta around 0 58.7%
if 2.5 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 73.0%
+-commutative73.0%
Simplified73.0%
Final simplification63.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.3) 0.08333333333333333 (/ 1.0 (* beta (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = 0.08333333333333333;
} 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 <= 2.3d0) then
tmp = 0.08333333333333333d0
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 <= 2.3) {
tmp = 0.08333333333333333;
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.3: tmp = 0.08333333333333333 else: tmp = 1.0 / (beta * (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.3) tmp = 0.08333333333333333; else tmp = Float64(1.0 / Float64(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 <= 2.3)
tmp = 0.08333333333333333;
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, 2.3], 0.08333333333333333, N[(1.0 / N[(beta * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.3:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 2.2999999999999998Initial program 99.9%
Simplified94.4%
Taylor expanded in beta around 0 93.2%
Taylor expanded in alpha around 0 58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in beta around 0 58.7%
if 2.2999999999999998 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 68.5%
+-commutative68.5%
Simplified68.5%
Final simplification62.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.6) 0.08333333333333333 (/ (/ (+ 1.0 alpha) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.6) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 + alpha) / beta) / 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 <= 3.6d0) then
tmp = 0.08333333333333333d0
else
tmp = ((1.0d0 + alpha) / beta) / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.6) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.6: tmp = 0.08333333333333333 else: tmp = ((1.0 + alpha) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.6) tmp = 0.08333333333333333; else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.6)
tmp = 0.08333333333333333;
else
tmp = ((1.0 + alpha) / beta) / 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, 3.6], 0.08333333333333333, N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.6:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 3.60000000000000009Initial program 99.9%
Simplified94.4%
Taylor expanded in beta around 0 93.2%
Taylor expanded in alpha around 0 58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in beta around 0 58.7%
if 3.60000000000000009 < beta Initial program 79.0%
Taylor expanded in beta around inf 73.3%
Taylor expanded in alpha around 0 73.3%
+-commutative73.3%
associate-+r+73.3%
+-commutative73.3%
+-commutative73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in beta around inf 73.0%
Final simplification63.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.0) 0.08333333333333333 (/ 0.25 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.25 / 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 <= 3.0d0) then
tmp = 0.08333333333333333d0
else
tmp = 0.25d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.25 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.0: tmp = 0.08333333333333333 else: tmp = 0.25 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.0) tmp = 0.08333333333333333; else tmp = Float64(0.25 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.0)
tmp = 0.08333333333333333;
else
tmp = 0.25 / 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, 3.0], 0.08333333333333333, N[(0.25 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{0.25}{\beta}\\
\end{array}
\end{array}
if beta < 3Initial program 99.9%
Simplified94.4%
Taylor expanded in beta around 0 93.2%
Taylor expanded in alpha around 0 58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in beta around 0 58.7%
if 3 < beta Initial program 79.0%
associate-/l/75.8%
+-commutative75.8%
associate-+l+75.8%
*-commutative75.8%
metadata-eval75.8%
associate-+l+75.8%
metadata-eval75.8%
associate-+l+75.8%
metadata-eval75.8%
metadata-eval75.8%
associate-+l+75.8%
Simplified75.8%
Taylor expanded in alpha around 0 77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in beta around 0 47.4%
Taylor expanded in beta around inf 6.8%
Final simplification40.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 0.08333333333333333)
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.08333333333333333;
}
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.08333333333333333d0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.08333333333333333;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.08333333333333333
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return 0.08333333333333333 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.08333333333333333;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := 0.08333333333333333
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.08333333333333333
\end{array}
Initial program 92.5%
Simplified82.5%
Taylor expanded in beta around 0 73.1%
Taylor expanded in alpha around 0 51.3%
+-commutative51.3%
Simplified51.3%
Taylor expanded in beta around 0 39.5%
Final simplification39.5%
herbie shell --seed 2024079
(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)))