
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ (+ alpha beta) (* 2.0 1.0)))) (/ (/ (/ (+ (+ (+ alpha beta) (* beta alpha)) 1.0) t_0) t_0) (+ t_0 1.0))))
double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = (alpha + beta) + (2.0d0 * 1.0d0)
code = (((((alpha + beta) + (beta * alpha)) + 1.0d0) / t_0) / t_0) / (t_0 + 1.0d0)
end function
public static double code(double alpha, double beta) {
double t_0 = (alpha + beta) + (2.0 * 1.0);
return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0);
}
def code(alpha, beta): t_0 = (alpha + beta) + (2.0 * 1.0) return (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0)
function code(alpha, beta) t_0 = Float64(Float64(alpha + beta) + Float64(2.0 * 1.0)) return Float64(Float64(Float64(Float64(Float64(Float64(alpha + beta) + Float64(beta * alpha)) + 1.0) / t_0) / t_0) / Float64(t_0 + 1.0)) end
function tmp = code(alpha, beta) t_0 = (alpha + beta) + (2.0 * 1.0); tmp = (((((alpha + beta) + (beta * alpha)) + 1.0) / t_0) / t_0) / (t_0 + 1.0); end
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(alpha + beta), $MachinePrecision] + N[(2.0 * 1.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(N[(N[(alpha + beta), $MachinePrecision] + N[(beta * alpha), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\alpha + \beta\right) + 2 \cdot 1\\
\frac{\frac{\frac{\left(\left(\alpha + \beta\right) + \beta \cdot \alpha\right) + 1}{t_0}}{t_0}}{t_0 + 1}
\end{array}
\end{array}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ (+ alpha beta) 2.0)))
(if (<= alpha 4.6e-7)
(/ (/ (/ (+ (+ (+ alpha beta) (* alpha beta)) 1.0) t_0) t_0) (+ 1.0 t_0))
(*
(/ (+ alpha 1.0) (+ alpha (+ beta 2.0)))
(- (/ 1.0 beta) (* 2.0 (/ alpha (* beta beta))))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = (alpha + beta) + 2.0;
double tmp;
if (alpha <= 4.6e-7) {
tmp = (((((alpha + beta) + (alpha * beta)) + 1.0) / t_0) / t_0) / (1.0 + t_0);
} else {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((1.0 / beta) - (2.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) :: t_0
real(8) :: tmp
t_0 = (alpha + beta) + 2.0d0
if (alpha <= 4.6d-7) then
tmp = (((((alpha + beta) + (alpha * beta)) + 1.0d0) / t_0) / t_0) / (1.0d0 + t_0)
else
tmp = ((alpha + 1.0d0) / (alpha + (beta + 2.0d0))) * ((1.0d0 / beta) - (2.0d0 * (alpha / (beta * beta))))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = (alpha + beta) + 2.0;
double tmp;
if (alpha <= 4.6e-7) {
tmp = (((((alpha + beta) + (alpha * beta)) + 1.0) / t_0) / t_0) / (1.0 + t_0);
} else {
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((1.0 / beta) - (2.0 * (alpha / (beta * beta))));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = (alpha + beta) + 2.0 tmp = 0 if alpha <= 4.6e-7: tmp = (((((alpha + beta) + (alpha * beta)) + 1.0) / t_0) / t_0) / (1.0 + t_0) else: tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((1.0 / beta) - (2.0 * (alpha / (beta * beta)))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(Float64(alpha + beta) + 2.0) tmp = 0.0 if (alpha <= 4.6e-7) tmp = Float64(Float64(Float64(Float64(Float64(Float64(alpha + beta) + Float64(alpha * beta)) + 1.0) / t_0) / t_0) / Float64(1.0 + t_0)); else tmp = Float64(Float64(Float64(alpha + 1.0) / Float64(alpha + Float64(beta + 2.0))) * Float64(Float64(1.0 / beta) - Float64(2.0 * Float64(alpha / Float64(beta * beta))))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = (alpha + beta) + 2.0;
tmp = 0.0;
if (alpha <= 4.6e-7)
tmp = (((((alpha + beta) + (alpha * beta)) + 1.0) / t_0) / t_0) / (1.0 + t_0);
else
tmp = ((alpha + 1.0) / (alpha + (beta + 2.0))) * ((1.0 / beta) - (2.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_] := Block[{t$95$0 = N[(N[(alpha + beta), $MachinePrecision] + 2.0), $MachinePrecision]}, If[LessEqual[alpha, 4.6e-7], N[(N[(N[(N[(N[(N[(alpha + beta), $MachinePrecision] + N[(alpha * beta), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha + 1.0), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / beta), $MachinePrecision] - N[(2.0 * N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \left(\alpha + \beta\right) + 2\\
\mathbf{if}\;\alpha \leq 4.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{\frac{\frac{\left(\left(\alpha + \beta\right) + \alpha \cdot \beta\right) + 1}{t_0}}{t_0}}{1 + t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{\alpha + \left(\beta + 2\right)} \cdot \left(\frac{1}{\beta} - 2 \cdot \frac{\alpha}{\beta \cdot \beta}\right)\\
\end{array}
\end{array}
if alpha < 4.5999999999999999e-7Initial program 99.9%
if 4.5999999999999999e-7 < alpha Initial program 84.2%
associate-/l/80.0%
associate-/r*75.4%
+-commutative75.4%
associate-+r+75.4%
+-commutative75.4%
associate-+r+75.4%
associate-+r+75.4%
distribute-rgt1-in75.4%
+-commutative75.4%
*-commutative75.4%
distribute-rgt1-in75.4%
+-commutative75.4%
times-frac91.5%
Simplified91.5%
Taylor expanded in beta around inf 20.8%
+-commutative20.8%
mul-1-neg20.8%
unsub-neg20.8%
metadata-eval20.8%
distribute-lft-in20.8%
*-commutative20.8%
unpow220.8%
times-frac20.8%
Simplified20.8%
Taylor expanded in alpha around inf 20.8%
unpow220.8%
Simplified20.8%
Final simplification74.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 5e+144)
(* (/ (+ alpha 1.0) t_0) (/ (+ beta 1.0) (* t_0 (+ beta (+ alpha 3.0)))))
(/ (/ (- alpha -1.0) beta) beta))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 5e+144) {
tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0))));
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 5d+144) then
tmp = ((alpha + 1.0d0) / t_0) * ((beta + 1.0d0) / (t_0 * (beta + (alpha + 3.0d0))))
else
tmp = ((alpha - (-1.0d0)) / beta) / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 5e+144) {
tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0))));
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 5e+144: tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0)))) else: tmp = ((alpha - -1.0) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 5e+144) tmp = Float64(Float64(Float64(alpha + 1.0) / t_0) * Float64(Float64(beta + 1.0) / Float64(t_0 * Float64(beta + Float64(alpha + 3.0))))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 5e+144)
tmp = ((alpha + 1.0) / t_0) * ((beta + 1.0) / (t_0 * (beta + (alpha + 3.0))));
else
tmp = ((alpha - -1.0) / beta) / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 5e+144], N[(N[(N[(alpha + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(beta + 1.0), $MachinePrecision] / N[(t$95$0 * N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 5 \cdot 10^{+144}:\\
\;\;\;\;\frac{\alpha + 1}{t_0} \cdot \frac{\beta + 1}{t_0 \cdot \left(\beta + \left(\alpha + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 4.9999999999999999e144Initial program 98.0%
associate-/l/96.8%
associate-/r*91.9%
+-commutative91.9%
associate-+r+91.9%
+-commutative91.9%
associate-+r+91.9%
associate-+r+91.9%
distribute-rgt1-in91.9%
+-commutative91.9%
*-commutative91.9%
distribute-rgt1-in91.9%
+-commutative91.9%
times-frac98.7%
Simplified98.7%
if 4.9999999999999999e144 < beta Initial program 80.3%
Taylor expanded in beta around -inf 97.8%
associate-*r/97.8%
mul-1-neg97.8%
sub-neg97.8%
mul-1-neg97.8%
distribute-neg-in97.8%
+-commutative97.8%
mul-1-neg97.8%
distribute-lft-in97.8%
metadata-eval97.8%
mul-1-neg97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in beta around inf 97.8%
Final simplification98.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 7.9e+40)
(/ (* (+ alpha 1.0) (+ beta 1.0)) (* (* t_0 t_0) (+ beta (+ alpha 3.0))))
(*
(/ (+ alpha 1.0) t_0)
(- (/ 1.0 beta) (* 2.0 (/ alpha (* beta beta))))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 7.9e+40) {
tmp = ((alpha + 1.0) * (beta + 1.0)) / ((t_0 * t_0) * (beta + (alpha + 3.0)));
} else {
tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.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) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 7.9d+40) then
tmp = ((alpha + 1.0d0) * (beta + 1.0d0)) / ((t_0 * t_0) * (beta + (alpha + 3.0d0)))
else
tmp = ((alpha + 1.0d0) / t_0) * ((1.0d0 / beta) - (2.0d0 * (alpha / (beta * beta))))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 7.9e+40) {
tmp = ((alpha + 1.0) * (beta + 1.0)) / ((t_0 * t_0) * (beta + (alpha + 3.0)));
} else {
tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.0 * (alpha / (beta * beta))));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 7.9e+40: tmp = ((alpha + 1.0) * (beta + 1.0)) / ((t_0 * t_0) * (beta + (alpha + 3.0))) else: tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.0 * (alpha / (beta * beta)))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 7.9e+40) tmp = Float64(Float64(Float64(alpha + 1.0) * Float64(beta + 1.0)) / Float64(Float64(t_0 * t_0) * Float64(beta + Float64(alpha + 3.0)))); else tmp = Float64(Float64(Float64(alpha + 1.0) / t_0) * Float64(Float64(1.0 / beta) - Float64(2.0 * Float64(alpha / Float64(beta * beta))))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 7.9e+40)
tmp = ((alpha + 1.0) * (beta + 1.0)) / ((t_0 * t_0) * (beta + (alpha + 3.0)));
else
tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.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_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 7.9e+40], N[(N[(N[(alpha + 1.0), $MachinePrecision] * N[(beta + 1.0), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$0 * t$95$0), $MachinePrecision] * N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / beta), $MachinePrecision] - N[(2.0 * N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 7.9 \cdot 10^{+40}:\\
\;\;\;\;\frac{\left(\alpha + 1\right) \cdot \left(\beta + 1\right)}{\left(t_0 \cdot t_0\right) \cdot \left(\beta + \left(\alpha + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{t_0} \cdot \left(\frac{1}{\beta} - 2 \cdot \frac{\alpha}{\beta \cdot \beta}\right)\\
\end{array}
\end{array}
if beta < 7.8999999999999997e40Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
metadata-eval99.6%
associate-+l+99.6%
*-commutative99.6%
metadata-eval99.6%
Simplified99.6%
expm1-log1p-u98.5%
expm1-udef98.5%
Applied egg-rr98.5%
expm1-def98.5%
expm1-log1p99.6%
associate-*r*99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
if 7.8999999999999997e40 < beta Initial program 82.1%
associate-/l/77.0%
associate-/r*58.9%
+-commutative58.9%
associate-+r+58.9%
+-commutative58.9%
associate-+r+58.9%
associate-+r+58.9%
distribute-rgt1-in58.9%
+-commutative58.9%
*-commutative58.9%
distribute-rgt1-in58.9%
+-commutative58.9%
times-frac89.9%
Simplified89.9%
Taylor expanded in beta around inf 86.3%
+-commutative86.3%
mul-1-neg86.3%
unsub-neg86.3%
metadata-eval86.3%
distribute-lft-in86.3%
*-commutative86.3%
unpow286.3%
times-frac86.3%
Simplified86.3%
Taylor expanded in alpha around inf 86.3%
unpow286.3%
Simplified86.3%
Final simplification95.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 7.6e+31)
(/ (+ beta 1.0) (* t_0 (* (+ beta 2.0) (+ beta 3.0))))
(*
(/ (+ alpha 1.0) t_0)
(- (/ 1.0 beta) (* 2.0 (/ alpha (* beta beta))))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 7.6e+31) {
tmp = (beta + 1.0) / (t_0 * ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.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) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 7.6d+31) then
tmp = (beta + 1.0d0) / (t_0 * ((beta + 2.0d0) * (beta + 3.0d0)))
else
tmp = ((alpha + 1.0d0) / t_0) * ((1.0d0 / beta) - (2.0d0 * (alpha / (beta * beta))))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 7.6e+31) {
tmp = (beta + 1.0) / (t_0 * ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.0 * (alpha / (beta * beta))));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 7.6e+31: tmp = (beta + 1.0) / (t_0 * ((beta + 2.0) * (beta + 3.0))) else: tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.0 * (alpha / (beta * beta)))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 7.6e+31) tmp = Float64(Float64(beta + 1.0) / Float64(t_0 * Float64(Float64(beta + 2.0) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(alpha + 1.0) / t_0) * Float64(Float64(1.0 / beta) - Float64(2.0 * Float64(alpha / Float64(beta * beta))))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 7.6e+31)
tmp = (beta + 1.0) / (t_0 * ((beta + 2.0) * (beta + 3.0)));
else
tmp = ((alpha + 1.0) / t_0) * ((1.0 / beta) - (2.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_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 7.6e+31], N[(N[(beta + 1.0), $MachinePrecision] / N[(t$95$0 * N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / beta), $MachinePrecision] - N[(2.0 * N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 7.6 \cdot 10^{+31}:\\
\;\;\;\;\frac{\beta + 1}{t_0 \cdot \left(\left(\beta + 2\right) \cdot \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{t_0} \cdot \left(\frac{1}{\beta} - 2 \cdot \frac{\alpha}{\beta \cdot \beta}\right)\\
\end{array}
\end{array}
if beta < 7.6000000000000003e31Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
metadata-eval99.6%
associate-+l+99.6%
*-commutative99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in alpha around 0 70.0%
Taylor expanded in alpha around 0 71.0%
if 7.6000000000000003e31 < beta Initial program 82.8%
associate-/l/77.9%
associate-/r*60.6%
+-commutative60.6%
associate-+r+60.6%
+-commutative60.6%
associate-+r+60.6%
associate-+r+60.6%
distribute-rgt1-in60.6%
+-commutative60.6%
*-commutative60.6%
distribute-rgt1-in60.6%
+-commutative60.6%
times-frac90.3%
Simplified90.3%
Taylor expanded in beta around inf 86.8%
+-commutative86.8%
mul-1-neg86.8%
unsub-neg86.8%
metadata-eval86.8%
distribute-lft-in86.8%
*-commutative86.8%
unpow286.8%
times-frac86.8%
Simplified86.8%
Taylor expanded in alpha around inf 86.8%
unpow286.8%
Simplified86.8%
Final simplification75.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.05e+32) (/ (+ beta 1.0) (* (+ alpha (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0)))) (/ (/ (- alpha -1.0) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.05e+32) {
tmp = (beta + 1.0) / ((alpha + (beta + 2.0)) * ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 1.05d+32) then
tmp = (beta + 1.0d0) / ((alpha + (beta + 2.0d0)) * ((beta + 2.0d0) * (beta + 3.0d0)))
else
tmp = ((alpha - (-1.0d0)) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1.05e+32) {
tmp = (beta + 1.0) / ((alpha + (beta + 2.0)) * ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.05e+32: tmp = (beta + 1.0) / ((alpha + (beta + 2.0)) * ((beta + 2.0) * (beta + 3.0))) else: tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.05e+32) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(alpha + Float64(beta + 2.0)) * Float64(Float64(beta + 2.0) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(alpha + Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1.05e+32)
tmp = (beta + 1.0) / ((alpha + (beta + 2.0)) * ((beta + 2.0) * (beta + 3.0)));
else
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 1.05e+32], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.05 \cdot 10^{+32}:\\
\;\;\;\;\frac{\beta + 1}{\left(\alpha + \left(\beta + 2\right)\right) \cdot \left(\left(\beta + 2\right) \cdot \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 1.05e32Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
metadata-eval99.6%
associate-+l+99.6%
*-commutative99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in alpha around 0 70.0%
Taylor expanded in alpha around 0 71.0%
if 1.05e32 < beta Initial program 82.8%
Taylor expanded in beta around -inf 87.2%
associate-*r/87.2%
mul-1-neg87.2%
sub-neg87.2%
mul-1-neg87.2%
distribute-neg-in87.2%
+-commutative87.2%
mul-1-neg87.2%
distribute-lft-in87.2%
metadata-eval87.2%
mul-1-neg87.2%
unsub-neg87.2%
Simplified87.2%
Taylor expanded in alpha around 0 87.2%
+-commutative87.2%
associate-+r+87.2%
Simplified87.2%
Final simplification75.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1e+32) (/ (/ (+ beta 1.0) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0))) (/ (/ (- alpha -1.0) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1e+32) {
tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 1d+32) then
tmp = ((beta + 1.0d0) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((alpha - (-1.0d0)) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1e+32) {
tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1e+32: tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1e+32) tmp = Float64(Float64(Float64(beta + 1.0) / Float64(beta + 2.0)) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(alpha + Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1e+32)
tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 1e+32], N[(N[(N[(beta + 1.0), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 10^{+32}:\\
\;\;\;\;\frac{\frac{\beta + 1}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 1.00000000000000005e32Initial program 99.8%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
*-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in alpha around 0 89.6%
Taylor expanded in alpha around 0 69.5%
+-commutative69.5%
Simplified69.5%
if 1.00000000000000005e32 < beta Initial program 82.8%
Taylor expanded in beta around -inf 87.2%
associate-*r/87.2%
mul-1-neg87.2%
sub-neg87.2%
mul-1-neg87.2%
distribute-neg-in87.2%
+-commutative87.2%
mul-1-neg87.2%
distribute-lft-in87.2%
metadata-eval87.2%
mul-1-neg87.2%
unsub-neg87.2%
Simplified87.2%
Taylor expanded in alpha around 0 87.2%
+-commutative87.2%
associate-+r+87.2%
Simplified87.2%
Final simplification74.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.0) (/ (+ 0.5 (* beta 0.25)) (* (+ beta 2.0) (+ beta 3.0))) (/ (/ (- alpha -1.0) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = (0.5 + (beta * 0.25)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.0d0) then
tmp = (0.5d0 + (beta * 0.25d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((alpha - (-1.0d0)) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = (0.5 + (beta * 0.25)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.0: tmp = (0.5 + (beta * 0.25)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.0) tmp = Float64(Float64(0.5 + Float64(beta * 0.25)) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(alpha + Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.0)
tmp = (0.5 + (beta * 0.25)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.0], N[(N[(0.5 + N[(beta * 0.25), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4:\\
\;\;\;\;\frac{0.5 + \beta \cdot 0.25}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 4Initial program 99.8%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
*-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in alpha around 0 89.7%
Taylor expanded in beta around 0 88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in alpha around 0 69.4%
*-commutative69.4%
+-commutative69.4%
+-commutative69.4%
Simplified69.4%
if 4 < beta Initial program 84.4%
Taylor expanded in beta around -inf 83.5%
associate-*r/83.5%
mul-1-neg83.5%
sub-neg83.5%
mul-1-neg83.5%
distribute-neg-in83.5%
+-commutative83.5%
mul-1-neg83.5%
distribute-lft-in83.5%
metadata-eval83.5%
mul-1-neg83.5%
unsub-neg83.5%
Simplified83.5%
Taylor expanded in alpha around 0 83.5%
+-commutative83.5%
associate-+r+83.5%
Simplified83.5%
Final simplification73.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.4) (/ 0.16666666666666666 (+ beta 2.0)) (/ (/ (- alpha -1.0) beta) (+ alpha (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.4d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = ((alpha - (-1.0d0)) / beta) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.4: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.4) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(alpha + Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.4)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = ((alpha - -1.0) / beta) / (alpha + (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.4], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.4:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5.4000000000000004Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 5.4000000000000004 < beta Initial program 84.4%
Taylor expanded in beta around -inf 83.5%
associate-*r/83.5%
mul-1-neg83.5%
sub-neg83.5%
mul-1-neg83.5%
distribute-neg-in83.5%
+-commutative83.5%
mul-1-neg83.5%
distribute-lft-in83.5%
metadata-eval83.5%
mul-1-neg83.5%
unsub-neg83.5%
Simplified83.5%
Taylor expanded in alpha around 0 83.5%
+-commutative83.5%
associate-+r+83.5%
Simplified83.5%
Final simplification73.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 7.9)
(/ 0.16666666666666666 (+ beta 2.0))
(if (<= beta 3.8e+152)
(/ (+ alpha 1.0) (* beta beta))
(/ (/ alpha beta) (+ beta 3.0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.9) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else if (beta <= 3.8e+152) {
tmp = (alpha + 1.0) / (beta * beta);
} else {
tmp = (alpha / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 7.9d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else if (beta <= 3.8d+152) then
tmp = (alpha + 1.0d0) / (beta * beta)
else
tmp = (alpha / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.9) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else if (beta <= 3.8e+152) {
tmp = (alpha + 1.0) / (beta * beta);
} else {
tmp = (alpha / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.9: tmp = 0.16666666666666666 / (beta + 2.0) elif beta <= 3.8e+152: tmp = (alpha + 1.0) / (beta * beta) else: tmp = (alpha / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.9) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); elseif (beta <= 3.8e+152) tmp = Float64(Float64(alpha + 1.0) / Float64(beta * beta)); else tmp = Float64(Float64(alpha / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.9)
tmp = 0.16666666666666666 / (beta + 2.0);
elseif (beta <= 3.8e+152)
tmp = (alpha + 1.0) / (beta * beta);
else
tmp = (alpha / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 7.9], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 3.8e+152], N[(N[(alpha + 1.0), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision], N[(N[(alpha / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.9:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{elif}\;\beta \leq 3.8 \cdot 10^{+152}:\\
\;\;\;\;\frac{\alpha + 1}{\beta \cdot \beta}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 7.9000000000000004Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 7.9000000000000004 < beta < 3.8e152Initial program 90.1%
associate-/l/85.3%
associate-/r*53.6%
+-commutative53.6%
associate-+r+53.6%
+-commutative53.6%
associate-+r+53.6%
associate-+r+53.6%
distribute-rgt1-in53.6%
+-commutative53.6%
*-commutative53.6%
distribute-rgt1-in53.6%
+-commutative53.6%
times-frac94.9%
Simplified94.9%
Taylor expanded in beta around inf 68.5%
unpow268.5%
Simplified68.5%
if 3.8e152 < beta Initial program 78.9%
Taylor expanded in beta around -inf 97.7%
associate-*r/97.7%
mul-1-neg97.7%
sub-neg97.7%
mul-1-neg97.7%
distribute-neg-in97.7%
+-commutative97.7%
mul-1-neg97.7%
distribute-lft-in97.7%
metadata-eval97.7%
mul-1-neg97.7%
unsub-neg97.7%
Simplified97.7%
Taylor expanded in alpha around 0 97.7%
+-commutative97.7%
Simplified97.7%
Taylor expanded in alpha around inf 87.6%
associate-/r*96.1%
+-commutative96.1%
Simplified96.1%
Final simplification73.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.5) (/ 0.16666666666666666 (+ beta 2.0)) (/ (/ (- alpha -1.0) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.5) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((alpha - -1.0) / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.5d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = ((alpha - (-1.0d0)) / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.5) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((alpha - -1.0) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.5: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = ((alpha - -1.0) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.5) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.5)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = ((alpha - -1.0) / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.5], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.5:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 5.5Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 5.5 < beta Initial program 84.4%
Taylor expanded in beta around -inf 83.5%
associate-*r/83.5%
mul-1-neg83.5%
sub-neg83.5%
mul-1-neg83.5%
distribute-neg-in83.5%
+-commutative83.5%
mul-1-neg83.5%
distribute-lft-in83.5%
metadata-eval83.5%
mul-1-neg83.5%
unsub-neg83.5%
Simplified83.5%
Taylor expanded in alpha around 0 83.3%
+-commutative83.3%
Simplified83.3%
Final simplification73.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.4) (/ 0.16666666666666666 (+ beta 2.0)) (/ 1.0 (* beta (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.4d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = 1.0d0 / (beta * (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.4: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = 1.0 / (beta * (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.4) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(1.0 / Float64(beta * Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.4)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = 1.0 / (beta * (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.4], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.4:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5.4000000000000004Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 5.4000000000000004 < beta Initial program 84.4%
Taylor expanded in beta around -inf 83.5%
associate-*r/83.5%
mul-1-neg83.5%
sub-neg83.5%
mul-1-neg83.5%
distribute-neg-in83.5%
+-commutative83.5%
mul-1-neg83.5%
distribute-lft-in83.5%
metadata-eval83.5%
mul-1-neg83.5%
unsub-neg83.5%
Simplified83.5%
Taylor expanded in alpha around 0 73.4%
+-commutative73.4%
Simplified73.4%
Final simplification70.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.0) (/ 0.16666666666666666 (+ beta 2.0)) (/ (+ alpha 1.0) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = (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.0d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = (alpha + 1.0d0) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = (alpha + 1.0) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.0: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = (alpha + 1.0) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.0) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(alpha + 1.0) / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 8.0)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = (alpha + 1.0) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 8.0], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(alpha + 1.0), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha + 1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 8Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 8 < beta Initial program 84.4%
associate-/l/80.0%
associate-/r*64.3%
+-commutative64.3%
associate-+r+64.3%
+-commutative64.3%
associate-+r+64.3%
associate-+r+64.3%
distribute-rgt1-in64.3%
+-commutative64.3%
*-commutative64.3%
distribute-rgt1-in64.3%
+-commutative64.3%
times-frac91.2%
Simplified91.2%
Taylor expanded in beta around inf 78.1%
unpow278.1%
Simplified78.1%
Final simplification71.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.9) (/ 0.16666666666666666 (+ beta 2.0)) (/ (/ (- alpha -1.0) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.9) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 7.9d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = ((alpha - (-1.0d0)) / beta) / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.9) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.9: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = ((alpha - -1.0) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.9) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(Float64(Float64(alpha - -1.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.9)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = ((alpha - -1.0) / beta) / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 7.9], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.9:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 7.9000000000000004Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 7.9000000000000004 < beta Initial program 84.4%
Taylor expanded in beta around -inf 83.5%
associate-*r/83.5%
mul-1-neg83.5%
sub-neg83.5%
mul-1-neg83.5%
distribute-neg-in83.5%
+-commutative83.5%
mul-1-neg83.5%
distribute-lft-in83.5%
metadata-eval83.5%
mul-1-neg83.5%
unsub-neg83.5%
Simplified83.5%
Taylor expanded in beta around inf 83.2%
Final simplification73.4%
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 (+ beta 2.0)) (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 7.6d0) then
tmp = 0.16666666666666666d0 / (beta + 2.0d0)
else
tmp = 1.0d0 / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = 0.16666666666666666 / (beta + 2.0);
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.6: tmp = 0.16666666666666666 / (beta + 2.0) else: tmp = 1.0 / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.6) tmp = Float64(0.16666666666666666 / Float64(beta + 2.0)); else tmp = Float64(1.0 / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.6)
tmp = 0.16666666666666666 / (beta + 2.0);
else
tmp = 1.0 / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 7.6], N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.6:\\
\;\;\;\;\frac{0.16666666666666666}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 7.5999999999999996Initial program 99.8%
associate-/l/99.6%
associate-/r*99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+r+99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt1-in99.6%
+-commutative99.6%
times-frac99.6%
Simplified99.6%
add-cube-cbrt98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
add-cube-cbrt99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 97.7%
Taylor expanded in alpha around 0 68.7%
if 7.5999999999999996 < beta Initial program 84.4%
associate-/l/80.0%
associate-/r*64.3%
+-commutative64.3%
associate-+r+64.3%
+-commutative64.3%
associate-+r+64.3%
associate-+r+64.3%
distribute-rgt1-in64.3%
+-commutative64.3%
*-commutative64.3%
distribute-rgt1-in64.3%
+-commutative64.3%
times-frac91.2%
Simplified91.2%
Taylor expanded in beta around inf 78.1%
unpow278.1%
Simplified78.1%
Taylor expanded in alpha around 0 73.4%
unpow273.4%
Simplified73.4%
Final simplification70.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.0) 0.08333333333333333 (/ 0.25 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.25 / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.0d0) then
tmp = 0.08333333333333333d0
else
tmp = 0.25d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.25 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.0: tmp = 0.08333333333333333 else: tmp = 0.25 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.0) tmp = 0.08333333333333333; else tmp = Float64(0.25 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.0)
tmp = 0.08333333333333333;
else
tmp = 0.25 / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.0], 0.08333333333333333, N[(0.25 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{0.25}{\beta}\\
\end{array}
\end{array}
if beta < 3Initial program 99.8%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
*-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in alpha around 0 89.7%
Taylor expanded in beta around 0 88.0%
+-commutative88.0%
Simplified88.0%
Taylor expanded in alpha around 0 68.6%
if 3 < beta Initial program 84.4%
associate-/l/80.0%
associate-+l+80.0%
+-commutative80.0%
*-commutative80.0%
associate-+l+80.0%
+-commutative80.0%
+-commutative80.0%
+-commutative80.0%
Simplified80.0%
Taylor expanded in alpha around 0 82.9%
Taylor expanded in beta around 0 57.0%
*-commutative57.0%
Simplified57.0%
Taylor expanded in beta around inf 6.8%
Final simplification48.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ beta 2.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (beta + 2.0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.16666666666666666d0 / (beta + 2.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (beta + 2.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (beta + 2.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(beta + 2.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (beta + 2.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{\beta + 2}
\end{array}
Initial program 94.9%
associate-/l/93.2%
associate-/r*88.2%
+-commutative88.2%
associate-+r+88.2%
+-commutative88.2%
associate-+r+88.2%
associate-+r+88.2%
distribute-rgt1-in88.2%
+-commutative88.2%
*-commutative88.2%
distribute-rgt1-in88.2%
+-commutative88.2%
times-frac96.9%
Simplified96.9%
add-cube-cbrt96.0%
+-commutative96.0%
+-commutative96.0%
+-commutative96.0%
Applied egg-rr96.0%
add-cube-cbrt96.9%
clear-num96.9%
Applied egg-rr96.9%
Taylor expanded in beta around 0 73.1%
Taylor expanded in alpha around 0 48.6%
Final simplification48.6%
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 94.9%
associate-/l/93.2%
associate-+l+93.2%
+-commutative93.2%
*-commutative93.2%
associate-+l+93.2%
+-commutative93.2%
+-commutative93.2%
+-commutative93.2%
Simplified93.2%
Taylor expanded in alpha around 0 87.5%
Taylor expanded in beta around 0 64.7%
+-commutative64.7%
Simplified64.7%
Taylor expanded in alpha around 0 47.6%
Final simplification47.6%
herbie shell --seed 2023292
(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)))