
(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 28 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ (+ alpha beta) (* 2.0 1.0)))) (/ (/ (/ (+ (+ (+ alpha beta) (* beta alpha)) 1.0) t_0) t_0) (+ t_0 1.0))))
double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = (alpha + beta) + (2.0d0 * 1.0d0)
code = (((((alpha + beta) + (beta * alpha)) + 1.0d0) / t_0) / t_0) / (t_0 + 1.0d0)
end function
public static double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
def code(alpha, beta): t_0 = (alpha + beta) + (2.0 * 1.0) return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0)
function code(alpha, beta) t_0 = Float64(Float64(alpha + beta) + Float64(2.0 * 1.0)) return Float64(Float64(Float64(Float64(Float64(Float64(alpha + beta) + Float64(beta * alpha)) + 1.0) / t_0) / t_0) / Float64(t_0 + 1.0)) end
function tmp = code(alpha, beta) t_0 = (alpha + beta) + (2.0 * 1.0); tmp = (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0); end
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(alpha + beta), $MachinePrecision] + N[(2.0 * 1.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(alpha + beta), $MachinePrecision] + N[(beta * alpha), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\alpha + \beta\right) + 2 \cdot 1\\
\frac{\frac{\frac{\left(\left(\alpha + \beta\right) + \beta \cdot \alpha\right) + 1}{t_0}}{t_0}}{t_0 + 1}
\end{array}
\end{array}
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ alpha (+ 2.0 beta)))) (/ (* (/ (+ 1.0 alpha) t_0) (/ (+ 1.0 beta) (+ (+ alpha beta) 3.0))) t_0)))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
return (((1.0 + alpha) / t_0) * ((1.0 + beta) / ((alpha + beta) + 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 + (2.0d0 + beta)
code = (((1.0d0 + alpha) / t_0) * ((1.0d0 + beta) / ((alpha + beta) + 3.0d0))) / t_0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
return (((1.0 + alpha) / t_0) * ((1.0 + beta) / ((alpha + beta) + 3.0))) / t_0;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) return (((1.0 + alpha) / t_0) * ((1.0 + beta) / ((alpha + beta) + 3.0))) / t_0
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) return Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(Float64(1.0 + beta) / Float64(Float64(alpha + beta) + 3.0))) / t_0) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = (((1.0 + alpha) / t_0) * ((1.0 + beta) / ((alpha + beta) + 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[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(alpha + beta), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\frac{\frac{1 + \alpha}{t_0} \cdot \frac{1 + \beta}{\left(\alpha + \beta\right) + 3}}{t_0}
\end{array}
\end{array}
Initial program 92.1%
associate-/l/90.7%
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-frac95.9%
Simplified95.9%
expm1-log1p-u95.9%
expm1-udef68.9%
*-commutative68.9%
+-commutative68.9%
Applied egg-rr68.9%
expm1-def95.9%
expm1-log1p95.9%
associate-*r/95.8%
*-commutative95.8%
associate-*r/90.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ 2.0 beta))))
(if (<= beta 9e+33)
(/ (/ (/ (+ 1.0 beta) (+ beta 3.0)) (+ 2.0 beta)) t_0)
(*
(/ (+ 1.0 alpha) t_0)
(- (/ 1.0 beta) (/ (* 2.0 (+ alpha 2.0)) (* beta beta)))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 9e+33) {
tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / t_0;
} else {
tmp = ((1.0 + alpha) / t_0) * ((1.0 / beta) - ((2.0 * (alpha + 2.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) :: t_0
real(8) :: tmp
t_0 = alpha + (2.0d0 + beta)
if (beta <= 9d+33) then
tmp = (((1.0d0 + beta) / (beta + 3.0d0)) / (2.0d0 + beta)) / t_0
else
tmp = ((1.0d0 + alpha) / t_0) * ((1.0d0 / beta) - ((2.0d0 * (alpha + 2.0d0)) / (beta * beta)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 9e+33) {
tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / t_0;
} else {
tmp = ((1.0 + alpha) / t_0) * ((1.0 / beta) - ((2.0 * (alpha + 2.0)) / (beta * beta)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) tmp = 0 if beta <= 9e+33: tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / t_0 else: tmp = ((1.0 + alpha) / t_0) * ((1.0 / beta) - ((2.0 * (alpha + 2.0)) / (beta * beta))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 9e+33) tmp = Float64(Float64(Float64(Float64(1.0 + beta) / Float64(beta + 3.0)) / Float64(2.0 + beta)) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(Float64(1.0 / beta) - Float64(Float64(2.0 * Float64(alpha + 2.0)) / Float64(beta * beta)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = 0.0;
if (beta <= 9e+33)
tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / t_0;
else
tmp = ((1.0 + alpha) / t_0) * ((1.0 / beta) - ((2.0 * (alpha + 2.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_] := Block[{t$95$0 = N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 9e+33], N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / beta), $MachinePrecision] - N[(N[(2.0 * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 9 \cdot 10^{+33}:\\
\;\;\;\;\frac{\frac{\frac{1 + \beta}{\beta + 3}}{2 + \beta}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{t_0} \cdot \left(\frac{1}{\beta} - \frac{2 \cdot \left(\alpha + 2\right)}{\beta \cdot \beta}\right)\\
\end{array}
\end{array}
if beta < 9.0000000000000001e33Initial program 99.3%
associate-/l/99.0%
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%
expm1-log1p-u99.5%
expm1-udef77.3%
*-commutative77.3%
+-commutative77.3%
Applied egg-rr77.3%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.0%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 68.4%
associate-/r*68.4%
Simplified68.4%
if 9.0000000000000001e33 < beta Initial program 76.6%
associate-/l/72.9%
associate-/r*57.0%
+-commutative57.0%
associate-+r+57.0%
+-commutative57.0%
associate-+r+57.0%
associate-+r+57.0%
distribute-rgt1-in57.0%
+-commutative57.0%
*-commutative57.0%
distribute-rgt1-in57.0%
+-commutative57.0%
times-frac88.0%
Simplified88.0%
Taylor expanded in beta around inf 83.1%
+-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
metadata-eval83.1%
distribute-lft-in83.1%
unpow283.1%
Simplified83.1%
Final simplification73.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ 2.0 beta))))
(if (<= beta 5e+17)
(/ 1.0 (* (/ t_0 (+ 1.0 beta)) (* (+ 2.0 beta) (+ beta 3.0))))
(/ (* (/ (+ 1.0 alpha) t_0) (+ 1.0 (/ (- -2.0 alpha) beta))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 5e+17) {
tmp = 1.0 / ((t_0 / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.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 + (2.0d0 + beta)
if (beta <= 5d+17) then
tmp = 1.0d0 / ((t_0 / (1.0d0 + beta)) * ((2.0d0 + beta) * (beta + 3.0d0)))
else
tmp = (((1.0d0 + alpha) / t_0) * (1.0d0 + (((-2.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 + (2.0 + beta);
double tmp;
if (beta <= 5e+17) {
tmp = 1.0 / ((t_0 / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) tmp = 0 if beta <= 5e+17: tmp = 1.0 / ((t_0 / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0))) else: tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 5e+17) tmp = Float64(1.0 / Float64(Float64(t_0 / Float64(1.0 + beta)) * Float64(Float64(2.0 + beta) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(1.0 + Float64(Float64(-2.0 - alpha) / beta))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = 0.0;
if (beta <= 5e+17)
tmp = 1.0 / ((t_0 / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
else
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.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[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 5e+17], N[(1.0 / N[(N[(t$95$0 / N[(1.0 + beta), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 + N[(N[(-2.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 5 \cdot 10^{+17}:\\
\;\;\;\;\frac{1}{\frac{t_0}{1 + \beta} \cdot \left(\left(2 + \beta\right) \cdot \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0} \cdot \left(1 + \frac{-2 - \alpha}{\beta}\right)}{t_0}\\
\end{array}
\end{array}
if beta < 5e17Initial program 99.9%
associate-/l/99.5%
associate-/r*96.3%
+-commutative96.3%
associate-+r+96.3%
+-commutative96.3%
associate-+r+96.3%
associate-+r+96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
*-commutative96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.1%
*-commutative81.1%
+-commutative81.1%
Applied egg-rr81.1%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 67.0%
clear-num67.0%
inv-pow67.0%
+-commutative67.0%
+-commutative67.0%
Applied egg-rr67.0%
unpow-167.0%
associate-/r/67.1%
+-commutative67.1%
+-commutative67.1%
+-commutative67.1%
*-commutative67.1%
Simplified67.1%
if 5e17 < beta Initial program 78.1%
associate-/l/74.7%
associate-/r*59.5%
+-commutative59.5%
associate-+r+59.5%
+-commutative59.5%
associate-+r+59.5%
associate-+r+59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
*-commutative59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
times-frac89.3%
Simplified89.3%
expm1-log1p-u89.3%
expm1-udef46.8%
*-commutative46.8%
+-commutative46.8%
Applied egg-rr46.8%
expm1-def89.3%
expm1-log1p89.3%
associate-*r/89.2%
*-commutative89.2%
associate-*r/74.7%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 82.9%
associate-*r/82.9%
distribute-lft-in82.9%
metadata-eval82.9%
mul-1-neg82.9%
unsub-neg82.9%
Simplified82.9%
Final simplification72.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ 2.0 beta))))
(if (<= beta 210000000.0)
(/ (/ (+ 1.0 (+ alpha beta)) t_0) (* t_0 (+ (+ alpha beta) 3.0)))
(/ (* (/ (+ 1.0 alpha) t_0) (+ 1.0 (/ (- -2.0 alpha) beta))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 210000000.0) {
tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * ((alpha + beta) + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.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 + (2.0d0 + beta)
if (beta <= 210000000.0d0) then
tmp = ((1.0d0 + (alpha + beta)) / t_0) / (t_0 * ((alpha + beta) + 3.0d0))
else
tmp = (((1.0d0 + alpha) / t_0) * (1.0d0 + (((-2.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 + (2.0 + beta);
double tmp;
if (beta <= 210000000.0) {
tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * ((alpha + beta) + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) tmp = 0 if beta <= 210000000.0: tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * ((alpha + beta) + 3.0)) else: tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 210000000.0) tmp = Float64(Float64(Float64(1.0 + Float64(alpha + beta)) / t_0) / Float64(t_0 * Float64(Float64(alpha + beta) + 3.0))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(1.0 + Float64(Float64(-2.0 - alpha) / beta))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = 0.0;
if (beta <= 210000000.0)
tmp = ((1.0 + (alpha + beta)) / t_0) / (t_0 * ((alpha + beta) + 3.0));
else
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.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[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 210000000.0], N[(N[(N[(1.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 * N[(N[(alpha + beta), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 + N[(N[(-2.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 210000000:\\
\;\;\;\;\frac{\frac{1 + \left(\alpha + \beta\right)}{t_0}}{t_0 \cdot \left(\left(\alpha + \beta\right) + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0} \cdot \left(1 + \frac{-2 - \alpha}{\beta}\right)}{t_0}\\
\end{array}
\end{array}
if beta < 2.1e8Initial 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 beta around 0 99.5%
if 2.1e8 < beta Initial program 78.3%
associate-/l/75.0%
associate-/r*60.0%
+-commutative60.0%
associate-+r+60.0%
+-commutative60.0%
associate-+r+60.0%
associate-+r+60.0%
distribute-rgt1-in60.0%
+-commutative60.0%
*-commutative60.0%
distribute-rgt1-in60.0%
+-commutative60.0%
times-frac89.4%
Simplified89.4%
expm1-log1p-u89.4%
expm1-udef46.4%
*-commutative46.4%
+-commutative46.4%
Applied egg-rr46.4%
expm1-def89.4%
expm1-log1p89.4%
associate-*r/89.4%
*-commutative89.4%
associate-*r/75.0%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 83.1%
associate-*r/83.1%
distribute-lft-in83.1%
metadata-eval83.1%
mul-1-neg83.1%
unsub-neg83.1%
Simplified83.1%
Final simplification93.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (* (/ (/ 1.0 (/ (+ alpha (+ 2.0 beta)) (+ 1.0 alpha))) (+ beta (+ alpha 2.0))) (/ (+ 1.0 beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
return ((1.0 / ((alpha + (2.0 + beta)) / (1.0 + alpha))) / (beta + (alpha + 2.0))) * ((1.0 + beta) / (beta + 3.0));
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = ((1.0d0 / ((alpha + (2.0d0 + beta)) / (1.0d0 + alpha))) / (beta + (alpha + 2.0d0))) * ((1.0d0 + beta) / (beta + 3.0d0))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return ((1.0 / ((alpha + (2.0 + beta)) / (1.0 + alpha))) / (beta + (alpha + 2.0))) * ((1.0 + beta) / (beta + 3.0));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return ((1.0 / ((alpha + (2.0 + beta)) / (1.0 + alpha))) / (beta + (alpha + 2.0))) * ((1.0 + beta) / (beta + 3.0))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(Float64(1.0 / Float64(Float64(alpha + Float64(2.0 + beta)) / Float64(1.0 + alpha))) / Float64(beta + Float64(alpha + 2.0))) * Float64(Float64(1.0 + beta) / Float64(beta + 3.0))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = ((1.0 / ((alpha + (2.0 + beta)) / (1.0 + alpha))) / (beta + (alpha + 2.0))) * ((1.0 + beta) / (beta + 3.0));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(N[(1.0 / N[(N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(1.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\frac{1}{\frac{\alpha + \left(2 + \beta\right)}{1 + \alpha}}}{\beta + \left(\alpha + 2\right)} \cdot \frac{1 + \beta}{\beta + 3}
\end{array}
Initial program 92.1%
associate-/l/90.7%
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-frac95.9%
Simplified95.9%
expm1-log1p-u95.9%
expm1-udef68.9%
*-commutative68.9%
+-commutative68.9%
Applied egg-rr68.9%
expm1-def95.9%
expm1-log1p95.9%
associate-*r/95.8%
*-commutative95.8%
associate-*r/90.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
*-un-lft-identity99.8%
associate-/l*99.6%
associate-+l+99.6%
Applied egg-rr99.6%
*-lft-identity99.6%
associate-/r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
clear-num99.8%
inv-pow99.8%
+-commutative99.8%
associate-+r+99.8%
Applied egg-rr99.8%
unpow-199.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 72.9%
Final simplification72.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ alpha (+ 2.0 beta)))) (* (/ (+ 1.0 beta) (+ (+ alpha beta) 3.0)) (/ (/ (+ 1.0 alpha) t_0) t_0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
return ((1.0 + beta) / ((alpha + beta) + 3.0)) * (((1.0 + alpha) / t_0) / t_0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = alpha + (2.0d0 + beta)
code = ((1.0d0 + beta) / ((alpha + beta) + 3.0d0)) * (((1.0d0 + alpha) / t_0) / t_0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
return ((1.0 + beta) / ((alpha + beta) + 3.0)) * (((1.0 + alpha) / t_0) / t_0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) return ((1.0 + beta) / ((alpha + beta) + 3.0)) * (((1.0 + alpha) / t_0) / t_0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) return Float64(Float64(Float64(1.0 + beta) / Float64(Float64(alpha + beta) + 3.0)) * Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = ((1.0 + beta) / ((alpha + beta) + 3.0)) * (((1.0 + alpha) / t_0) / t_0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(alpha + beta), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\frac{1 + \beta}{\left(\alpha + \beta\right) + 3} \cdot \frac{\frac{1 + \alpha}{t_0}}{t_0}
\end{array}
\end{array}
Initial program 92.1%
associate-/l/90.7%
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-frac95.9%
Simplified95.9%
expm1-log1p-u95.9%
expm1-udef68.9%
*-commutative68.9%
+-commutative68.9%
Applied egg-rr68.9%
expm1-def95.9%
expm1-log1p95.9%
*-commutative95.9%
associate-*r/95.9%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 5.2e+17)
(/
1.0
(* (/ (+ alpha (+ 2.0 beta)) (+ 1.0 beta)) (* (+ 2.0 beta) (+ beta 3.0))))
(/ (/ (+ 1.0 alpha) beta) (+ 2.0 (+ alpha beta)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.2e+17) {
tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.2d+17) then
tmp = 1.0d0 / (((alpha + (2.0d0 + beta)) / (1.0d0 + beta)) * ((2.0d0 + beta) * (beta + 3.0d0)))
else
tmp = ((1.0d0 + alpha) / beta) / (2.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.2e+17) {
tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.2e+17: tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0))) else: tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.2e+17) tmp = Float64(1.0 / Float64(Float64(Float64(alpha + Float64(2.0 + beta)) / Float64(1.0 + beta)) * Float64(Float64(2.0 + beta) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(2.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.2e+17)
tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
else
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.2e+17], N[(1.0 / N[(N[(N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(1.0 + beta), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.2 \cdot 10^{+17}:\\
\;\;\;\;\frac{1}{\frac{\alpha + \left(2 + \beta\right)}{1 + \beta} \cdot \left(\left(2 + \beta\right) \cdot \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{2 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 5.2e17Initial program 99.9%
associate-/l/99.5%
associate-/r*96.3%
+-commutative96.3%
associate-+r+96.3%
+-commutative96.3%
associate-+r+96.3%
associate-+r+96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
*-commutative96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.1%
*-commutative81.1%
+-commutative81.1%
Applied egg-rr81.1%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 67.0%
clear-num67.0%
inv-pow67.0%
+-commutative67.0%
+-commutative67.0%
Applied egg-rr67.0%
unpow-167.0%
associate-/r/67.1%
+-commutative67.1%
+-commutative67.1%
+-commutative67.1%
*-commutative67.1%
Simplified67.1%
if 5.2e17 < beta Initial program 78.1%
associate-/l/74.7%
associate-/r*59.5%
+-commutative59.5%
associate-+r+59.5%
+-commutative59.5%
associate-+r+59.5%
associate-+r+59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
*-commutative59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
times-frac89.3%
Simplified89.3%
Taylor expanded in beta around inf 83.0%
associate-*l/83.2%
+-commutative83.2%
+-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-+l+83.2%
Applied egg-rr83.2%
associate-*r/83.1%
*-rgt-identity83.1%
Simplified83.1%
Final simplification72.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 7.8e+18)
(/
1.0
(* (/ (+ alpha (+ 2.0 beta)) (+ 1.0 beta)) (* (+ 2.0 beta) (+ beta 3.0))))
(/
(* (+ 1.0 alpha) (- (/ 1.0 beta) (* (/ 2.0 beta) (/ (+ alpha 2.0) beta))))
beta)))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.8e+18) {
tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) * ((1.0 / beta) - ((2.0 / beta) * ((alpha + 2.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.8d+18) then
tmp = 1.0d0 / (((alpha + (2.0d0 + beta)) / (1.0d0 + beta)) * ((2.0d0 + beta) * (beta + 3.0d0)))
else
tmp = ((1.0d0 + alpha) * ((1.0d0 / beta) - ((2.0d0 / beta) * ((alpha + 2.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.8e+18) {
tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) * ((1.0 / beta) - ((2.0 / beta) * ((alpha + 2.0) / beta)))) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.8e+18: tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0))) else: tmp = ((1.0 + alpha) * ((1.0 / beta) - ((2.0 / beta) * ((alpha + 2.0) / beta)))) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.8e+18) tmp = Float64(1.0 / Float64(Float64(Float64(alpha + Float64(2.0 + beta)) / Float64(1.0 + beta)) * Float64(Float64(2.0 + beta) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(Float64(1.0 / beta) - Float64(Float64(2.0 / beta) * Float64(Float64(alpha + 2.0) / beta)))) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.8e+18)
tmp = 1.0 / (((alpha + (2.0 + beta)) / (1.0 + beta)) * ((2.0 + beta) * (beta + 3.0)));
else
tmp = ((1.0 + alpha) * ((1.0 / beta) - ((2.0 / beta) * ((alpha + 2.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.8e+18], N[(1.0 / N[(N[(N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(1.0 + beta), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(1.0 / beta), $MachinePrecision] - N[(N[(2.0 / beta), $MachinePrecision] * N[(N[(alpha + 2.0), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.8 \cdot 10^{+18}:\\
\;\;\;\;\frac{1}{\frac{\alpha + \left(2 + \beta\right)}{1 + \beta} \cdot \left(\left(2 + \beta\right) \cdot \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \left(\frac{1}{\beta} - \frac{2}{\beta} \cdot \frac{\alpha + 2}{\beta}\right)}{\beta}\\
\end{array}
\end{array}
if beta < 7.8e18Initial program 99.9%
associate-/l/99.5%
associate-/r*96.3%
+-commutative96.3%
associate-+r+96.3%
+-commutative96.3%
associate-+r+96.3%
associate-+r+96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
*-commutative96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.1%
*-commutative81.1%
+-commutative81.1%
Applied egg-rr81.1%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 67.0%
clear-num67.0%
inv-pow67.0%
+-commutative67.0%
+-commutative67.0%
Applied egg-rr67.0%
unpow-167.0%
associate-/r/67.1%
+-commutative67.1%
+-commutative67.1%
+-commutative67.1%
*-commutative67.1%
Simplified67.1%
if 7.8e18 < beta Initial program 78.1%
associate-/l/74.7%
associate-/r*59.5%
+-commutative59.5%
associate-+r+59.5%
+-commutative59.5%
associate-+r+59.5%
associate-+r+59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
*-commutative59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
times-frac89.3%
Simplified89.3%
Taylor expanded in beta around inf 85.3%
associate-*l/85.3%
+-commutative85.3%
*-commutative85.3%
associate-+r+85.3%
+-commutative85.3%
associate-+l+85.3%
+-commutative85.3%
Applied egg-rr85.3%
Taylor expanded in beta around inf 82.7%
+-commutative82.7%
mul-1-neg82.7%
unsub-neg82.7%
metadata-eval82.7%
distribute-lft-in82.7%
unpow282.7%
times-frac82.6%
+-commutative82.6%
Simplified82.6%
Final simplification72.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ alpha beta))))
(if (<= beta 24.0)
(/ (+ 1.0 alpha) (* t_0 (* (+ alpha 2.0) (+ alpha 3.0))))
(/ (/ (- alpha -1.0) beta) (+ 1.0 t_0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 24.0) {
tmp = (1.0 + alpha) / (t_0 * ((alpha + 2.0) * (alpha + 3.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (1.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 = 2.0d0 + (alpha + beta)
if (beta <= 24.0d0) then
tmp = (1.0d0 + alpha) / (t_0 * ((alpha + 2.0d0) * (alpha + 3.0d0)))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + t_0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 24.0) {
tmp = (1.0 + alpha) / (t_0 * ((alpha + 2.0) * (alpha + 3.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + t_0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (alpha + beta) tmp = 0 if beta <= 24.0: tmp = (1.0 + alpha) / (t_0 * ((alpha + 2.0) * (alpha + 3.0))) else: tmp = ((alpha - -1.0) / beta) / (1.0 + t_0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 24.0) tmp = Float64(Float64(1.0 + alpha) / Float64(t_0 * Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0)))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + t_0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 2.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 24.0)
tmp = (1.0 + alpha) / (t_0 * ((alpha + 2.0) * (alpha + 3.0)));
else
tmp = ((alpha - -1.0) / beta) / (1.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[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 24.0], N[(N[(1.0 + alpha), $MachinePrecision] / N[(t$95$0 * N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 24:\\
\;\;\;\;\frac{1 + \alpha}{t_0 \cdot \left(\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + t_0}\\
\end{array}
\end{array}
if beta < 24Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 97.7%
*-un-lft-identity97.7%
associate-/l/94.4%
associate-+r+94.4%
+-commutative94.4%
associate-+l+94.4%
+-commutative94.4%
Applied egg-rr94.4%
*-lft-identity94.4%
+-commutative94.4%
*-commutative94.4%
+-commutative94.4%
+-commutative94.4%
Simplified94.4%
if 24 < beta Initial program 78.8%
Taylor expanded in beta around -inf 81.8%
associate-*r/81.8%
mul-1-neg81.8%
sub-neg81.8%
mul-1-neg81.8%
distribute-neg-in81.8%
+-commutative81.8%
mul-1-neg81.8%
distribute-lft-in81.8%
metadata-eval81.8%
mul-1-neg81.8%
unsub-neg81.8%
Simplified81.8%
Final simplification89.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.35e+18) (/ (/ (+ 1.0 beta) (+ alpha (+ 2.0 beta))) (* (+ 2.0 beta) (+ beta 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ 2.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.35e+18) {
tmp = ((1.0 + beta) / (alpha + (2.0 + beta))) / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 1.35d+18) then
tmp = ((1.0d0 + beta) / (alpha + (2.0d0 + beta))) / ((2.0d0 + beta) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (2.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1.35e+18) {
tmp = ((1.0 + beta) / (alpha + (2.0 + beta))) / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.35e+18: tmp = ((1.0 + beta) / (alpha + (2.0 + beta))) / ((2.0 + beta) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.35e+18) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(alpha + Float64(2.0 + beta))) / Float64(Float64(2.0 + beta) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(2.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1.35e+18)
tmp = ((1.0 + beta) / (alpha + (2.0 + beta))) / ((2.0 + beta) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 1.35e+18], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.35 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\alpha + \left(2 + \beta\right)}}{\left(2 + \beta\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{2 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 1.35e18Initial program 99.9%
associate-/l/99.5%
associate-/r*96.3%
+-commutative96.3%
associate-+r+96.3%
+-commutative96.3%
associate-+r+96.3%
associate-+r+96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
*-commutative96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.1%
*-commutative81.1%
+-commutative81.1%
Applied egg-rr81.1%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 67.0%
expm1-log1p-u67.0%
expm1-udef78.7%
associate-/l/78.7%
+-commutative78.7%
+-commutative78.7%
Applied egg-rr78.7%
expm1-def67.1%
expm1-log1p67.1%
associate-/r*67.0%
+-commutative67.0%
+-commutative67.0%
+-commutative67.0%
*-commutative67.0%
Simplified67.0%
if 1.35e18 < beta Initial program 78.1%
associate-/l/74.7%
associate-/r*59.5%
+-commutative59.5%
associate-+r+59.5%
+-commutative59.5%
associate-+r+59.5%
associate-+r+59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
*-commutative59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
times-frac89.3%
Simplified89.3%
Taylor expanded in beta around inf 83.0%
associate-*l/83.2%
+-commutative83.2%
+-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-+l+83.2%
Applied egg-rr83.2%
associate-*r/83.1%
*-rgt-identity83.1%
Simplified83.1%
Final simplification72.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.4e+16) (/ (/ (/ (+ 1.0 beta) (+ beta 3.0)) (+ 2.0 beta)) (+ alpha (+ 2.0 beta))) (/ (/ (+ 1.0 alpha) beta) (+ 2.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.4e+16) {
tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / (alpha + (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.4d+16) then
tmp = (((1.0d0 + beta) / (beta + 3.0d0)) / (2.0d0 + beta)) / (alpha + (2.0d0 + beta))
else
tmp = ((1.0d0 + alpha) / beta) / (2.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.4e+16) {
tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / (alpha + (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.4e+16: tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / (alpha + (2.0 + beta)) else: tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.4e+16) tmp = Float64(Float64(Float64(Float64(1.0 + beta) / Float64(beta + 3.0)) / Float64(2.0 + beta)) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(2.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.4e+16)
tmp = (((1.0 + beta) / (beta + 3.0)) / (2.0 + beta)) / (alpha + (2.0 + beta));
else
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.4e+16], N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.4 \cdot 10^{+16}:\\
\;\;\;\;\frac{\frac{\frac{1 + \beta}{\beta + 3}}{2 + \beta}}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{2 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 3.4e16Initial program 99.9%
associate-/l/99.5%
associate-/r*96.3%
+-commutative96.3%
associate-+r+96.3%
+-commutative96.3%
associate-+r+96.3%
associate-+r+96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
*-commutative96.3%
distribute-rgt1-in96.3%
+-commutative96.3%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.1%
*-commutative81.1%
+-commutative81.1%
Applied egg-rr81.1%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in alpha around 0 67.0%
associate-/r*67.1%
Simplified67.1%
if 3.4e16 < beta Initial program 78.1%
associate-/l/74.7%
associate-/r*59.5%
+-commutative59.5%
associate-+r+59.5%
+-commutative59.5%
associate-+r+59.5%
associate-+r+59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
*-commutative59.5%
distribute-rgt1-in59.5%
+-commutative59.5%
times-frac89.3%
Simplified89.3%
Taylor expanded in beta around inf 83.0%
associate-*l/83.2%
+-commutative83.2%
+-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-+l+83.2%
Applied egg-rr83.2%
associate-*r/83.1%
*-rgt-identity83.1%
Simplified83.1%
Final simplification72.8%
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 beta) (+ 6.0 (* beta 5.0))) (+ alpha (+ 2.0 beta))) (/ (/ (+ 1.0 alpha) beta) (+ 2.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.8) {
tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.8d0) then
tmp = ((1.0d0 + beta) / (6.0d0 + (beta * 5.0d0))) / (alpha + (2.0d0 + beta))
else
tmp = ((1.0d0 + alpha) / beta) / (2.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.8) {
tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.8: tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta)) else: tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.8) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(6.0 + Float64(beta * 5.0))) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(2.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.8)
tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta));
else
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.8], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.8:\\
\;\;\;\;\frac{\frac{1 + \beta}{6 + \beta \cdot 5}}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{2 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 5.79999999999999982Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 66.4%
*-commutative66.4%
Simplified66.4%
if 5.79999999999999982 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 81.6%
associate-*l/81.8%
+-commutative81.8%
+-commutative81.8%
associate-+l+81.8%
+-commutative81.8%
associate-+l+81.8%
Applied egg-rr81.8%
associate-*r/81.8%
*-rgt-identity81.8%
Simplified81.8%
Final simplification72.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.6) (/ (/ (+ 1.0 beta) (+ 6.0 (* beta 5.0))) (+ alpha (+ 2.0 beta))) (/ (/ (- alpha -1.0) beta) (+ 1.0 (+ 2.0 (+ alpha beta))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.6) {
tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (alpha + beta)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.6d0) then
tmp = ((1.0d0 + beta) / (6.0d0 + (beta * 5.0d0))) / (alpha + (2.0d0 + beta))
else
tmp = ((alpha - (-1.0d0)) / beta) / (1.0d0 + (2.0d0 + (alpha + beta)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.6) {
tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta));
} else {
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (alpha + beta)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.6: tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta)) else: tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (alpha + beta))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.6) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(6.0 + Float64(beta * 5.0))) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(1.0 + Float64(2.0 + Float64(alpha + beta)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.6)
tmp = ((1.0 + beta) / (6.0 + (beta * 5.0))) / (alpha + (2.0 + beta));
else
tmp = ((alpha - -1.0) / beta) / (1.0 + (2.0 + (alpha + beta)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.6], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.6:\\
\;\;\;\;\frac{\frac{1 + \beta}{6 + \beta \cdot 5}}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{1 + \left(2 + \left(\alpha + \beta\right)\right)}\\
\end{array}
\end{array}
if beta < 4.5999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 66.4%
*-commutative66.4%
Simplified66.4%
if 4.5999999999999996 < beta Initial program 78.8%
Taylor expanded in beta around -inf 81.8%
associate-*r/81.8%
mul-1-neg81.8%
sub-neg81.8%
mul-1-neg81.8%
distribute-neg-in81.8%
+-commutative81.8%
mul-1-neg81.8%
distribute-lft-in81.8%
metadata-eval81.8%
mul-1-neg81.8%
unsub-neg81.8%
Simplified81.8%
Final simplification72.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 8.2)
(/
(+ 0.16666666666666666 (* alpha 0.027777777777777776))
(+ alpha (+ 2.0 beta)))
(* (/ 1.0 beta) (/ (+ 1.0 alpha) beta))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.2) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (2.0 + beta));
} else {
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 8.2d0) then
tmp = (0.16666666666666666d0 + (alpha * 0.027777777777777776d0)) / (alpha + (2.0d0 + beta))
else
tmp = (1.0d0 / beta) * ((1.0d0 + alpha) / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 8.2) {
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (2.0 + beta));
} else {
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.2: tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (2.0 + beta)) else: tmp = (1.0 / beta) * ((1.0 + alpha) / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.2) tmp = Float64(Float64(0.16666666666666666 + Float64(alpha * 0.027777777777777776)) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(1.0 / beta) * Float64(Float64(1.0 + alpha) / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 8.2)
tmp = (0.16666666666666666 + (alpha * 0.027777777777777776)) / (alpha + (2.0 + beta));
else
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 8.2], N[(N[(0.16666666666666666 + N[(alpha * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8.2:\\
\;\;\;\;\frac{0.16666666666666666 + \alpha \cdot 0.027777777777777776}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta} \cdot \frac{1 + \alpha}{\beta}\\
\end{array}
\end{array}
if beta < 8.1999999999999993Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 65.0%
*-commutative65.0%
Simplified65.0%
if 8.1999999999999993 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 84.9%
Taylor expanded in beta around inf 81.4%
Final simplification71.0%
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 0.027777777777777776))
(+ alpha (+ 2.0 beta)))
(* (/ 1.0 beta) (/ (+ 1.0 alpha) beta))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.2) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta));
} else {
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.2d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / (alpha + (2.0d0 + beta))
else
tmp = (1.0d0 / beta) * ((1.0d0 + alpha) / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.2) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta));
} else {
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.2: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta)) else: tmp = (1.0 / beta) * ((1.0 + alpha) / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.2) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(1.0 / beta) * Float64(Float64(1.0 + alpha) / beta)); 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 * 0.027777777777777776)) / (alpha + (2.0 + beta));
else
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.2], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.2:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta} \cdot \frac{1 + \alpha}{\beta}\\
\end{array}
\end{array}
if beta < 5.20000000000000018Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 66.4%
*-commutative66.4%
Simplified66.4%
if 5.20000000000000018 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 84.9%
Taylor expanded in beta around inf 81.4%
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.6)
(/
(+ 0.16666666666666666 (* beta 0.027777777777777776))
(+ alpha (+ 2.0 beta)))
(/ (/ (+ 1.0 alpha) beta) (+ 2.0 (+ alpha beta)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.6) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.6d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / (alpha + (2.0d0 + beta))
else
tmp = ((1.0d0 + alpha) / beta) / (2.0d0 + (alpha + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.6) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta));
} else {
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.6: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta)) else: tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.6) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(2.0 + Float64(alpha + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.6)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / (alpha + (2.0 + beta));
else
tmp = ((1.0 + alpha) / beta) / (2.0 + (alpha + beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.6], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.6:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{2 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 4.5999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 66.4%
*-commutative66.4%
Simplified66.4%
if 4.5999999999999996 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 81.6%
associate-*l/81.8%
+-commutative81.8%
+-commutative81.8%
associate-+l+81.8%
+-commutative81.8%
associate-+l+81.8%
Applied egg-rr81.8%
associate-*r/81.8%
*-rgt-identity81.8%
Simplified81.8%
Final simplification72.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.5) (/ 0.16666666666666666 (+ alpha (+ 2.0 beta))) (* (+ 1.0 alpha) (/ 1.0 (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.5) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = (1.0 + 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 <= 8.5d0) then
tmp = 0.16666666666666666d0 / (alpha + (2.0d0 + beta))
else
tmp = (1.0d0 + 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 <= 8.5) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.5: tmp = 0.16666666666666666 / (alpha + (2.0 + beta)) else: tmp = (1.0 + alpha) * (1.0 / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.5) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(1.0 + alpha) * 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 <= 8.5)
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
else
tmp = (1.0 + 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, 8.5], N[(0.16666666666666666 / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $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 8.5:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 8.5Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.2%
if 8.5 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 80.6%
unpow280.6%
Simplified80.6%
div-inv80.6%
Applied egg-rr80.6%
Final simplification70.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.6) (/ 0.16666666666666666 (+ alpha (+ 2.0 beta))) (* (/ 1.0 beta) (/ (+ 1.0 alpha) beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 7.6d0) then
tmp = 0.16666666666666666d0 / (alpha + (2.0d0 + beta))
else
tmp = (1.0d0 / beta) * ((1.0d0 + alpha) / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.6: tmp = 0.16666666666666666 / (alpha + (2.0 + beta)) else: tmp = (1.0 / beta) * ((1.0 + alpha) / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.6) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(1.0 / beta) * Float64(Float64(1.0 + alpha) / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.6)
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
else
tmp = (1.0 / beta) * ((1.0 + alpha) / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 7.6], N[(0.16666666666666666 / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.6:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta} \cdot \frac{1 + \alpha}{\beta}\\
\end{array}
\end{array}
if beta < 7.5999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.2%
if 7.5999999999999996 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 84.9%
Taylor expanded in beta around inf 81.4%
Final simplification71.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.6) (/ 0.16666666666666666 (+ alpha (+ 2.0 beta))) (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} 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.6d0) then
tmp = 0.16666666666666666d0 / (alpha + (2.0d0 + beta))
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.6) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.6: tmp = 0.16666666666666666 / (alpha + (2.0 + beta)) else: tmp = 1.0 / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.6) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(2.0 + beta))); 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.6)
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
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.6], N[(0.16666666666666666 / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $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.6:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 7.5999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.2%
if 7.5999999999999996 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 80.6%
unpow280.6%
Simplified80.6%
Taylor expanded in alpha around 0 75.8%
unpow275.8%
Simplified75.8%
Final simplification69.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.3) (/ 0.16666666666666666 (+ alpha (+ 2.0 beta))) (/ 1.0 (* beta (+ 2.0 beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.3) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = 1.0 / (beta * (2.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 <= 6.3d0) then
tmp = 0.16666666666666666d0 / (alpha + (2.0d0 + beta))
else
tmp = 1.0d0 / (beta * (2.0d0 + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.3) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = 1.0 / (beta * (2.0 + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.3: tmp = 0.16666666666666666 / (alpha + (2.0 + beta)) else: tmp = 1.0 / (beta * (2.0 + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.3) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(1.0 / Float64(beta * Float64(2.0 + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 6.3)
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
else
tmp = 1.0 / (beta * (2.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, 6.3], N[(0.16666666666666666 / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6.3:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(2 + \beta\right)}\\
\end{array}
\end{array}
if beta < 6.29999999999999982Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.2%
if 6.29999999999999982 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 81.6%
Taylor expanded in alpha around 0 75.8%
Final simplification69.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.5) (/ 0.16666666666666666 (+ alpha (+ 2.0 beta))) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.5) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} 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.5d0) then
tmp = 0.16666666666666666d0 / (alpha + (2.0d0 + beta))
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.5) {
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.5: tmp = 0.16666666666666666 / (alpha + (2.0 + beta)) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.5) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(2.0 + beta))); 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.5)
tmp = 0.16666666666666666 / (alpha + (2.0 + beta));
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.5], N[(0.16666666666666666 / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $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.5:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 8.5Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.2%
if 8.5 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 80.6%
unpow280.6%
Simplified80.6%
Final simplification70.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.5) (+ (* alpha -0.041666666666666664) 0.08333333333333333) (/ 1.0 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.5) {
tmp = (alpha * -0.041666666666666664) + 0.08333333333333333;
} else {
tmp = 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.5d0) then
tmp = (alpha * (-0.041666666666666664d0)) + 0.08333333333333333d0
else
tmp = 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.5) {
tmp = (alpha * -0.041666666666666664) + 0.08333333333333333;
} else {
tmp = 1.0 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.5: tmp = (alpha * -0.041666666666666664) + 0.08333333333333333 else: tmp = 1.0 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.5) tmp = Float64(Float64(alpha * -0.041666666666666664) + 0.08333333333333333); else tmp = 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.5)
tmp = (alpha * -0.041666666666666664) + 0.08333333333333333;
else
tmp = 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.5], N[(N[(alpha * -0.041666666666666664), $MachinePrecision] + 0.08333333333333333), $MachinePrecision], N[(1.0 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8.5:\\
\;\;\;\;\alpha \cdot -0.041666666666666664 + 0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 8.5Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.1%
Taylor expanded in alpha around 0 63.2%
if 8.5 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 81.6%
Taylor expanded in alpha around inf 6.7%
Final simplification42.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 3.1e+107) (/ 0.16666666666666666 (+ 2.0 beta)) (/ 1.0 (* alpha alpha))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 3.1e+107) {
tmp = 0.16666666666666666 / (2.0 + beta);
} else {
tmp = 1.0 / (alpha * alpha);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (alpha <= 3.1d+107) then
tmp = 0.16666666666666666d0 / (2.0d0 + beta)
else
tmp = 1.0d0 / (alpha * alpha)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 3.1e+107) {
tmp = 0.16666666666666666 / (2.0 + beta);
} else {
tmp = 1.0 / (alpha * alpha);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 3.1e+107: tmp = 0.16666666666666666 / (2.0 + beta) else: tmp = 1.0 / (alpha * alpha) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 3.1e+107) tmp = Float64(0.16666666666666666 / Float64(2.0 + beta)); else tmp = Float64(1.0 / Float64(alpha * alpha)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 3.1e+107)
tmp = 0.16666666666666666 / (2.0 + beta);
else
tmp = 1.0 / (alpha * alpha);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[alpha, 3.1e+107], N[(0.16666666666666666 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(alpha * alpha), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 3.1 \cdot 10^{+107}:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \beta}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\alpha \cdot \alpha}\\
\end{array}
\end{array}
if alpha < 3.10000000000000026e107Initial program 99.3%
associate-/l/98.4%
associate-/r*92.8%
+-commutative92.8%
associate-+r+92.8%
+-commutative92.8%
associate-+r+92.8%
associate-+r+92.8%
distribute-rgt1-in92.8%
+-commutative92.8%
*-commutative92.8%
distribute-rgt1-in92.8%
+-commutative92.8%
times-frac98.8%
Simplified98.8%
expm1-log1p-u98.8%
expm1-udef68.3%
*-commutative68.3%
+-commutative68.3%
Applied egg-rr68.3%
expm1-def98.8%
expm1-log1p98.8%
associate-*r/98.8%
*-commutative98.8%
associate-*r/98.3%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 66.5%
Taylor expanded in alpha around 0 54.1%
if 3.10000000000000026e107 < alpha Initial program 67.1%
associate-/l/64.1%
associate-/r*49.8%
+-commutative49.8%
associate-+r+49.8%
+-commutative49.8%
associate-+r+49.8%
associate-+r+49.8%
distribute-rgt1-in49.8%
+-commutative49.8%
*-commutative49.8%
distribute-rgt1-in49.8%
+-commutative49.8%
times-frac85.6%
Simplified85.6%
expm1-log1p-u85.6%
expm1-udef71.2%
*-commutative71.2%
+-commutative71.2%
Applied egg-rr71.2%
expm1-def85.6%
expm1-log1p85.6%
associate-*r/85.5%
*-commutative85.5%
associate-*r/64.1%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 80.7%
Taylor expanded in alpha around inf 80.7%
unpow280.7%
Simplified80.7%
Final simplification60.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.6) (/ 0.16666666666666666 (+ 2.0 beta)) (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = 0.16666666666666666 / (2.0 + beta);
} 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.6d0) then
tmp = 0.16666666666666666d0 / (2.0d0 + beta)
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.6) {
tmp = 0.16666666666666666 / (2.0 + beta);
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.6: tmp = 0.16666666666666666 / (2.0 + beta) else: tmp = 1.0 / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.6) tmp = Float64(0.16666666666666666 / Float64(2.0 + beta)); 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.6)
tmp = 0.16666666666666666 / (2.0 + beta);
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.6], N[(0.16666666666666666 / N[(2.0 + beta), $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.6:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \beta}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 7.5999999999999996Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 64.2%
if 7.5999999999999996 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 80.6%
unpow280.6%
Simplified80.6%
Taylor expanded in alpha around 0 75.8%
unpow275.8%
Simplified75.8%
Final simplification68.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 12.0) 0.08333333333333333 (/ 1.0 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 12.0) {
tmp = 0.08333333333333333;
} else {
tmp = 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 <= 12.0d0) then
tmp = 0.08333333333333333d0
else
tmp = 1.0d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 12.0) {
tmp = 0.08333333333333333;
} else {
tmp = 1.0 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 12.0: tmp = 0.08333333333333333 else: tmp = 1.0 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 12.0) tmp = 0.08333333333333333; else tmp = 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 <= 12.0)
tmp = 0.08333333333333333;
else
tmp = 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, 12.0], 0.08333333333333333, N[(1.0 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 12:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 12Initial program 99.9%
associate-/l/99.5%
associate-/r*96.2%
+-commutative96.2%
associate-+r+96.2%
+-commutative96.2%
associate-+r+96.2%
associate-+r+96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
*-commutative96.2%
distribute-rgt1-in96.2%
+-commutative96.2%
times-frac99.5%
Simplified99.5%
expm1-log1p-u99.5%
expm1-udef81.5%
*-commutative81.5%
+-commutative81.5%
Applied egg-rr81.5%
expm1-def99.5%
expm1-log1p99.5%
associate-*r/99.5%
*-commutative99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 67.0%
Taylor expanded in beta around 0 65.1%
Taylor expanded in alpha around 0 64.1%
if 12 < beta Initial program 78.8%
associate-/l/75.5%
associate-/r*60.8%
+-commutative60.8%
associate-+r+60.8%
+-commutative60.8%
associate-+r+60.8%
associate-+r+60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
*-commutative60.8%
distribute-rgt1-in60.8%
+-commutative60.8%
times-frac89.6%
Simplified89.6%
Taylor expanded in beta around inf 81.6%
Taylor expanded in alpha around inf 6.7%
Final simplification43.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ alpha 2.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (alpha + 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 / (alpha + 2.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (alpha + 2.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (alpha + 2.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(alpha + 2.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (alpha + 2.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{\alpha + 2}
\end{array}
Initial program 92.1%
associate-/l/90.7%
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-frac95.9%
Simplified95.9%
expm1-log1p-u95.9%
expm1-udef68.9%
*-commutative68.9%
+-commutative68.9%
Applied egg-rr68.9%
expm1-def95.9%
expm1-log1p95.9%
associate-*r/95.8%
*-commutative95.8%
associate-*r/90.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 71.3%
Taylor expanded in beta around 0 43.3%
Final simplification43.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ 2.0 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (2.0 + beta);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.16666666666666666d0 / (2.0d0 + beta)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (2.0 + beta);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (2.0 + beta)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(2.0 + beta)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (2.0 + beta);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{2 + \beta}
\end{array}
Initial program 92.1%
associate-/l/90.7%
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-frac95.9%
Simplified95.9%
expm1-log1p-u95.9%
expm1-udef68.9%
*-commutative68.9%
+-commutative68.9%
Applied egg-rr68.9%
expm1-def95.9%
expm1-log1p95.9%
associate-*r/95.8%
*-commutative95.8%
associate-*r/90.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 69.7%
Taylor expanded in alpha around 0 43.1%
Final simplification43.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.1%
associate-/l/90.7%
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-frac95.9%
Simplified95.9%
expm1-log1p-u95.9%
expm1-udef68.9%
*-commutative68.9%
+-commutative68.9%
Applied egg-rr68.9%
expm1-def95.9%
expm1-log1p95.9%
associate-*r/95.8%
*-commutative95.8%
associate-*r/90.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 71.3%
Taylor expanded in beta around 0 43.3%
Taylor expanded in alpha around 0 42.1%
Final simplification42.1%
herbie shell --seed 2023274
(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)))