
(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 20 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) (/ (/ (+ 1.0 beta) t_0) (+ beta (+ alpha 3.0)))) t_0)))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return ((1.0 + alpha) * (((1.0 + beta) / t_0) / (beta + (alpha + 3.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 = alpha + (beta + 2.0d0)
code = ((1.0d0 + alpha) * (((1.0d0 + beta) / t_0) / (beta + (alpha + 3.0d0)))) / t_0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return ((1.0 + alpha) * (((1.0 + beta) / t_0) / (beta + (alpha + 3.0)))) / t_0;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return ((1.0 + alpha) * (((1.0 + beta) / t_0) / (beta + (alpha + 3.0)))) / t_0
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) return Float64(Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / t_0) / Float64(beta + Float64(alpha + 3.0)))) / t_0) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = ((1.0 + alpha) * (((1.0 + beta) / t_0) / (beta + (alpha + 3.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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(beta + N[(alpha + 3.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 + 2\right)\\
\frac{\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{t_0}}{\beta + \left(\alpha + 3\right)}}{t_0}
\end{array}
\end{array}
Initial program 92.9%
associate-/l/91.6%
associate-/r*83.6%
+-commutative83.6%
associate-+r+83.6%
+-commutative83.6%
associate-+r+83.6%
associate-+r+83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
*-commutative83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
times-frac94.3%
Simplified94.3%
expm1-log1p-u94.3%
expm1-udef72.6%
*-commutative72.6%
+-commutative72.6%
Applied egg-rr72.6%
expm1-def94.3%
expm1-log1p94.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-/r*94.3%
*-commutative94.3%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.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))))
(if (<= beta 450000000.0)
(/ (/ (+ 1.0 beta) (* (+ beta 2.0) (+ beta 3.0))) t_0)
(*
(/ (+ 1.0 alpha) t_0)
(/ (+ 1.0 (/ (- -1.0 alpha) beta)) (+ 3.0 (+ alpha beta)))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 450000000.0) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((1.0 + alpha) / t_0) * ((1.0 + ((-1.0 - alpha) / beta)) / (3.0 + (alpha + beta)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 450000000.0d0) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) * (beta + 3.0d0))) / t_0
else
tmp = ((1.0d0 + alpha) / t_0) * ((1.0d0 + (((-1.0d0) - alpha) / beta)) / (3.0d0 + (alpha + beta)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 450000000.0) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((1.0 + alpha) / t_0) * ((1.0 + ((-1.0 - alpha) / beta)) / (3.0 + (alpha + beta)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 450000000.0: tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0 else: tmp = ((1.0 + alpha) / t_0) * ((1.0 + ((-1.0 - alpha) / beta)) / (3.0 + (alpha + beta))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 450000000.0) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(Float64(1.0 + Float64(Float64(-1.0 - alpha) / beta)) / Float64(3.0 + Float64(alpha + beta)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 450000000.0)
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
else
tmp = ((1.0 + alpha) / t_0) * ((1.0 + ((-1.0 - alpha) / beta)) / (3.0 + (alpha + beta)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 450000000.0], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $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 450000000:\\
\;\;\;\;\frac{\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{t_0} \cdot \frac{1 + \frac{-1 - \alpha}{\beta}}{3 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 4.5e8Initial program 99.9%
associate-/l/99.1%
associate-/r*95.7%
+-commutative95.7%
associate-+r+95.7%
+-commutative95.7%
associate-+r+95.7%
associate-+r+95.7%
distribute-rgt1-in95.7%
+-commutative95.7%
*-commutative95.7%
distribute-rgt1-in95.7%
+-commutative95.7%
times-frac99.1%
Simplified99.1%
expm1-log1p-u99.1%
expm1-udef86.9%
*-commutative86.9%
+-commutative86.9%
Applied egg-rr86.9%
expm1-def99.1%
expm1-log1p99.1%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*r/99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-/r*99.1%
*-commutative99.1%
associate-/r*99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 76.1%
+-commutative76.1%
+-commutative76.1%
Simplified76.1%
if 4.5e8 < beta Initial program 80.7%
associate-/l/78.5%
associate-/r*62.5%
+-commutative62.5%
associate-+r+62.5%
+-commutative62.5%
associate-+r+62.5%
associate-+r+62.5%
distribute-rgt1-in62.5%
+-commutative62.5%
*-commutative62.5%
distribute-rgt1-in62.5%
+-commutative62.5%
times-frac85.9%
Simplified85.9%
expm1-log1p-u85.9%
expm1-udef47.6%
*-commutative47.6%
+-commutative47.6%
Applied egg-rr47.6%
expm1-def85.9%
expm1-log1p85.9%
associate-/r*99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in beta around inf 88.3%
associate-*r/88.3%
distribute-lft-in88.3%
metadata-eval88.3%
neg-mul-188.3%
sub-neg88.3%
Simplified88.3%
Final simplification80.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ alpha (+ beta 2.0)))) (* (/ (/ (+ 1.0 beta) t_0) (+ 3.0 (+ alpha beta))) (/ (+ 1.0 alpha) t_0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + beta) / t_0) / (3.0 + (alpha + beta))) * ((1.0 + alpha) / 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 = alpha + (beta + 2.0d0)
code = (((1.0d0 + beta) / t_0) / (3.0d0 + (alpha + beta))) * ((1.0d0 + alpha) / t_0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + beta) / t_0) / (3.0 + (alpha + beta))) * ((1.0 + alpha) / t_0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return (((1.0 + beta) / t_0) / (3.0 + (alpha + beta))) * ((1.0 + alpha) / t_0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) return Float64(Float64(Float64(Float64(1.0 + beta) / t_0) / Float64(3.0 + Float64(alpha + beta))) * Float64(Float64(1.0 + alpha) / t_0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = (((1.0 + beta) / t_0) / (3.0 + (alpha + beta))) * ((1.0 + alpha) / 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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\frac{\frac{1 + \beta}{t_0}}{3 + \left(\alpha + \beta\right)} \cdot \frac{1 + \alpha}{t_0}
\end{array}
\end{array}
Initial program 92.9%
associate-/l/91.6%
associate-/r*83.6%
+-commutative83.6%
associate-+r+83.6%
+-commutative83.6%
associate-+r+83.6%
associate-+r+83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
*-commutative83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
times-frac94.3%
Simplified94.3%
expm1-log1p-u94.3%
expm1-udef72.6%
*-commutative72.6%
+-commutative72.6%
Applied egg-rr72.6%
expm1-def94.3%
expm1-log1p94.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Final simplification99.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (* (/ (+ 1.0 alpha) (+ alpha (+ beta 2.0))) (/ (/ (+ 1.0 beta) (+ beta 2.0)) (+ 3.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
return ((1.0 + alpha) / (alpha + (beta + 2.0))) * (((1.0 + beta) / (beta + 2.0)) / (3.0 + (alpha + 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) / (alpha + (beta + 2.0d0))) * (((1.0d0 + beta) / (beta + 2.0d0)) / (3.0d0 + (alpha + beta)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return ((1.0 + alpha) / (alpha + (beta + 2.0))) * (((1.0 + beta) / (beta + 2.0)) / (3.0 + (alpha + beta)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return ((1.0 + alpha) / (alpha + (beta + 2.0))) * (((1.0 + beta) / (beta + 2.0)) / (3.0 + (alpha + beta)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 2.0))) * Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) / Float64(3.0 + Float64(alpha + beta)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = ((1.0 + alpha) / (alpha + (beta + 2.0))) * (((1.0 + beta) / (beta + 2.0)) / (3.0 + (alpha + 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] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1 + \alpha}{\alpha + \left(\beta + 2\right)} \cdot \frac{\frac{1 + \beta}{\beta + 2}}{3 + \left(\alpha + \beta\right)}
\end{array}
Initial program 92.9%
associate-/l/91.6%
associate-/r*83.6%
+-commutative83.6%
associate-+r+83.6%
+-commutative83.6%
associate-+r+83.6%
associate-+r+83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
*-commutative83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
times-frac94.3%
Simplified94.3%
expm1-log1p-u94.3%
expm1-udef72.6%
*-commutative72.6%
+-commutative72.6%
Applied egg-rr72.6%
expm1-def94.3%
expm1-log1p94.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 80.3%
Final simplification80.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 4.1e+17)
(/ (/ (+ 1.0 beta) (* (+ beta 2.0) (+ beta 3.0))) (+ alpha (+ beta 2.0)))
(/
(*
(+ 1.0 alpha)
(/ (+ 1.0 (/ (- -1.0 alpha) beta)) (+ beta (+ alpha 3.0))))
beta)))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.1e+17) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / (alpha + (beta + 2.0));
} else {
tmp = ((1.0 + alpha) * ((1.0 + ((-1.0 - alpha) / beta)) / (beta + (alpha + 3.0)))) / 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 <= 4.1d+17) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) * (beta + 3.0d0))) / (alpha + (beta + 2.0d0))
else
tmp = ((1.0d0 + alpha) * ((1.0d0 + (((-1.0d0) - alpha) / beta)) / (beta + (alpha + 3.0d0)))) / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.1e+17) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / (alpha + (beta + 2.0));
} else {
tmp = ((1.0 + alpha) * ((1.0 + ((-1.0 - alpha) / beta)) / (beta + (alpha + 3.0)))) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.1e+17: tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / (alpha + (beta + 2.0)) else: tmp = ((1.0 + alpha) * ((1.0 + ((-1.0 - alpha) / beta)) / (beta + (alpha + 3.0)))) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.1e+17) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))) / Float64(alpha + Float64(beta + 2.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(Float64(1.0 + Float64(Float64(-1.0 - alpha) / beta)) / Float64(beta + Float64(alpha + 3.0)))) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.1e+17)
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / (alpha + (beta + 2.0));
else
tmp = ((1.0 + alpha) * ((1.0 + ((-1.0 - alpha) / beta)) / (beta + (alpha + 3.0)))) / 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, 4.1e+17], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.1 \cdot 10^{+17}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{\alpha + \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1 + \frac{-1 - \alpha}{\beta}}{\beta + \left(\alpha + 3\right)}}{\beta}\\
\end{array}
\end{array}
if beta < 4.1e17Initial program 99.3%
associate-/l/98.5%
associate-/r*95.2%
+-commutative95.2%
associate-+r+95.2%
+-commutative95.2%
associate-+r+95.2%
associate-+r+95.2%
distribute-rgt1-in95.2%
+-commutative95.2%
*-commutative95.2%
distribute-rgt1-in95.2%
+-commutative95.2%
times-frac99.1%
Simplified99.1%
expm1-log1p-u99.1%
expm1-udef85.4%
*-commutative85.4%
+-commutative85.4%
Applied egg-rr85.4%
expm1-def99.1%
expm1-log1p99.1%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*r/99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-/r*99.1%
*-commutative99.1%
associate-/r*99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 76.5%
+-commutative76.5%
+-commutative76.5%
Simplified76.5%
if 4.1e17 < beta Initial program 81.0%
associate-/l/78.7%
associate-/r*62.0%
+-commutative62.0%
associate-+r+62.0%
+-commutative62.0%
associate-+r+62.0%
associate-+r+62.0%
distribute-rgt1-in62.0%
+-commutative62.0%
*-commutative62.0%
distribute-rgt1-in62.0%
+-commutative62.0%
times-frac85.3%
Simplified85.3%
expm1-log1p-u85.3%
expm1-udef48.5%
*-commutative48.5%
+-commutative48.5%
Applied egg-rr48.5%
expm1-def85.3%
expm1-log1p85.3%
associate-/r*99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-/r*85.3%
*-commutative85.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 89.0%
mul-1-neg89.0%
unsub-neg89.0%
Simplified89.0%
Taylor expanded in beta around inf 88.2%
Final simplification80.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 5.8)
(/ (/ (+ 1.0 alpha) (* (+ alpha 3.0) (+ alpha 2.0))) (+ alpha 2.0))
(/
(* (- -1.0 alpha) (/ -1.0 (+ beta (+ alpha 3.0))))
(+ alpha (+ beta 2.0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.8) {
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.0);
} else {
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / (alpha + (beta + 2.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.8d0) then
tmp = ((1.0d0 + alpha) / ((alpha + 3.0d0) * (alpha + 2.0d0))) / (alpha + 2.0d0)
else
tmp = (((-1.0d0) - alpha) * ((-1.0d0) / (beta + (alpha + 3.0d0)))) / (alpha + (beta + 2.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.8) {
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.0);
} else {
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / (alpha + (beta + 2.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.8: tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.0) else: tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / (alpha + (beta + 2.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.8) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(alpha + 3.0) * Float64(alpha + 2.0))) / Float64(alpha + 2.0)); else tmp = Float64(Float64(Float64(-1.0 - alpha) * Float64(-1.0 / Float64(beta + Float64(alpha + 3.0)))) / Float64(alpha + Float64(beta + 2.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.8)
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.0);
else
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / (alpha + (beta + 2.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.8], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(alpha + 3.0), $MachinePrecision] * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.0 - alpha), $MachinePrecision] * N[(-1.0 / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.8:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\alpha + 3\right) \cdot \left(\alpha + 2\right)}}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-1 - \alpha\right) \cdot \frac{-1}{\beta + \left(\alpha + 3\right)}}{\alpha + \left(\beta + 2\right)}\\
\end{array}
\end{array}
if beta < 5.79999999999999982Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
Simplified98.1%
if 5.79999999999999982 < beta Initial program 81.7%
associate-/l/79.6%
associate-/r*64.5%
+-commutative64.5%
associate-+r+64.5%
+-commutative64.5%
associate-+r+64.5%
associate-+r+64.5%
distribute-rgt1-in64.5%
+-commutative64.5%
*-commutative64.5%
distribute-rgt1-in64.4%
+-commutative64.4%
times-frac86.6%
Simplified86.6%
expm1-log1p-u86.6%
expm1-udef48.7%
*-commutative48.7%
+-commutative48.7%
Applied egg-rr48.7%
expm1-def86.6%
expm1-log1p86.6%
associate-/r*99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-/r*86.7%
*-commutative86.7%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 84.9%
Final simplification93.0%
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 6.2)
(/ (/ (+ 1.0 alpha) (* (+ alpha 3.0) (+ alpha 2.0))) t_0)
(/ (* (- -1.0 alpha) (/ -1.0 (+ beta (+ alpha 3.0)))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 6.2) {
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / t_0;
} else {
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 6.2d0) then
tmp = ((1.0d0 + alpha) / ((alpha + 3.0d0) * (alpha + 2.0d0))) / t_0
else
tmp = (((-1.0d0) - alpha) * ((-1.0d0) / (beta + (alpha + 3.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 + 2.0);
double tmp;
if (beta <= 6.2) {
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / t_0;
} else {
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 6.2: tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / t_0 else: tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 6.2) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(alpha + 3.0) * Float64(alpha + 2.0))) / t_0); else tmp = Float64(Float64(Float64(-1.0 - alpha) * Float64(-1.0 / Float64(beta + Float64(alpha + 3.0)))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 6.2)
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / t_0;
else
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 6.2], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(alpha + 3.0), $MachinePrecision] * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(-1.0 - alpha), $MachinePrecision] * N[(-1.0 / N[(beta + N[(alpha + 3.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 + 2\right)\\
\mathbf{if}\;\beta \leq 6.2:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\alpha + 3\right) \cdot \left(\alpha + 2\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-1 - \alpha\right) \cdot \frac{-1}{\beta + \left(\alpha + 3\right)}}{t_0}\\
\end{array}
\end{array}
if beta < 6.20000000000000018Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
+-commutative98.1%
Simplified98.1%
if 6.20000000000000018 < beta Initial program 81.7%
associate-/l/79.6%
associate-/r*64.5%
+-commutative64.5%
associate-+r+64.5%
+-commutative64.5%
associate-+r+64.5%
associate-+r+64.5%
distribute-rgt1-in64.5%
+-commutative64.5%
*-commutative64.5%
distribute-rgt1-in64.4%
+-commutative64.4%
times-frac86.6%
Simplified86.6%
expm1-log1p-u86.6%
expm1-udef48.7%
*-commutative48.7%
+-commutative48.7%
Applied egg-rr48.7%
expm1-def86.6%
expm1-log1p86.6%
associate-/r*99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-/r*86.7%
*-commutative86.7%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 84.9%
Final simplification93.0%
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 3.2e+17)
(/ (/ (+ 1.0 beta) (* (+ beta 2.0) (+ beta 3.0))) t_0)
(/ (* (- -1.0 alpha) (/ -1.0 (+ beta (+ alpha 3.0)))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 3.2e+17) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 3.2d+17) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) * (beta + 3.0d0))) / t_0
else
tmp = (((-1.0d0) - alpha) * ((-1.0d0) / (beta + (alpha + 3.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 + 2.0);
double tmp;
if (beta <= 3.2e+17) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 3.2e+17: tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0 else: tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 3.2e+17) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))) / t_0); else tmp = Float64(Float64(Float64(-1.0 - alpha) * Float64(-1.0 / Float64(beta + Float64(alpha + 3.0)))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 3.2e+17)
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
else
tmp = ((-1.0 - alpha) * (-1.0 / (beta + (alpha + 3.0)))) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3.2e+17], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(-1.0 - alpha), $MachinePrecision] * N[(-1.0 / N[(beta + N[(alpha + 3.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 + 2\right)\\
\mathbf{if}\;\beta \leq 3.2 \cdot 10^{+17}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-1 - \alpha\right) \cdot \frac{-1}{\beta + \left(\alpha + 3\right)}}{t_0}\\
\end{array}
\end{array}
if beta < 3.2e17Initial program 99.3%
associate-/l/98.5%
associate-/r*95.2%
+-commutative95.2%
associate-+r+95.2%
+-commutative95.2%
associate-+r+95.2%
associate-+r+95.2%
distribute-rgt1-in95.2%
+-commutative95.2%
*-commutative95.2%
distribute-rgt1-in95.2%
+-commutative95.2%
times-frac99.1%
Simplified99.1%
expm1-log1p-u99.1%
expm1-udef85.4%
*-commutative85.4%
+-commutative85.4%
Applied egg-rr85.4%
expm1-def99.1%
expm1-log1p99.1%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*r/99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-/r*99.1%
*-commutative99.1%
associate-/r*99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 76.5%
+-commutative76.5%
+-commutative76.5%
Simplified76.5%
if 3.2e17 < beta Initial program 81.0%
associate-/l/78.7%
associate-/r*62.0%
+-commutative62.0%
associate-+r+62.0%
+-commutative62.0%
associate-+r+62.0%
associate-+r+62.0%
distribute-rgt1-in62.0%
+-commutative62.0%
*-commutative62.0%
distribute-rgt1-in62.0%
+-commutative62.0%
times-frac85.3%
Simplified85.3%
expm1-log1p-u85.3%
expm1-udef48.5%
*-commutative48.5%
+-commutative48.5%
Applied egg-rr48.5%
expm1-def85.3%
expm1-log1p85.3%
associate-/r*99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-/r*85.3%
*-commutative85.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 88.6%
Final simplification80.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.5) (/ (/ (+ 1.0 alpha) (* (+ alpha 3.0) (+ alpha 2.0))) (+ alpha 2.0)) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.5) {
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.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 <= 4.5d0) then
tmp = ((1.0d0 + alpha) / ((alpha + 3.0d0) * (alpha + 2.0d0))) / (alpha + 2.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 <= 4.5) {
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.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 <= 4.5: tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.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 <= 4.5) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(alpha + 3.0) * Float64(alpha + 2.0))) / Float64(alpha + 2.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 <= 4.5)
tmp = ((1.0 + alpha) / ((alpha + 3.0) * (alpha + 2.0))) / (alpha + 2.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, 4.5], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(alpha + 3.0), $MachinePrecision] * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $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.5:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\alpha + 3\right) \cdot \left(\alpha + 2\right)}}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 4.5Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
Simplified98.1%
if 4.5 < beta Initial program 81.7%
Taylor expanded in beta around -inf 84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
mul-1-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
*-un-lft-identity84.2%
associate-/l/79.6%
metadata-eval79.6%
associate-+l+79.6%
metadata-eval79.6%
+-commutative79.6%
associate-+r+79.6%
Applied egg-rr79.6%
associate-*r/79.6%
times-frac84.1%
*-commutative84.1%
associate-*r/84.2%
*-rgt-identity84.2%
distribute-frac-neg84.2%
+-commutative84.2%
associate-+r+84.2%
+-commutative84.2%
Simplified84.2%
Final simplification92.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.5) (/ (+ 1.0 beta) (* (+ beta 2.0) (+ 6.0 (* beta 5.0)))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.5) {
tmp = (1.0 + beta) / ((beta + 2.0) * (6.0 + (beta * 5.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 <= 4.5d0) then
tmp = (1.0d0 + beta) / ((beta + 2.0d0) * (6.0d0 + (beta * 5.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 <= 4.5) {
tmp = (1.0 + beta) / ((beta + 2.0) * (6.0 + (beta * 5.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 <= 4.5: tmp = (1.0 + beta) / ((beta + 2.0) * (6.0 + (beta * 5.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 <= 4.5) tmp = Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * 5.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 <= 4.5)
tmp = (1.0 + beta) / ((beta + 2.0) * (6.0 + (beta * 5.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, 4.5], N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * 5.0), $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.5:\\
\;\;\;\;\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot 5\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 4.5Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.3%
Taylor expanded in alpha around 0 74.4%
+-commutative74.4%
*-commutative74.4%
Simplified74.4%
if 4.5 < beta Initial program 81.7%
Taylor expanded in beta around -inf 84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
mul-1-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
*-un-lft-identity84.2%
associate-/l/79.6%
metadata-eval79.6%
associate-+l+79.6%
metadata-eval79.6%
+-commutative79.6%
associate-+r+79.6%
Applied egg-rr79.6%
associate-*r/79.6%
times-frac84.1%
*-commutative84.1%
associate-*r/84.2%
*-rgt-identity84.2%
distribute-frac-neg84.2%
+-commutative84.2%
associate-+r+84.2%
+-commutative84.2%
Simplified84.2%
Final simplification78.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 7.2)
(/
(+ 0.16666666666666666 (* alpha 0.027777777777777776))
(+ alpha (+ beta 2.0)))
(/ (/ (+ 1.0 alpha) beta) (+ 1.0 beta))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.2) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.0));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + 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 <= 7.2d0) then
tmp = (0.16666666666666666d0 + (alpha * 0.027777777777777776d0)) / (alpha + (beta + 2.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (1.0d0 + beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.2) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.0));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.2: tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.0)) else: tmp = ((1.0 + alpha) / beta) / (1.0 + beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.2) tmp = Float64(Float64(0.16666666666666666 + Float64(alpha * 0.027777777777777776)) / Float64(alpha + Float64(beta + 2.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(1.0 + beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.2)
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.0));
else
tmp = ((1.0 + alpha) / beta) / (1.0 + 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, 7.2], N[(N[(0.16666666666666666 + N[(alpha * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.2:\\
\;\;\;\;\frac{0.16666666666666666 + \alpha \cdot 0.027777777777777776}{\alpha + \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{1 + \beta}\\
\end{array}
\end{array}
if beta < 7.20000000000000018Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in alpha around 0 74.8%
*-commutative74.8%
Simplified74.8%
if 7.20000000000000018 < beta Initial program 81.7%
Taylor expanded in beta around -inf 84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
mul-1-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in beta around inf 84.0%
Final simplification78.3%
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 6.2)
(/ (+ 0.16666666666666666 (* alpha 0.027777777777777776)) t_0)
(/ (/ (+ 1.0 alpha) beta) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 6.2) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / t_0;
} else {
tmp = ((1.0 + alpha) / beta) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 6.2d0) then
tmp = (0.16666666666666666d0 + (alpha * 0.027777777777777776d0)) / t_0
else
tmp = ((1.0d0 + alpha) / beta) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 6.2) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / t_0;
} else {
tmp = ((1.0 + alpha) / beta) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 6.2: tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / t_0 else: tmp = ((1.0 + alpha) / beta) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 6.2) tmp = Float64(Float64(0.16666666666666666 + Float64(alpha * 0.027777777777777776)) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 6.2)
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / t_0;
else
tmp = ((1.0 + alpha) / beta) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 6.2], N[(N[(0.16666666666666666 + N[(alpha * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 6.2:\\
\;\;\;\;\frac{0.16666666666666666 + \alpha \cdot 0.027777777777777776}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 6.20000000000000018Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in alpha around 0 74.8%
*-commutative74.8%
Simplified74.8%
if 6.20000000000000018 < beta Initial program 81.7%
associate-/l/79.6%
associate-/r*64.5%
+-commutative64.5%
associate-+r+64.5%
+-commutative64.5%
associate-+r+64.5%
associate-+r+64.5%
distribute-rgt1-in64.5%
+-commutative64.5%
*-commutative64.5%
distribute-rgt1-in64.4%
+-commutative64.4%
times-frac86.6%
Simplified86.6%
expm1-log1p-u86.6%
expm1-udef48.7%
*-commutative48.7%
+-commutative48.7%
Applied egg-rr48.7%
expm1-def86.6%
expm1-log1p86.6%
associate-/r*99.6%
+-commutative99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-/r*86.7%
*-commutative86.7%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 84.2%
Final simplification78.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 5.5)
(/
(+ 0.16666666666666666 (* alpha 0.027777777777777776))
(+ alpha (+ beta 2.0)))
(/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.5) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.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.5d0) then
tmp = (0.16666666666666666d0 + (alpha * 0.027777777777777776d0)) / (alpha + (beta + 2.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.5) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.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.5: tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.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.5) tmp = Float64(Float64(0.16666666666666666 + Float64(alpha * 0.027777777777777776)) / Float64(alpha + Float64(beta + 2.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.5)
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (beta + 2.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.5], N[(N[(0.16666666666666666 + N[(alpha * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.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.5:\\
\;\;\;\;\frac{0.16666666666666666 + \alpha \cdot 0.027777777777777776}{\alpha + \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5.5Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in beta around 0 98.1%
+-commutative98.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in alpha around 0 74.8%
*-commutative74.8%
Simplified74.8%
if 5.5 < beta Initial program 81.7%
Taylor expanded in beta around -inf 84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
mul-1-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
*-un-lft-identity84.2%
associate-/l/79.6%
metadata-eval79.6%
associate-+l+79.6%
metadata-eval79.6%
+-commutative79.6%
associate-+r+79.6%
Applied egg-rr79.6%
associate-*r/79.6%
times-frac84.1%
*-commutative84.1%
associate-*r/84.2%
*-rgt-identity84.2%
distribute-frac-neg84.2%
+-commutative84.2%
associate-+r+84.2%
+-commutative84.2%
Simplified84.2%
Final simplification78.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 8.0)
(/ 0.16666666666666666 (+ beta 2.0))
(if (<= beta 1.45e+154)
(/ (+ 1.0 alpha) (* beta beta))
(/ (/ alpha beta) (+ 1.0 beta)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else if (beta <= 1.45e+154) {
tmp = (1.0 + alpha) / (beta * beta);
} else {
tmp = (alpha / beta) / (1.0 + 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 <= 8.0d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else if (beta <= 1.45d+154) then
tmp = (1.0d0 + alpha) / (beta * beta)
else
tmp = (alpha / beta) / (1.0d0 + beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else if (beta <= 1.45e+154) {
tmp = (1.0 + alpha) / (beta * beta);
} else {
tmp = (alpha / beta) / (1.0 + beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.0: tmp = 0.16666666666666666 / (beta + 2.0) elif beta <= 1.45e+154: tmp = (1.0 + alpha) / (beta * beta) else: tmp = (alpha / beta) / (1.0 + beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.0) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); elseif (beta <= 1.45e+154) tmp = Float64(Float64(1.0 + alpha) / Float64(beta * beta)); else tmp = Float64(Float64(alpha / beta) / Float64(1.0 + beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 8.0)
tmp = 0.16666666666666666 / (beta + 2.0);
elseif (beta <= 1.45e+154)
tmp = (1.0 + alpha) / (beta * beta);
else
tmp = (alpha / beta) / (1.0 + 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, 8.0], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 1.45e+154], N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision], N[(N[(alpha / beta), $MachinePrecision] / N[(1.0 + beta), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{elif}\;\beta \leq 1.45 \cdot 10^{+154}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha}{\beta}}{1 + \beta}\\
\end{array}
\end{array}
if beta < 8Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in alpha around 0 75.1%
Taylor expanded in beta around 0 74.1%
distribute-lft-in74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in alpha around 0 74.2%
if 8 < beta < 1.4499999999999999e154Initial program 93.6%
associate-/l/91.9%
associate-/r*62.2%
+-commutative62.2%
associate-+r+62.2%
+-commutative62.2%
associate-+r+62.2%
associate-+r+62.2%
distribute-rgt1-in62.2%
+-commutative62.2%
*-commutative62.2%
distribute-rgt1-in62.2%
+-commutative62.2%
times-frac95.7%
Simplified95.7%
Taylor expanded in beta around inf 77.7%
unpow277.7%
Simplified77.7%
if 1.4499999999999999e154 < beta Initial program 69.3%
Taylor expanded in beta around -inf 90.6%
associate-*r/90.6%
mul-1-neg90.6%
sub-neg90.6%
mul-1-neg90.6%
distribute-neg-in90.6%
+-commutative90.6%
mul-1-neg90.6%
distribute-lft-in90.6%
metadata-eval90.6%
mul-1-neg90.6%
unsub-neg90.6%
Simplified90.6%
Taylor expanded in alpha around inf 90.6%
Taylor expanded in beta around inf 90.5%
Final simplification77.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.2) (/ 0.16666666666666666 (+ beta 2.0)) (/ (/ (+ 1.0 alpha) beta) (+ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.2) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + 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 <= 7.2d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = ((1.0d0 + alpha) / beta) / (1.0d0 + beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.2) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.2: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = ((1.0 + alpha) / beta) / (1.0 + beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.2) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(1.0 + beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.2)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = ((1.0 + alpha) / beta) / (1.0 + 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, 7.2], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.2:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{1 + \beta}\\
\end{array}
\end{array}
if beta < 7.20000000000000018Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in alpha around 0 75.1%
Taylor expanded in beta around 0 74.1%
distribute-lft-in74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in alpha around 0 74.2%
if 7.20000000000000018 < beta Initial program 81.7%
Taylor expanded in beta around -inf 84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
mul-1-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in beta around inf 84.0%
Final simplification77.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.4) (/ 0.16666666666666666 (+ beta 2.0)) (/ 1.0 (* beta (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.4d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = 1.0d0 / (beta * (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.4: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = 1.0 / (beta * (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.4) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); 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 <= 5.4)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = 1.0 / (beta * (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.4], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], 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 5.4:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5.4000000000000004Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in alpha around 0 75.1%
Taylor expanded in beta around 0 74.1%
distribute-lft-in74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in alpha around 0 74.2%
if 5.4000000000000004 < beta Initial program 81.7%
Taylor expanded in beta around -inf 84.2%
associate-*r/84.2%
mul-1-neg84.2%
sub-neg84.2%
mul-1-neg84.2%
distribute-neg-in84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
mul-1-neg84.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in alpha around 0 73.6%
Final simplification74.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.0) (/ 0.16666666666666666 (+ beta 2.0)) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 0.16666666666666666 / (beta + 2.0);
} 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 <= 8.0d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
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 <= 8.0) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.0: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.0) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(1.0 + alpha) / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 8.0)
tmp = 0.16666666666666666 / (beta + 2.0);
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, 8.0], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 8Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in alpha around 0 75.1%
Taylor expanded in beta around 0 74.1%
distribute-lft-in74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in alpha around 0 74.2%
if 8 < beta Initial program 81.7%
associate-/l/79.6%
associate-/r*64.5%
+-commutative64.5%
associate-+r+64.5%
+-commutative64.5%
associate-+r+64.5%
associate-+r+64.5%
distribute-rgt1-in64.5%
+-commutative64.5%
*-commutative64.5%
distribute-rgt1-in64.4%
+-commutative64.4%
times-frac86.6%
Simplified86.6%
Taylor expanded in beta around inf 77.4%
unpow277.4%
Simplified77.4%
Final simplification75.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.5) (/ 0.16666666666666666 (+ beta 2.0)) (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.5) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (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 <= 7.5d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = 1.0d0 / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.5) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.5: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = 1.0 / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.5) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(1.0 / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.5)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = 1.0 / (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, 7.5], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.5:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 7.5Initial program 99.9%
associate-/l/99.1%
associate-/r*95.6%
+-commutative95.6%
associate-+r+95.6%
+-commutative95.6%
associate-+r+95.6%
associate-+r+95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.6%
+-commutative95.6%
times-frac99.1%
Simplified99.1%
associate-*l/99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in alpha around 0 75.1%
Taylor expanded in beta around 0 74.1%
distribute-lft-in74.1%
metadata-eval74.1%
Simplified74.1%
Taylor expanded in alpha around 0 74.2%
if 7.5 < beta Initial program 81.7%
associate-/l/79.6%
associate-/r*64.5%
+-commutative64.5%
associate-+r+64.5%
+-commutative64.5%
associate-+r+64.5%
associate-+r+64.5%
distribute-rgt1-in64.5%
+-commutative64.5%
*-commutative64.5%
distribute-rgt1-in64.4%
+-commutative64.4%
times-frac86.6%
Simplified86.6%
Taylor expanded in beta around inf 77.4%
unpow277.4%
Simplified77.4%
Taylor expanded in alpha around 0 73.5%
unpow273.5%
Simplified73.5%
Final simplification73.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ beta 2.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (beta + 2.0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.16666666666666666d0 / (beta + 2.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (beta + 2.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (beta + 2.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(beta + 2.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (beta + 2.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{\beta + 2}
\end{array}
Initial program 92.9%
associate-/l/91.6%
associate-/r*83.6%
+-commutative83.6%
associate-+r+83.6%
+-commutative83.6%
associate-+r+83.6%
associate-+r+83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
*-commutative83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
times-frac94.3%
Simplified94.3%
associate-*l/94.3%
+-commutative94.3%
Applied egg-rr94.3%
Taylor expanded in alpha around 0 77.2%
Taylor expanded in beta around 0 48.1%
distribute-lft-in48.1%
metadata-eval48.1%
Simplified48.1%
Taylor expanded in alpha around 0 48.5%
Final simplification48.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 0.16666666666666666)
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666;
}
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.16666666666666666d0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return 0.16666666666666666 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := 0.16666666666666666
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.16666666666666666
\end{array}
Initial program 92.9%
associate-/l/91.6%
associate-/r*83.6%
+-commutative83.6%
associate-+r+83.6%
+-commutative83.6%
associate-+r+83.6%
associate-+r+83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
*-commutative83.6%
distribute-rgt1-in83.6%
+-commutative83.6%
times-frac94.3%
Simplified94.3%
associate-*l/94.3%
+-commutative94.3%
Applied egg-rr94.3%
Taylor expanded in alpha around 0 77.2%
Taylor expanded in beta around 0 48.1%
distribute-lft-in48.1%
metadata-eval48.1%
Simplified48.1%
Taylor expanded in alpha around inf 11.0%
Final simplification11.0%
herbie shell --seed 2023264
(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)))