
(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))))
(if (<= beta 1e+135)
(/
(/ (+ (+ beta (+ alpha (* beta alpha))) 1.0) t_0)
(* t_0 (+ (+ beta alpha) 3.0)))
(/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ beta alpha)))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1e+135) {
tmp = (((beta + (alpha + (beta * alpha))) + 1.0) / t_0) / (t_0 * ((beta + alpha) + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 1d+135) then
tmp = (((beta + (alpha + (beta * alpha))) + 1.0d0) / t_0) / (t_0 * ((beta + alpha) + 3.0d0))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
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 <= 1e+135) {
tmp = (((beta + (alpha + (beta * alpha))) + 1.0) / t_0) / (t_0 * ((beta + alpha) + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1e+135: tmp = (((beta + (alpha + (beta * alpha))) + 1.0) / t_0) / (t_0 * ((beta + alpha) + 3.0)) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 1e+135) tmp = Float64(Float64(Float64(Float64(beta + Float64(alpha + Float64(beta * alpha))) + 1.0) / t_0) / Float64(t_0 * Float64(Float64(beta + alpha) + 3.0))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); 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 <= 1e+135)
tmp = (((beta + (alpha + (beta * alpha))) + 1.0) / t_0) / (t_0 * ((beta + alpha) + 3.0));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1e+135], N[(N[(N[(N[(beta + N[(alpha + N[(beta * alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 * N[(N[(beta + alpha), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $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 10^{+135}:\\
\;\;\;\;\frac{\frac{\left(\beta + \left(\alpha + \beta \cdot \alpha\right)\right) + 1}{t_0}}{t_0 \cdot \left(\left(\beta + \alpha\right) + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 9.99999999999999962e134Initial program 97.9%
associate-/l/96.7%
associate-+l+96.7%
+-commutative96.7%
*-commutative96.7%
associate-+l+96.7%
+-commutative96.7%
+-commutative96.7%
+-commutative96.7%
Simplified96.7%
if 9.99999999999999962e134 < beta Initial program 69.4%
Taylor expanded in beta around -inf 91.7%
associate-*r/91.7%
mul-1-neg91.7%
sub-neg91.7%
mul-1-neg91.7%
distribute-neg-in91.7%
+-commutative91.7%
mul-1-neg91.7%
distribute-lft-in91.7%
metadata-eval91.7%
mul-1-neg91.7%
unsub-neg91.7%
Simplified91.7%
Final simplification95.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 1.4e+44)
(* (+ beta 1.0) (/ (+ alpha 1.0) (* t_0 (* t_0 (+ beta (+ alpha 3.0))))))
(/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ beta alpha)))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.4e+44) {
tmp = (beta + 1.0) * ((alpha + 1.0) / (t_0 * (t_0 * (beta + (alpha + 3.0)))));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 1.4d+44) then
tmp = (beta + 1.0d0) * ((alpha + 1.0d0) / (t_0 * (t_0 * (beta + (alpha + 3.0d0)))))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.4e+44) {
tmp = (beta + 1.0) * ((alpha + 1.0) / (t_0 * (t_0 * (beta + (alpha + 3.0)))));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1.4e+44: tmp = (beta + 1.0) * ((alpha + 1.0) / (t_0 * (t_0 * (beta + (alpha + 3.0))))) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 1.4e+44) tmp = Float64(Float64(beta + 1.0) * Float64(Float64(alpha + 1.0) / Float64(t_0 * Float64(t_0 * Float64(beta + Float64(alpha + 3.0)))))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 1.4e+44)
tmp = (beta + 1.0) * ((alpha + 1.0) / (t_0 * (t_0 * (beta + (alpha + 3.0)))));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.4e+44], N[(N[(beta + 1.0), $MachinePrecision] * N[(N[(alpha + 1.0), $MachinePrecision] / N[(t$95$0 * N[(t$95$0 * N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $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 1.4 \cdot 10^{+44}:\\
\;\;\;\;\left(\beta + 1\right) \cdot \frac{\alpha + 1}{t_0 \cdot \left(t_0 \cdot \left(\beta + \left(\alpha + 3\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 1.4e44Initial program 99.3%
associate-/l/98.3%
associate-/r*94.8%
+-commutative94.8%
associate-+r+94.8%
+-commutative94.8%
associate-+r+94.8%
associate-+r+94.8%
distribute-rgt1-in94.7%
+-commutative94.7%
*-commutative94.7%
distribute-rgt1-in94.7%
+-commutative94.7%
times-frac98.8%
Simplified98.8%
frac-times94.7%
associate-/l*95.3%
+-commutative95.3%
Applied egg-rr95.3%
associate-/r/95.3%
+-commutative95.3%
Applied egg-rr95.3%
if 1.4e44 < beta Initial program 76.9%
Taylor expanded in beta around -inf 84.4%
associate-*r/84.4%
mul-1-neg84.4%
sub-neg84.4%
mul-1-neg84.4%
distribute-neg-in84.4%
+-commutative84.4%
mul-1-neg84.4%
distribute-lft-in84.4%
metadata-eval84.4%
mul-1-neg84.4%
unsub-neg84.4%
Simplified84.4%
Final simplification92.2%
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 4e+137)
(* (/ (+ alpha 1.0) t_0) (/ (+ beta 1.0) (* t_0 (+ beta (+ alpha 3.0)))))
(/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ beta alpha)))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 4e+137) {
tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0))));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 4d+137) then
tmp = ((alpha + 1.0d0) / t_0) * ((beta + 1.0d0) / (t_0 * (beta + (alpha + 3.0d0))))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
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 <= 4e+137) {
tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0))));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 4e+137: tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0)))) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 4e+137) tmp = Float64(Float64(Float64(alpha + 1.0) / t_0) * Float64(Float64(beta + 1.0) / Float64(t_0 * Float64(beta + Float64(alpha + 3.0))))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); 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 <= 4e+137)
tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0))));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 4e+137], N[(N[(N[(alpha + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(beta + 1.0), $MachinePrecision] / N[(t$95$0 * N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $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 4 \cdot 10^{+137}:\\
\;\;\;\;\frac{\alpha + 1}{t_0} \cdot \frac{\beta + 1}{t_0 \cdot \left(\beta + \left(\alpha + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 4.0000000000000001e137Initial program 97.9%
associate-/l/96.7%
associate-/r*87.4%
+-commutative87.4%
associate-+r+87.4%
+-commutative87.4%
associate-+r+87.4%
associate-+r+87.4%
distribute-rgt1-in87.4%
+-commutative87.4%
*-commutative87.4%
distribute-rgt1-in87.4%
+-commutative87.4%
times-frac98.5%
Simplified98.5%
if 4.0000000000000001e137 < beta Initial program 69.4%
Taylor expanded in beta around -inf 91.7%
associate-*r/91.7%
mul-1-neg91.7%
sub-neg91.7%
mul-1-neg91.7%
distribute-neg-in91.7%
+-commutative91.7%
mul-1-neg91.7%
distribute-lft-in91.7%
metadata-eval91.7%
mul-1-neg91.7%
unsub-neg91.7%
Simplified91.7%
Final simplification97.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 3e+16)
(*
(/ (+ alpha 1.0) (+ alpha (+ beta 2.0)))
(/ 1.0 (/ (+ 6.0 (* beta (+ beta 5.0))) (+ beta 1.0))))
(/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ beta alpha))))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3e+16) {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / ((6.0 + (beta * (beta + 5.0))) / (beta + 1.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3d+16) then
tmp = ((alpha + 1.0d0) / (alpha + (beta + 2.0d0))) * (1.0d0 / ((6.0d0 + (beta * (beta + 5.0d0))) / (beta + 1.0d0)))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3e+16) {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / ((6.0 + (beta * (beta + 5.0))) / (beta + 1.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3e+16: tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / ((6.0 + (beta * (beta + 5.0))) / (beta + 1.0))) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3e+16) tmp = Float64(Float64(Float64(alpha + 1.0) / Float64(alpha + Float64(beta + 2.0))) * Float64(1.0 / Float64(Float64(6.0 + Float64(beta * Float64(beta + 5.0))) / Float64(beta + 1.0)))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3e+16)
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / ((6.0 + (beta * (beta + 5.0))) / (beta + 1.0)));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3e+16], N[(N[(N[(alpha + 1.0), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(6.0 + N[(beta * N[(beta + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(beta + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3 \cdot 10^{+16}:\\
\;\;\;\;\frac{\alpha + 1}{\alpha + \left(\beta + 2\right)} \cdot \frac{1}{\frac{6 + \beta \cdot \left(\beta + 5\right)}{\beta + 1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 3e16Initial program 99.8%
associate-/l/99.3%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.3%
Simplified99.3%
Taylor expanded in alpha around 0 67.6%
Taylor expanded in beta around 0 67.6%
+-commutative67.6%
unpow267.6%
fma-def67.7%
*-commutative67.7%
Simplified67.7%
clear-num67.6%
inv-pow67.6%
Applied egg-rr67.6%
unpow-167.6%
fma-def67.6%
distribute-lft-out67.6%
Simplified67.6%
if 3e16 < beta Initial program 80.1%
Taylor expanded in beta around -inf 83.2%
associate-*r/83.2%
mul-1-neg83.2%
sub-neg83.2%
mul-1-neg83.2%
distribute-neg-in83.2%
+-commutative83.2%
mul-1-neg83.2%
distribute-lft-in83.2%
metadata-eval83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
Final simplification73.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 9.6e+32)
(*
(/ (+ alpha 1.0) (+ alpha (+ beta 2.0)))
(/ (+ beta 1.0) (* (+ beta 2.0) (+ beta 3.0))))
(/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ beta alpha))))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 9.6e+32) {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((beta + 1.0) / ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 9.6d+32) then
tmp = ((alpha + 1.0d0) / (alpha + (beta + 2.0d0))) * ((beta + 1.0d0) / ((beta + 2.0d0) * (beta + 3.0d0)))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 9.6e+32) {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((beta + 1.0) / ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 9.6e+32: tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((beta + 1.0) / ((beta + 2.0) * (beta + 3.0))) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 9.6e+32) tmp = Float64(Float64(Float64(alpha + 1.0) / Float64(alpha + Float64(beta + 2.0))) * Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 9.6e+32)
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((beta + 1.0) / ((beta + 2.0) * (beta + 3.0)));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 9.6e+32], N[(N[(N[(alpha + 1.0), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 9.6 \cdot 10^{+32}:\\
\;\;\;\;\frac{\alpha + 1}{\alpha + \left(\beta + 2\right)} \cdot \frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 9.59999999999999965e32Initial program 99.8%
associate-/l/98.8%
associate-/r*95.1%
+-commutative95.1%
associate-+r+95.1%
+-commutative95.1%
associate-+r+95.1%
associate-+r+95.1%
distribute-rgt1-in95.1%
+-commutative95.1%
*-commutative95.1%
distribute-rgt1-in95.1%
+-commutative95.1%
times-frac98.8%
Simplified98.8%
Taylor expanded in alpha around 0 68.2%
if 9.59999999999999965e32 < beta Initial program 77.9%
Taylor expanded in beta around -inf 83.8%
associate-*r/83.8%
mul-1-neg83.8%
sub-neg83.8%
mul-1-neg83.8%
distribute-neg-in83.8%
+-commutative83.8%
mul-1-neg83.8%
distribute-lft-in83.8%
metadata-eval83.8%
mul-1-neg83.8%
unsub-neg83.8%
Simplified83.8%
Final simplification73.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.7e+16) (/ (+ beta 1.0) (* (+ beta 2.0) (+ 6.0 (* beta (+ beta 5.0))))) (* (/ (+ alpha 1.0) (+ alpha (+ beta 2.0))) (/ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.7e+16) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0))));
} else {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (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 <= 1.7d+16) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * (6.0d0 + (beta * (beta + 5.0d0))))
else
tmp = ((alpha + 1.0d0) / (alpha + (beta + 2.0d0))) * (1.0d0 / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1.7e+16) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0))));
} else {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.7e+16: tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0)))) else: tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.7e+16) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * Float64(beta + 5.0))))); else tmp = Float64(Float64(Float64(alpha + 1.0) / Float64(alpha + Float64(beta + 2.0))) * 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 <= 1.7e+16)
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0))));
else
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (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, 1.7e+16], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * N[(beta + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha + 1.0), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.7 \cdot 10^{+16}:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot \left(\beta + 5\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{\alpha + \left(\beta + 2\right)} \cdot \frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 1.7e16Initial program 99.8%
associate-/l/99.3%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.3%
Simplified99.3%
Taylor expanded in alpha around 0 67.6%
Taylor expanded in beta around 0 67.6%
+-commutative67.6%
unpow267.6%
fma-def67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in alpha around 0 67.6%
+-commutative67.6%
+-commutative67.6%
+-commutative67.6%
unpow267.6%
distribute-rgt-in67.6%
Simplified67.6%
if 1.7e16 < beta Initial program 80.1%
associate-/l/76.3%
associate-/r*60.6%
+-commutative60.6%
associate-+r+60.6%
+-commutative60.6%
associate-+r+60.6%
associate-+r+60.6%
distribute-rgt1-in60.6%
+-commutative60.6%
*-commutative60.6%
distribute-rgt1-in60.6%
+-commutative60.6%
times-frac93.6%
Simplified93.6%
Taylor expanded in beta around inf 83.1%
Final simplification73.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.15e+16) (/ (+ beta 1.0) (* (+ beta 2.0) (+ 6.0 (* beta (+ beta 5.0))))) (/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ beta alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.15e+16) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0))));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.15d+16) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * (6.0d0 + (beta * (beta + 5.0d0))))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.15e+16) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0))));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.15e+16: tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0)))) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.15e+16) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * Float64(beta + 5.0))))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.15e+16)
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * (beta + 5.0))));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.15e+16], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * N[(beta + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.15 \cdot 10^{+16}:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot \left(\beta + 5\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 3.15e16Initial program 99.8%
associate-/l/99.3%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.3%
Simplified99.3%
Taylor expanded in alpha around 0 67.6%
Taylor expanded in beta around 0 67.6%
+-commutative67.6%
unpow267.6%
fma-def67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in alpha around 0 67.6%
+-commutative67.6%
+-commutative67.6%
+-commutative67.6%
unpow267.6%
distribute-rgt-in67.6%
Simplified67.6%
if 3.15e16 < beta Initial program 80.1%
Taylor expanded in beta around -inf 83.2%
associate-*r/83.2%
mul-1-neg83.2%
sub-neg83.2%
mul-1-neg83.2%
distribute-neg-in83.2%
+-commutative83.2%
mul-1-neg83.2%
distribute-lft-in83.2%
metadata-eval83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
Final simplification73.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.7) (/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) (+ beta 2.0)) (* (/ (+ alpha 1.0) (+ alpha (+ beta 2.0))) (/ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.7) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (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 <= 3.7d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / (beta + 2.0d0)
else
tmp = ((alpha + 1.0d0) / (alpha + (beta + 2.0d0))) * (1.0d0 / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.7) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.7: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0) else: tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (1.0 / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.7) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / Float64(beta + 2.0)); else tmp = Float64(Float64(Float64(alpha + 1.0) / Float64(alpha + Float64(beta + 2.0))) * 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 <= 3.7)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
else
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * (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, 3.7], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha + 1.0), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.7:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{\alpha + \left(\beta + 2\right)} \cdot \frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 3.7000000000000002Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.6%
Taylor expanded in alpha around 0 67.6%
if 3.7000000000000002 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
Taylor expanded in beta around inf 78.7%
Final simplification71.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.9) (/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) (+ beta 2.0)) (+ (/ 1.0 (* beta beta)) (/ alpha (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.9) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = (1.0 / (beta * beta)) + (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 <= 4.9d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / (beta + 2.0d0)
else
tmp = (1.0d0 / (beta * beta)) + (alpha / (beta * beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.9) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = (1.0 / (beta * beta)) + (alpha / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.9: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0) else: tmp = (1.0 / (beta * beta)) + (alpha / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.9) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / Float64(beta + 2.0)); else tmp = Float64(Float64(1.0 / Float64(beta * beta)) + Float64(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 <= 4.9)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
else
tmp = (1.0 / (beta * beta)) + (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, 4.9], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision] + N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.9:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta} + \frac{\alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 4.9000000000000004Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.6%
Taylor expanded in alpha around 0 67.6%
if 4.9000000000000004 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
Taylor expanded in beta around inf 78.5%
unpow278.5%
Simplified78.5%
Taylor expanded in alpha around 0 78.5%
unpow278.5%
unpow278.5%
Simplified78.5%
Final simplification71.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.8) (/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) (+ beta 2.0)) (/ (+ alpha 1.0) (* beta (+ beta (* alpha 3.0))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.8) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = (alpha + 1.0) / (beta * (beta + (alpha * 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.8d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / (beta + 2.0d0)
else
tmp = (alpha + 1.0d0) / (beta * (beta + (alpha * 3.0d0)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.8) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = (alpha + 1.0) / (beta * (beta + (alpha * 3.0)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.8: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0) else: tmp = (alpha + 1.0) / (beta * (beta + (alpha * 3.0))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.8) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / Float64(beta + 2.0)); else tmp = Float64(Float64(alpha + 1.0) / Float64(beta * Float64(beta + Float64(alpha * 3.0)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.8)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
else
tmp = (alpha + 1.0) / (beta * (beta + (alpha * 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.8], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(alpha + 1.0), $MachinePrecision] / N[(beta * N[(beta + N[(alpha * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.8:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{\beta \cdot \left(\beta + \alpha \cdot 3\right)}\\
\end{array}
\end{array}
if beta < 4.79999999999999982Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.6%
Taylor expanded in alpha around 0 67.6%
if 4.79999999999999982 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
frac-times63.8%
associate-/l*79.7%
+-commutative79.7%
Applied egg-rr79.7%
Taylor expanded in beta around inf 83.6%
+-commutative83.6%
unpow283.6%
distribute-lft-out83.6%
+-commutative83.6%
distribute-rgt1-in83.6%
metadata-eval83.6%
Simplified83.6%
Taylor expanded in alpha around inf 82.8%
Final simplification73.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.9) (/ 0.16666666666666666 (+ beta 2.0)) (* (+ alpha 1.0) (/ 1.0 (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.9) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = (alpha + 1.0) * (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.9d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = (alpha + 1.0d0) * (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.9) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = (alpha + 1.0) * (1.0 / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.9: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = (alpha + 1.0) * (1.0 / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.9) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(alpha + 1.0) * 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.9)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = (alpha + 1.0) * (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.9], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(alpha + 1.0), $MachinePrecision] * N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.9:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\left(\alpha + 1\right) \cdot \frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 7.9000000000000004Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.2%
Taylor expanded in alpha around 0 67.2%
+-commutative67.2%
Simplified67.2%
if 7.9000000000000004 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
Taylor expanded in beta around inf 78.5%
unpow278.5%
Simplified78.5%
div-inv78.5%
Applied egg-rr78.5%
Final simplification71.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.0) (/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) (+ beta 2.0)) (* (+ alpha 1.0) (/ 1.0 (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.0) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = (alpha + 1.0) * (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 <= 5.0d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / (beta + 2.0d0)
else
tmp = (alpha + 1.0d0) * (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 <= 5.0) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
} else {
tmp = (alpha + 1.0) * (1.0 / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.0: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0) else: tmp = (alpha + 1.0) * (1.0 / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.0) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / Float64(beta + 2.0)); else tmp = Float64(Float64(alpha + 1.0) * 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 <= 5.0)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (beta + 2.0);
else
tmp = (alpha + 1.0) * (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, 5.0], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(alpha + 1.0), $MachinePrecision] * N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\left(\alpha + 1\right) \cdot \frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 5Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.6%
Taylor expanded in alpha around 0 67.6%
if 5 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
Taylor expanded in beta around inf 78.5%
unpow278.5%
Simplified78.5%
div-inv78.5%
Applied egg-rr78.5%
Final simplification71.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.2) (/ 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.2) {
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.2d0) 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.2) {
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.2: 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.2) 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.2)
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.2], 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.2:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5.20000000000000018Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.2%
Taylor expanded in alpha around 0 67.2%
+-commutative67.2%
Simplified67.2%
if 5.20000000000000018 < beta Initial program 81.9%
Taylor expanded in beta around -inf 78.8%
associate-*r/78.8%
mul-1-neg78.8%
sub-neg78.8%
mul-1-neg78.8%
distribute-neg-in78.8%
+-commutative78.8%
mul-1-neg78.8%
distribute-lft-in78.8%
metadata-eval78.8%
mul-1-neg78.8%
unsub-neg78.8%
Simplified78.8%
Taylor expanded in alpha around 0 75.5%
+-commutative75.5%
Simplified75.5%
Final simplification70.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.5) (/ 0.16666666666666666 (+ beta 2.0)) (/ 1.0 (* beta (+ beta 6.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * (beta + 6.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 <= 3.5d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = 1.0d0 / (beta * (beta + 6.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * (beta + 6.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.5: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = 1.0 / (beta * (beta + 6.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.5) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(1.0 / Float64(beta * Float64(beta + 6.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.5)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = 1.0 / (beta * (beta + 6.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, 3.5], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.5:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 6\right)}\\
\end{array}
\end{array}
if beta < 3.5Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.2%
Taylor expanded in alpha around 0 67.2%
+-commutative67.2%
Simplified67.2%
if 3.5 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
frac-times63.8%
associate-/l*79.7%
+-commutative79.7%
Applied egg-rr79.7%
Taylor expanded in beta around inf 83.6%
+-commutative83.6%
unpow283.6%
distribute-lft-out83.6%
+-commutative83.6%
distribute-rgt1-in83.6%
metadata-eval83.6%
Simplified83.6%
Taylor expanded in alpha around 0 76.2%
+-commutative76.2%
Simplified76.2%
Final simplification70.7%
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)) (/ (+ alpha 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 = (alpha + 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 = (alpha + 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 = (alpha + 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 = (alpha + 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(Float64(alpha + 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 = (alpha + 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[(N[(alpha + 1.0), $MachinePrecision] / 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{\alpha + 1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 7.5Initial program 99.9%
associate-/l/99.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.2%
Taylor expanded in alpha around 0 67.2%
+-commutative67.2%
Simplified67.2%
if 7.5 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
Taylor expanded in beta around inf 78.5%
unpow278.5%
Simplified78.5%
Final simplification71.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 1e+90) (/ 0.16666666666666666 (+ beta 2.0)) (/ 0.5 (* alpha alpha))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 1e+90) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 0.5 / (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 <= 1d+90) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = 0.5d0 / (alpha * alpha)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 1e+90) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 0.5 / (alpha * alpha);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 1e+90: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = 0.5 / (alpha * alpha) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 1e+90) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(0.5 / Float64(alpha * alpha)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 1e+90)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = 0.5 / (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, 1e+90], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(0.5 / N[(alpha * alpha), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 10^{+90}:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{\alpha \cdot \alpha}\\
\end{array}
\end{array}
if alpha < 9.99999999999999966e89Initial program 97.8%
associate-/l/97.6%
associate-/r*91.9%
+-commutative91.9%
associate-+r+91.9%
+-commutative91.9%
associate-+r+91.9%
associate-+r+91.9%
distribute-rgt1-in91.9%
+-commutative91.9%
*-commutative91.9%
distribute-rgt1-in91.9%
+-commutative91.9%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 88.9%
Taylor expanded in beta around 0 55.2%
Taylor expanded in alpha around 0 55.4%
+-commutative55.4%
Simplified55.4%
if 9.99999999999999966e89 < alpha Initial program 75.8%
associate-/l/69.1%
associate-+l+69.1%
+-commutative69.1%
*-commutative69.1%
associate-+l+69.1%
+-commutative69.1%
+-commutative69.1%
+-commutative69.1%
Simplified69.1%
Taylor expanded in alpha around 0 71.8%
Taylor expanded in beta around 0 69.7%
+-commutative69.7%
Simplified69.7%
Taylor expanded in alpha around inf 69.7%
unpow269.7%
Simplified69.7%
Final simplification58.6%
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.5%
associate-/r*95.4%
+-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+r+95.4%
associate-+r+95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
*-commutative95.4%
distribute-rgt1-in95.4%
+-commutative95.4%
times-frac99.5%
Simplified99.5%
Taylor expanded in alpha around 0 68.1%
Taylor expanded in beta around 0 67.2%
Taylor expanded in alpha around 0 67.2%
+-commutative67.2%
Simplified67.2%
if 7.5 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
Taylor expanded in beta around inf 78.5%
unpow278.5%
Simplified78.5%
Taylor expanded in alpha around 0 75.4%
unpow275.4%
Simplified75.4%
Final simplification70.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.0) 0.08333333333333333 (/ 0.3333333333333333 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.3333333333333333 / 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.0d0) then
tmp = 0.08333333333333333d0
else
tmp = 0.3333333333333333d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.3333333333333333 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.0: tmp = 0.08333333333333333 else: tmp = 0.3333333333333333 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.0) tmp = 0.08333333333333333; else tmp = Float64(0.3333333333333333 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.0)
tmp = 0.08333333333333333;
else
tmp = 0.3333333333333333 / 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.0], 0.08333333333333333, N[(0.3333333333333333 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\beta}\\
\end{array}
\end{array}
if beta < 4Initial program 99.9%
associate-/l/99.5%
associate-+l+99.5%
+-commutative99.5%
*-commutative99.5%
associate-+l+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in alpha around 0 84.9%
Taylor expanded in beta around 0 84.0%
+-commutative84.0%
Simplified84.0%
Taylor expanded in alpha around 0 67.2%
if 4 < beta Initial program 81.9%
associate-/l/78.1%
associate-/r*63.9%
+-commutative63.9%
associate-+r+63.9%
+-commutative63.9%
associate-+r+63.9%
associate-+r+63.9%
distribute-rgt1-in63.8%
+-commutative63.8%
*-commutative63.8%
distribute-rgt1-in63.8%
+-commutative63.8%
times-frac93.8%
Simplified93.8%
frac-times63.8%
associate-/l*79.7%
+-commutative79.7%
Applied egg-rr79.7%
Taylor expanded in beta around inf 83.6%
+-commutative83.6%
unpow283.6%
distribute-lft-out83.6%
+-commutative83.6%
distribute-rgt1-in83.6%
metadata-eval83.6%
Simplified83.6%
Taylor expanded in alpha around inf 7.4%
Final simplification44.1%
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.2%
associate-/r*83.2%
+-commutative83.2%
associate-+r+83.2%
+-commutative83.2%
associate-+r+83.2%
associate-+r+83.2%
distribute-rgt1-in83.2%
+-commutative83.2%
*-commutative83.2%
distribute-rgt1-in83.2%
+-commutative83.2%
times-frac97.3%
Simplified97.3%
Taylor expanded in alpha around 0 73.1%
Taylor expanded in beta around 0 43.7%
Taylor expanded in alpha around 0 44.1%
+-commutative44.1%
Simplified44.1%
Final simplification44.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 0.08333333333333333)
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.08333333333333333;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.08333333333333333d0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.08333333333333333;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.08333333333333333
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return 0.08333333333333333 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.08333333333333333;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := 0.08333333333333333
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.08333333333333333
\end{array}
Initial program 92.9%
associate-/l/91.2%
associate-+l+91.2%
+-commutative91.2%
*-commutative91.2%
associate-+l+91.2%
+-commutative91.2%
+-commutative91.2%
+-commutative91.2%
Simplified91.2%
Taylor expanded in alpha around 0 85.0%
Taylor expanded in beta around 0 58.7%
+-commutative58.7%
Simplified58.7%
Taylor expanded in alpha around 0 42.9%
Final simplification42.9%
herbie shell --seed 2023278
(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)))