
(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 18 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) (+ 1.0 beta)) t_0) (+ 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) * (1.0 + beta)) / t_0) / (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) * (1.0d0 + beta)) / t_0) / (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) * (1.0 + beta)) / t_0) / (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) * (1.0 + beta)) / t_0) / (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(Float64(1.0 + alpha) / t_0) * Float64(1.0 + beta)) / t_0) / 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) * (1.0 + beta)) / t_0) / (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[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 + beta), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\frac{\frac{\frac{1 + \alpha}{t_0} \cdot \left(1 + \beta\right)}{t_0}}{\alpha + \left(\beta + 3\right)}
\end{array}
\end{array}
Initial program 93.7%
associate-/l/91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+r+91.8%
associate-+l+91.8%
distribute-rgt1-in91.8%
*-rgt-identity91.8%
distribute-lft-out91.8%
+-commutative91.8%
associate-*l/96.9%
*-commutative96.9%
associate-*r/92.5%
Simplified92.5%
associate-*r/96.9%
+-commutative96.9%
Applied egg-rr96.9%
associate-/r*99.8%
associate-*r/93.7%
+-commutative93.7%
+-commutative93.7%
*-commutative93.7%
+-commutative93.7%
+-commutative93.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
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))) (t_1 (+ alpha (+ beta 3.0))))
(if (<= beta 3.5e+18)
(* (+ 1.0 alpha) (/ (/ (+ 1.0 beta) (* t_1 t_0)) t_0))
(/ (* (+ 1.0 alpha) (/ 1.0 (+ beta (+ alpha 2.0)))) t_1))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double t_1 = alpha + (beta + 3.0);
double tmp;
if (beta <= 3.5e+18) {
tmp = (1.0 + alpha) * (((1.0 + beta) / (t_1 * t_0)) / t_0);
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / 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 + 2.0d0)
t_1 = alpha + (beta + 3.0d0)
if (beta <= 3.5d+18) then
tmp = (1.0d0 + alpha) * (((1.0d0 + beta) / (t_1 * t_0)) / t_0)
else
tmp = ((1.0d0 + alpha) * (1.0d0 / (beta + (alpha + 2.0d0)))) / t_1
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 t_1 = alpha + (beta + 3.0);
double tmp;
if (beta <= 3.5e+18) {
tmp = (1.0 + alpha) * (((1.0 + beta) / (t_1 * t_0)) / t_0);
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / t_1;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) t_1 = alpha + (beta + 3.0) tmp = 0 if beta <= 3.5e+18: tmp = (1.0 + alpha) * (((1.0 + beta) / (t_1 * t_0)) / t_0) else: tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / t_1 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) t_1 = Float64(alpha + Float64(beta + 3.0)) tmp = 0.0 if (beta <= 3.5e+18) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / Float64(t_1 * t_0)) / t_0)); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta + Float64(alpha + 2.0)))) / t_1); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
t_1 = alpha + (beta + 3.0);
tmp = 0.0;
if (beta <= 3.5e+18)
tmp = (1.0 + alpha) * (((1.0 + beta) / (t_1 * t_0)) / t_0);
else
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / 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 + 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3.5e+18], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
t_1 := \alpha + \left(\beta + 3\right)\\
\mathbf{if}\;\beta \leq 3.5 \cdot 10^{+18}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{t_1 \cdot t_0}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta + \left(\alpha + 2\right)}}{t_1}\\
\end{array}
\end{array}
if beta < 3.5e18Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+l+99.5%
distribute-rgt1-in99.5%
*-rgt-identity99.5%
distribute-lft-out99.5%
+-commutative99.5%
associate-*l/99.4%
*-commutative99.4%
associate-*r/93.7%
Simplified93.7%
div-inv93.7%
+-commutative93.7%
Applied egg-rr93.7%
associate-*l/93.7%
*-commutative93.7%
+-commutative93.7%
associate-+l+93.7%
+-commutative93.7%
associate-+l+93.7%
Applied egg-rr93.7%
associate-*r/93.7%
*-rgt-identity93.7%
*-commutative93.7%
associate-+r+93.7%
+-commutative93.7%
+-commutative93.7%
associate-+r+93.7%
+-commutative93.7%
Simplified93.7%
if 3.5e18 < beta Initial program 75.9%
associate-/l/69.6%
associate-+l+69.6%
+-commutative69.6%
associate-+r+69.6%
associate-+l+69.6%
distribute-rgt1-in69.6%
*-rgt-identity69.6%
distribute-lft-out69.6%
+-commutative69.6%
associate-*l/89.7%
*-commutative89.7%
associate-*r/89.1%
Simplified89.1%
associate-*r/89.7%
+-commutative89.7%
Applied egg-rr89.7%
associate-/r*99.7%
associate-*r/75.9%
+-commutative75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 79.6%
Final simplification90.1%
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 (<= beta 3.5e+18)
(/ (* (+ 1.0 alpha) (+ 1.0 beta)) (* t_1 (* t_0 t_1)))
(/ (* (+ 1.0 alpha) (/ 1.0 (+ beta (+ alpha 2.0)))) t_0))))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 (beta <= 3.5e+18) {
tmp = ((1.0 + alpha) * (1.0 + beta)) / (t_1 * (t_0 * t_1));
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.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) :: t_1
real(8) :: tmp
t_0 = alpha + (beta + 3.0d0)
t_1 = alpha + (beta + 2.0d0)
if (beta <= 3.5d+18) then
tmp = ((1.0d0 + alpha) * (1.0d0 + beta)) / (t_1 * (t_0 * t_1))
else
tmp = ((1.0d0 + alpha) * (1.0d0 / (beta + (alpha + 2.0d0)))) / t_0
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 (beta <= 3.5e+18) {
tmp = ((1.0 + alpha) * (1.0 + beta)) / (t_1 * (t_0 * t_1));
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / t_0;
}
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 beta <= 3.5e+18: tmp = ((1.0 + alpha) * (1.0 + beta)) / (t_1 * (t_0 * t_1)) else: tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / t_0 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 (beta <= 3.5e+18) tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 + beta)) / Float64(t_1 * Float64(t_0 * t_1))); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta + Float64(alpha + 2.0)))) / t_0); 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 (beta <= 3.5e+18)
tmp = ((1.0 + alpha) * (1.0 + beta)) / (t_1 * (t_0 * t_1));
else
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.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 + 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3.5e+18], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $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}\;\beta \leq 3.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \left(1 + \beta\right)}{t_1 \cdot \left(t_0 \cdot t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta + \left(\alpha + 2\right)}}{t_0}\\
\end{array}
\end{array}
if beta < 3.5e18Initial program 99.9%
associate-/l/99.5%
associate-/r*93.8%
associate-+l+93.8%
+-commutative93.8%
associate-+r+93.8%
associate-+l+93.8%
distribute-rgt1-in93.8%
*-rgt-identity93.8%
distribute-lft-out93.8%
*-commutative93.8%
metadata-eval93.8%
associate-+l+93.8%
+-commutative93.8%
Simplified93.7%
if 3.5e18 < beta Initial program 75.9%
associate-/l/69.6%
associate-+l+69.6%
+-commutative69.6%
associate-+r+69.6%
associate-+l+69.6%
distribute-rgt1-in69.6%
*-rgt-identity69.6%
distribute-lft-out69.6%
+-commutative69.6%
associate-*l/89.7%
*-commutative89.7%
associate-*r/89.1%
Simplified89.1%
associate-*r/89.7%
+-commutative89.7%
Applied egg-rr89.7%
associate-/r*99.7%
associate-*r/75.9%
+-commutative75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 79.6%
Final simplification90.1%
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 2e+42)
(* (/ (+ 1.0 beta) (+ beta 3.0)) (/ (+ 1.0 alpha) (* t_0 t_0)))
(/
(* (+ 1.0 alpha) (/ 1.0 (+ beta (+ alpha 2.0))))
(+ alpha (+ beta 3.0))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 2e+42) {
tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0));
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 2d+42) then
tmp = ((1.0d0 + beta) / (beta + 3.0d0)) * ((1.0d0 + alpha) / (t_0 * t_0))
else
tmp = ((1.0d0 + alpha) * (1.0d0 / (beta + (alpha + 2.0d0)))) / (alpha + (beta + 3.0d0))
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 <= 2e+42) {
tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0));
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 2e+42: tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0)) else: tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (alpha + (beta + 3.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 <= 2e+42) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 3.0)) * Float64(Float64(1.0 + alpha) / Float64(t_0 * t_0))); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta + Float64(alpha + 2.0)))) / Float64(alpha + Float64(beta + 3.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 <= 2e+42)
tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0));
else
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 2e+42], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 2 \cdot 10^{+42}:\\
\;\;\;\;\frac{1 + \beta}{\beta + 3} \cdot \frac{1 + \alpha}{t_0 \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta + \left(\alpha + 2\right)}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 2.00000000000000009e42Initial program 99.8%
associate-/l/99.5%
associate-/l/93.6%
associate-+l+93.6%
+-commutative93.6%
associate-+r+93.6%
associate-+l+93.6%
distribute-rgt1-in93.6%
*-rgt-identity93.6%
distribute-lft-out93.6%
+-commutative93.6%
times-frac99.4%
Simplified99.5%
Taylor expanded in alpha around 0 83.2%
if 2.00000000000000009e42 < beta Initial program 71.7%
associate-/l/64.3%
associate-+l+64.3%
+-commutative64.3%
associate-+r+64.3%
associate-+l+64.3%
distribute-rgt1-in64.3%
*-rgt-identity64.3%
distribute-lft-out64.3%
+-commutative64.3%
associate-*l/87.9%
*-commutative87.9%
associate-*r/87.9%
Simplified87.9%
associate-*r/87.9%
+-commutative87.9%
Applied egg-rr87.9%
associate-/r*99.8%
associate-*r/71.7%
+-commutative71.7%
+-commutative71.7%
*-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
div-inv99.8%
associate-+l+99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.8%
Final simplification83.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 4.0)
(*
(+ 1.0 alpha)
(/ (/ (/ 1.0 (+ alpha 2.0)) (+ alpha 3.0)) (+ alpha (+ beta 2.0))))
(/
(* (+ 1.0 alpha) (/ 1.0 (+ beta (+ alpha 2.0))))
(+ alpha (+ beta 3.0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = (1.0 + alpha) * (((1.0 / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + (beta + 2.0)));
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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 = (1.0d0 + alpha) * (((1.0d0 / (alpha + 2.0d0)) / (alpha + 3.0d0)) / (alpha + (beta + 2.0d0)))
else
tmp = ((1.0d0 + alpha) * (1.0d0 / (beta + (alpha + 2.0d0)))) / (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 = (1.0 + alpha) * (((1.0 / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + (beta + 2.0)));
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.0: tmp = (1.0 + alpha) * (((1.0 / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + (beta + 2.0))) else: tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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(1.0 + alpha) * Float64(Float64(Float64(1.0 / Float64(alpha + 2.0)) / Float64(alpha + 3.0)) / Float64(alpha + Float64(beta + 2.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta + Float64(alpha + 2.0)))) / 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 = (1.0 + alpha) * (((1.0 / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + (beta + 2.0)));
else
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{\frac{1}{\alpha + 2}}{\alpha + 3}}{\alpha + \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta + \left(\alpha + 2\right)}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 4Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+l+99.5%
distribute-rgt1-in99.5%
*-rgt-identity99.5%
distribute-lft-out99.5%
+-commutative99.5%
associate-*l/99.4%
*-commutative99.4%
associate-*r/93.6%
Simplified93.6%
div-inv93.6%
+-commutative93.6%
Applied egg-rr93.6%
associate-*l/93.6%
*-commutative93.6%
+-commutative93.6%
associate-+l+93.6%
+-commutative93.6%
associate-+l+93.6%
Applied egg-rr93.6%
associate-*r/93.6%
*-rgt-identity93.6%
*-commutative93.6%
associate-+r+93.6%
+-commutative93.6%
+-commutative93.6%
associate-+r+93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in beta around 0 91.7%
associate-/r*91.7%
+-commutative91.7%
+-commutative91.7%
Simplified91.7%
if 4 < beta Initial program 77.2%
associate-/l/71.3%
associate-+l+71.3%
+-commutative71.3%
associate-+r+71.3%
associate-+l+71.3%
distribute-rgt1-in71.3%
*-rgt-identity71.3%
distribute-lft-out71.3%
+-commutative71.3%
associate-*l/90.2%
*-commutative90.2%
associate-*r/89.7%
Simplified89.7%
associate-*r/90.2%
+-commutative90.2%
Applied egg-rr90.2%
associate-/r*99.7%
associate-*r/77.2%
+-commutative77.2%
+-commutative77.2%
*-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 78.7%
Final simplification88.1%
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))))
(if (<= beta 7.6e+15)
(/ (/ (/ (+ 1.0 beta) (+ beta 2.0)) (+ alpha (+ beta 2.0))) t_0)
(/ (* (+ 1.0 alpha) (/ 1.0 (+ beta (+ alpha 2.0)))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double tmp;
if (beta <= 7.6e+15) {
tmp = (((1.0 + beta) / (beta + 2.0)) / (alpha + (beta + 2.0))) / t_0;
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.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 + 3.0d0)
if (beta <= 7.6d+15) then
tmp = (((1.0d0 + beta) / (beta + 2.0d0)) / (alpha + (beta + 2.0d0))) / t_0
else
tmp = ((1.0d0 + alpha) * (1.0d0 / (beta + (alpha + 2.0d0)))) / t_0
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 tmp;
if (beta <= 7.6e+15) {
tmp = (((1.0 + beta) / (beta + 2.0)) / (alpha + (beta + 2.0))) / t_0;
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 3.0) tmp = 0 if beta <= 7.6e+15: tmp = (((1.0 + beta) / (beta + 2.0)) / (alpha + (beta + 2.0))) / t_0 else: tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 3.0)) tmp = 0.0 if (beta <= 7.6e+15) tmp = Float64(Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) / Float64(alpha + Float64(beta + 2.0))) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta + Float64(alpha + 2.0)))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 3.0);
tmp = 0.0;
if (beta <= 7.6e+15)
tmp = (((1.0 + beta) / (beta + 2.0)) / (alpha + (beta + 2.0))) / t_0;
else
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.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 + 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 7.6e+15], N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 3\right)\\
\mathbf{if}\;\beta \leq 7.6 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{\frac{1 + \beta}{\beta + 2}}{\alpha + \left(\beta + 2\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta + \left(\alpha + 2\right)}}{t_0}\\
\end{array}
\end{array}
if beta < 7.6e15Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+l+99.5%
distribute-rgt1-in99.5%
*-rgt-identity99.5%
distribute-lft-out99.5%
+-commutative99.5%
associate-*l/99.4%
*-commutative99.4%
associate-*r/93.7%
Simplified93.7%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
associate-/r*99.9%
associate-*r/99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-*r/99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 84.7%
if 7.6e15 < beta Initial program 75.9%
associate-/l/69.6%
associate-+l+69.6%
+-commutative69.6%
associate-+r+69.6%
associate-+l+69.6%
distribute-rgt1-in69.6%
*-rgt-identity69.6%
distribute-lft-out69.6%
+-commutative69.6%
associate-*l/89.7%
*-commutative89.7%
associate-*r/89.1%
Simplified89.1%
associate-*r/89.7%
+-commutative89.7%
Applied egg-rr89.7%
associate-/r*99.7%
associate-*r/75.9%
+-commutative75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 79.6%
Final simplification83.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 1.2)
(/ (/ (/ (+ 1.0 alpha) (+ alpha 2.0)) (+ alpha 3.0)) (+ alpha 2.0))
(/
(* (+ 1.0 alpha) (/ 1.0 (+ beta (+ alpha 2.0))))
(+ alpha (+ beta 3.0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.2) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0);
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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 <= 1.2d0) then
tmp = (((1.0d0 + alpha) / (alpha + 2.0d0)) / (alpha + 3.0d0)) / (alpha + 2.0d0)
else
tmp = ((1.0d0 + alpha) * (1.0d0 / (beta + (alpha + 2.0d0)))) / (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 <= 1.2) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0);
} else {
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.2: tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0) else: tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.2) tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0)) / Float64(alpha + 3.0)) / Float64(alpha + 2.0)); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta + Float64(alpha + 2.0)))) / 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 <= 1.2)
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0);
else
tmp = ((1.0 + alpha) * (1.0 / (beta + (alpha + 2.0)))) / (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, 1.2], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 1.2:\\
\;\;\;\;\frac{\frac{\frac{1 + \alpha}{\alpha + 2}}{\alpha + 3}}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta + \left(\alpha + 2\right)}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 1.19999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*93.6%
associate-+l+93.6%
+-commutative93.6%
associate-+r+93.6%
associate-+l+93.6%
distribute-rgt1-in93.6%
*-rgt-identity93.6%
distribute-lft-out93.6%
*-commutative93.6%
metadata-eval93.6%
associate-+l+93.6%
+-commutative93.6%
Simplified93.6%
distribute-lft-in93.6%
Applied egg-rr93.6%
Taylor expanded in beta around 0 92.0%
associate-/r*97.9%
*-commutative97.9%
distribute-lft-in97.9%
associate-/r*98.3%
+-commutative98.3%
+-commutative98.3%
+-commutative98.3%
Simplified98.3%
if 1.19999999999999996 < beta Initial program 77.5%
associate-/l/71.7%
associate-+l+71.7%
+-commutative71.7%
associate-+r+71.7%
associate-+l+71.7%
distribute-rgt1-in71.7%
*-rgt-identity71.7%
distribute-lft-out71.7%
+-commutative71.7%
associate-*l/90.3%
*-commutative90.3%
associate-*r/89.8%
Simplified89.8%
associate-*r/90.3%
+-commutative90.3%
Applied egg-rr90.3%
associate-/r*99.7%
associate-*r/77.5%
+-commutative77.5%
+-commutative77.5%
*-commutative77.5%
+-commutative77.5%
+-commutative77.5%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 77.9%
Final simplification92.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 0.58) (* (/ (+ 1.0 beta) (+ beta 2.0)) 0.16666666666666666) (/ (/ (+ 1.0 alpha) (+ alpha (+ beta 2.0))) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 0.58) {
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (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 <= 0.58d0) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) * 0.16666666666666666d0
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 2.0d0))) / (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 <= 0.58) {
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 0.58: tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666 else: tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 0.58) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) * 0.16666666666666666); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 2.0))) / 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 <= 0.58)
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
else
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (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, 0.58], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $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 0.58:\\
\;\;\;\;\frac{1 + \beta}{\beta + 2} \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + \left(\beta + 2\right)}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 0.57999999999999996Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+l+99.5%
distribute-rgt1-in99.5%
*-rgt-identity99.5%
distribute-lft-out99.5%
+-commutative99.5%
associate-*r/99.5%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.2%
+-commutative98.2%
Simplified98.2%
Taylor expanded in alpha around 0 58.2%
if 0.57999999999999996 < beta Initial program 77.5%
associate-/l/71.7%
associate-+l+71.7%
+-commutative71.7%
associate-+r+71.7%
associate-+l+71.7%
distribute-rgt1-in71.7%
*-rgt-identity71.7%
distribute-lft-out71.7%
+-commutative71.7%
associate-*l/90.3%
*-commutative90.3%
associate-*r/89.8%
Simplified89.8%
associate-*r/90.3%
+-commutative90.3%
Applied egg-rr90.3%
associate-/r*99.7%
associate-*r/77.5%
+-commutative77.5%
+-commutative77.5%
*-commutative77.5%
+-commutative77.5%
+-commutative77.5%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 77.9%
Final simplification63.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.2) (/ (/ (/ (+ 1.0 alpha) (+ alpha 2.0)) (+ alpha 3.0)) (+ alpha 2.0)) (/ (/ (+ 1.0 alpha) (+ alpha (+ beta 2.0))) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.2) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0);
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (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 <= 1.2d0) then
tmp = (((1.0d0 + alpha) / (alpha + 2.0d0)) / (alpha + 3.0d0)) / (alpha + 2.0d0)
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 2.0d0))) / (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 <= 1.2) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0);
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.2: tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0) else: tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.2) tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0)) / Float64(alpha + 3.0)) / Float64(alpha + 2.0)); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 2.0))) / 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 <= 1.2)
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / (alpha + 2.0);
else
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) / (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, 1.2], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $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 1.2:\\
\;\;\;\;\frac{\frac{\frac{1 + \alpha}{\alpha + 2}}{\alpha + 3}}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + \left(\beta + 2\right)}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 1.19999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*93.6%
associate-+l+93.6%
+-commutative93.6%
associate-+r+93.6%
associate-+l+93.6%
distribute-rgt1-in93.6%
*-rgt-identity93.6%
distribute-lft-out93.6%
*-commutative93.6%
metadata-eval93.6%
associate-+l+93.6%
+-commutative93.6%
Simplified93.6%
distribute-lft-in93.6%
Applied egg-rr93.6%
Taylor expanded in beta around 0 92.0%
associate-/r*97.9%
*-commutative97.9%
distribute-lft-in97.9%
associate-/r*98.3%
+-commutative98.3%
+-commutative98.3%
+-commutative98.3%
Simplified98.3%
if 1.19999999999999996 < beta Initial program 77.5%
associate-/l/71.7%
associate-+l+71.7%
+-commutative71.7%
associate-+r+71.7%
associate-+l+71.7%
distribute-rgt1-in71.7%
*-rgt-identity71.7%
distribute-lft-out71.7%
+-commutative71.7%
associate-*l/90.3%
*-commutative90.3%
associate-*r/89.8%
Simplified89.8%
associate-*r/90.3%
+-commutative90.3%
Applied egg-rr90.3%
associate-/r*99.7%
associate-*r/77.5%
+-commutative77.5%
+-commutative77.5%
*-commutative77.5%
+-commutative77.5%
+-commutative77.5%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 77.9%
Final simplification92.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.75) (* (/ (+ 1.0 beta) (+ beta 2.0)) 0.16666666666666666) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.75) {
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
} 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 <= 1.75d0) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) * 0.16666666666666666d0
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 <= 1.75) {
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
} 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 <= 1.75: tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666 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 <= 1.75) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) * 0.16666666666666666); 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 <= 1.75)
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
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, 1.75], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $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 1.75:\\
\;\;\;\;\frac{1 + \beta}{\beta + 2} \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 1.75Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+l+99.5%
distribute-rgt1-in99.5%
*-rgt-identity99.5%
distribute-lft-out99.5%
+-commutative99.5%
associate-*r/99.5%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in beta around 0 97.8%
+-commutative97.8%
Simplified97.8%
Taylor expanded in alpha around 0 58.0%
if 1.75 < beta Initial program 77.2%
associate-/l/71.3%
associate-+l+71.3%
+-commutative71.3%
associate-+r+71.3%
associate-+l+71.3%
distribute-rgt1-in71.3%
*-rgt-identity71.3%
distribute-lft-out71.3%
+-commutative71.3%
associate-*l/90.2%
*-commutative90.2%
associate-*r/89.7%
Simplified89.7%
associate-*r/90.2%
+-commutative90.2%
Applied egg-rr90.2%
associate-/r*99.7%
associate-*r/77.2%
+-commutative77.2%
+-commutative77.2%
*-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 77.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 2.9) (* (/ (+ 1.0 beta) (+ beta 2.0)) 0.16666666666666666) (/ (/ (+ 1.0 alpha) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.9) {
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
} 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 <= 2.9d0) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) * 0.16666666666666666d0
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 <= 2.9) {
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.9: tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666 else: tmp = ((1.0 + alpha) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.9) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) * 0.16666666666666666); 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 <= 2.9)
tmp = ((1.0 + beta) / (beta + 2.0)) * 0.16666666666666666;
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, 2.9], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 0.16666666666666666), $MachinePrecision], 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 2.9:\\
\;\;\;\;\frac{1 + \beta}{\beta + 2} \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 2.89999999999999991Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+l+99.5%
distribute-rgt1-in99.5%
*-rgt-identity99.5%
distribute-lft-out99.5%
+-commutative99.5%
associate-*r/99.5%
associate-*r/99.5%
Simplified99.5%
Taylor expanded in beta around 0 97.8%
+-commutative97.8%
Simplified97.8%
Taylor expanded in alpha around 0 58.0%
if 2.89999999999999991 < beta Initial program 77.2%
associate-/l/71.3%
associate-+l+71.3%
+-commutative71.3%
associate-+r+71.3%
associate-+l+71.3%
distribute-rgt1-in71.3%
*-rgt-identity71.3%
distribute-lft-out71.3%
+-commutative71.3%
associate-*l/90.2%
*-commutative90.2%
associate-*r/89.7%
Simplified89.7%
associate-*r/90.2%
+-commutative90.2%
Applied egg-rr90.2%
associate-/r*99.7%
associate-*r/77.2%
+-commutative77.2%
+-commutative77.2%
*-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
div-inv99.7%
associate-+l+99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 73.9%
unpow273.9%
associate-/r*77.5%
Simplified77.5%
Final simplification63.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 2.75e+94) (/ 1.0 beta) (/ 1.0 (* alpha alpha))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 2.75e+94) {
tmp = 1.0 / beta;
} else {
tmp = 1.0 / (alpha * 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 (alpha <= 2.75d+94) then
tmp = 1.0d0 / beta
else
tmp = 1.0d0 / (alpha * alpha)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 2.75e+94) {
tmp = 1.0 / beta;
} else {
tmp = 1.0 / (alpha * alpha);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 2.75e+94: tmp = 1.0 / beta else: tmp = 1.0 / (alpha * alpha) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 2.75e+94) tmp = Float64(1.0 / beta); else tmp = Float64(1.0 / Float64(alpha * alpha)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 2.75e+94)
tmp = 1.0 / beta;
else
tmp = 1.0 / (alpha * 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[alpha, 2.75e+94], N[(1.0 / beta), $MachinePrecision], N[(1.0 / N[(alpha * alpha), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 2.75 \cdot 10^{+94}:\\
\;\;\;\;\frac{1}{\beta}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\alpha \cdot \alpha}\\
\end{array}
\end{array}
if alpha < 2.7499999999999999e94Initial program 99.8%
Taylor expanded in beta around -inf 28.4%
Taylor expanded in alpha around inf 4.5%
if 2.7499999999999999e94 < alpha Initial program 80.7%
associate-/l/76.2%
associate-/l/61.8%
associate-+l+61.8%
+-commutative61.8%
associate-+r+61.8%
associate-+l+61.8%
distribute-rgt1-in61.8%
*-rgt-identity61.8%
distribute-lft-out61.8%
+-commutative61.8%
times-frac92.2%
Simplified92.2%
Taylor expanded in alpha around inf 91.1%
+-commutative91.1%
unpow291.1%
Simplified91.1%
Taylor expanded in beta around 0 90.1%
unpow290.1%
Simplified90.1%
Final simplification31.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (+ 1.0 alpha) (* beta beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
return (1.0 + alpha) / (beta * 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 = (1.0d0 + alpha) / (beta * beta)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return (1.0 + alpha) / (beta * beta);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return (1.0 + alpha) / (beta * beta)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(1.0 + alpha) / Float64(beta * beta)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = (1.0 + alpha) / (beta * beta);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1 + \alpha}{\beta \cdot \beta}
\end{array}
Initial program 93.7%
associate-/l/91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+r+91.8%
associate-+l+91.8%
distribute-rgt1-in91.8%
*-rgt-identity91.8%
distribute-lft-out91.8%
+-commutative91.8%
associate-*l/96.9%
*-commutative96.9%
associate-*r/92.5%
Simplified92.5%
associate-*r/96.9%
+-commutative96.9%
Applied egg-rr96.9%
associate-/r*99.8%
associate-*r/93.7%
+-commutative93.7%
+-commutative93.7%
*-commutative93.7%
+-commutative93.7%
+-commutative93.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 22.8%
unpow222.8%
Simplified22.8%
Final simplification22.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (/ (+ 1.0 alpha) beta) beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return ((1.0 + alpha) / beta) / 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 = ((1.0d0 + alpha) / beta) / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return ((1.0 + alpha) / beta) / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return ((1.0 + alpha) / beta) / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(Float64(1.0 + alpha) / beta) / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = ((1.0 + alpha) / beta) / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\frac{1 + \alpha}{\beta}}{\beta}
\end{array}
Initial program 93.7%
associate-/l/91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+r+91.8%
associate-+l+91.8%
distribute-rgt1-in91.8%
*-rgt-identity91.8%
distribute-lft-out91.8%
+-commutative91.8%
associate-*l/96.9%
*-commutative96.9%
associate-*r/92.5%
Simplified92.5%
associate-*r/96.9%
+-commutative96.9%
Applied egg-rr96.9%
associate-/r*99.8%
associate-*r/93.7%
+-commutative93.7%
+-commutative93.7%
*-commutative93.7%
+-commutative93.7%
+-commutative93.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
div-inv99.8%
associate-+l+99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 22.8%
unpow222.8%
associate-/r*23.7%
Simplified23.7%
Final simplification23.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ alpha (* beta beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
return alpha / (beta * 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 = alpha / (beta * beta)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return alpha / (beta * beta);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return alpha / (beta * beta)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(alpha / Float64(beta * beta)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = alpha / (beta * beta);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\alpha}{\beta \cdot \beta}
\end{array}
Initial program 93.7%
associate-/l/91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+r+91.8%
associate-+l+91.8%
distribute-rgt1-in91.8%
*-rgt-identity91.8%
distribute-lft-out91.8%
+-commutative91.8%
associate-*l/96.9%
*-commutative96.9%
associate-*r/92.5%
Simplified92.5%
Taylor expanded in beta around inf 22.8%
unpow222.8%
Simplified22.8%
Taylor expanded in alpha around inf 16.1%
unpow216.1%
Simplified16.1%
Final simplification16.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (/ 1.0 beta) beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return (1.0 / beta) / 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 = (1.0d0 / beta) / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return (1.0 / beta) / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return (1.0 / beta) / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(1.0 / beta) / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = (1.0 / beta) / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(1.0 / beta), $MachinePrecision] / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\frac{1}{\beta}}{\beta}
\end{array}
Initial program 93.7%
associate-/l/91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+r+91.8%
associate-+l+91.8%
distribute-rgt1-in91.8%
*-rgt-identity91.8%
distribute-lft-out91.8%
+-commutative91.8%
associate-*l/96.9%
*-commutative96.9%
associate-*r/92.5%
Simplified92.5%
Taylor expanded in beta around inf 22.8%
unpow222.8%
Simplified22.8%
Taylor expanded in alpha around 0 21.9%
unpow221.9%
associate-/r*21.9%
Simplified21.9%
Final simplification21.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 alpha))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / alpha;
}
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 / alpha
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / alpha;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / alpha
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / alpha) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / alpha;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / alpha), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\alpha}
\end{array}
Initial program 93.7%
associate-/l/91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+r+91.8%
associate-+l+91.8%
distribute-rgt1-in91.8%
*-rgt-identity91.8%
distribute-lft-out91.8%
+-commutative91.8%
associate-*l/96.9%
*-commutative96.9%
associate-*r/92.5%
Simplified92.5%
associate-*r/96.9%
+-commutative96.9%
Applied egg-rr96.9%
associate-/r*99.8%
associate-*r/93.7%
+-commutative93.7%
+-commutative93.7%
*-commutative93.7%
+-commutative93.7%
+-commutative93.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
div-inv99.8%
associate-+l+99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 31.7%
Taylor expanded in alpha around inf 4.5%
Final simplification4.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / 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 = 1.0d0 / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\beta}
\end{array}
Initial program 93.7%
Taylor expanded in beta around -inf 23.4%
Taylor expanded in alpha around inf 4.1%
Final simplification4.1%
herbie shell --seed 2023208
(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)))