
(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 13 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 (if (<= beta 5.1e+38) (/ (/ (+ beta 1.0) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.1e+38) {
tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + 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 <= 5.1d+38) then
tmp = ((beta + 1.0d0) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((1.0d0 + 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 <= 5.1e+38) {
tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.1e+38: tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.1e+38) 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(1.0 + 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 <= 5.1e+38)
tmp = ((beta + 1.0) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((1.0 + 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, 5.1e+38], 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[(1.0 + alpha), $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.1 \cdot 10^{+38}:\\
\;\;\;\;\frac{\frac{\beta + 1}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 5.1000000000000001e38Initial program 99.3%
associate-/l/99.3%
associate-+l+99.3%
+-commutative99.3%
associate-+r+99.3%
associate-+l+99.3%
distribute-rgt1-in99.3%
*-rgt-identity99.3%
distribute-lft-out99.3%
+-commutative99.3%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 69.8%
associate-*r/69.9%
+-commutative69.9%
*-commutative69.9%
Applied egg-rr69.9%
Taylor expanded in alpha around 0 69.9%
if 5.1000000000000001e38 < beta Initial program 86.1%
associate-/l/81.6%
associate-+l+81.6%
+-commutative81.6%
associate-+r+81.6%
associate-+l+81.6%
distribute-rgt1-in81.6%
*-rgt-identity81.6%
distribute-lft-out81.6%
+-commutative81.6%
associate-*r/93.3%
associate-*r/74.8%
Simplified74.8%
Taylor expanded in alpha around 0 67.0%
associate-*r/85.5%
+-commutative85.5%
*-commutative85.5%
Applied egg-rr85.5%
*-un-lft-identity85.5%
associate-+r+85.5%
metadata-eval85.5%
associate-*r/76.5%
+-commutative76.5%
metadata-eval76.5%
associate-+r+76.5%
Applied egg-rr76.5%
*-lft-identity76.5%
associate-/r*81.0%
associate-/l*89.4%
associate-+r+89.4%
+-commutative89.4%
+-commutative89.4%
Simplified89.4%
Taylor expanded in beta around inf 89.3%
Final simplification75.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (/ (/ (+ beta 1.0) (/ (+ (+ beta alpha) 2.0) (+ 1.0 alpha))) (+ beta 2.0)) (+ beta 3.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return (((beta + 1.0) / (((beta + alpha) + 2.0) / (1.0 + alpha))) / (beta + 2.0)) / (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 = (((beta + 1.0d0) / (((beta + alpha) + 2.0d0) / (1.0d0 + alpha))) / (beta + 2.0d0)) / (beta + 3.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return (((beta + 1.0) / (((beta + alpha) + 2.0) / (1.0 + alpha))) / (beta + 2.0)) / (beta + 3.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return (((beta + 1.0) / (((beta + alpha) + 2.0) / (1.0 + alpha))) / (beta + 2.0)) / (beta + 3.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(Float64(Float64(beta + 1.0) / Float64(Float64(Float64(beta + alpha) + 2.0) / Float64(1.0 + alpha))) / Float64(beta + 2.0)) / Float64(beta + 3.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = (((beta + 1.0) / (((beta + alpha) + 2.0) / (1.0 + alpha))) / (beta + 2.0)) / (beta + 3.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(N[(beta + alpha), $MachinePrecision] + 2.0), $MachinePrecision] / N[(1.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\frac{\frac{\beta + 1}{\frac{\left(\beta + \alpha\right) + 2}{1 + \alpha}}}{\beta + 2}}{\beta + 3}
\end{array}
Initial program 95.6%
associate-/l/94.3%
associate-+l+94.3%
+-commutative94.3%
associate-+r+94.3%
associate-+l+94.3%
distribute-rgt1-in94.3%
*-rgt-identity94.3%
distribute-lft-out94.3%
+-commutative94.3%
associate-*r/98.0%
associate-*r/92.8%
Simplified92.8%
Taylor expanded in alpha around 0 69.0%
associate-*r/74.3%
+-commutative74.3%
*-commutative74.3%
Applied egg-rr74.3%
*-un-lft-identity74.3%
associate-+r+74.3%
metadata-eval74.3%
associate-*r/71.7%
+-commutative71.7%
metadata-eval71.7%
associate-+r+71.7%
Applied egg-rr71.7%
*-lft-identity71.7%
associate-/r*73.0%
associate-/l*75.3%
associate-+r+75.3%
+-commutative75.3%
+-commutative75.3%
Simplified75.3%
Final simplification75.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.2e+15) (/ (+ beta 1.0) (* (+ beta 2.0) (+ (* beta (+ beta 5.0)) 6.0))) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.2e+15) {
tmp = (beta + 1.0) / ((beta + 2.0) * ((beta * (beta + 5.0)) + 6.0));
} else {
tmp = ((1.0 + 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.2d+15) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * ((beta * (beta + 5.0d0)) + 6.0d0))
else
tmp = ((1.0d0 + 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.2e+15) {
tmp = (beta + 1.0) / ((beta + 2.0) * ((beta * (beta + 5.0)) + 6.0));
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.2e+15: tmp = (beta + 1.0) / ((beta + 2.0) * ((beta * (beta + 5.0)) + 6.0)) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.2e+15) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(Float64(beta * Float64(beta + 5.0)) + 6.0))); else tmp = Float64(Float64(Float64(1.0 + 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.2e+15)
tmp = (beta + 1.0) / ((beta + 2.0) * ((beta * (beta + 5.0)) + 6.0));
else
tmp = ((1.0 + 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.2e+15], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(N[(beta * N[(beta + 5.0), $MachinePrecision]), $MachinePrecision] + 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $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 7.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(\beta \cdot \left(\beta + 5\right) + 6\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 7.2e15Initial program 99.8%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.3%
Taylor expanded in beta around 0 70.3%
+-commutative70.3%
unpow270.3%
distribute-rgt-out70.3%
Simplified70.3%
Taylor expanded in alpha around 0 70.4%
if 7.2e15 < beta Initial program 86.0%
associate-/l/81.9%
associate-+l+81.9%
+-commutative81.9%
associate-+r+81.9%
associate-+l+81.9%
distribute-rgt1-in81.9%
*-rgt-identity81.9%
distribute-lft-out81.9%
+-commutative81.9%
associate-*r/93.9%
associate-*r/77.0%
Simplified77.0%
Taylor expanded in alpha around 0 66.2%
associate-*r/83.1%
+-commutative83.1%
*-commutative83.1%
Applied egg-rr83.1%
*-un-lft-identity83.1%
associate-+r+83.1%
metadata-eval83.1%
associate-*r/74.9%
+-commutative74.9%
metadata-eval74.9%
associate-+r+74.9%
Applied egg-rr74.9%
*-lft-identity74.9%
associate-/r*78.9%
associate-/l*86.6%
associate-+r+86.6%
+-commutative86.6%
+-commutative86.6%
Simplified86.6%
Taylor expanded in beta around inf 86.5%
Final simplification75.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.3) (/ (/ (+ 0.5 (* alpha 0.5)) (+ alpha 2.0)) (+ beta 3.0)) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.3) {
tmp = ((0.5 + (alpha * 0.5)) / (alpha + 2.0)) / (beta + 3.0);
} else {
tmp = ((1.0 + 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 <= 4.3d0) then
tmp = ((0.5d0 + (alpha * 0.5d0)) / (alpha + 2.0d0)) / (beta + 3.0d0)
else
tmp = ((1.0d0 + 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 <= 4.3) {
tmp = ((0.5 + (alpha * 0.5)) / (alpha + 2.0)) / (beta + 3.0);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.3: tmp = ((0.5 + (alpha * 0.5)) / (alpha + 2.0)) / (beta + 3.0) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.3) tmp = Float64(Float64(Float64(0.5 + Float64(alpha * 0.5)) / Float64(alpha + 2.0)) / Float64(beta + 3.0)); else tmp = Float64(Float64(Float64(1.0 + 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 <= 4.3)
tmp = ((0.5 + (alpha * 0.5)) / (alpha + 2.0)) / (beta + 3.0);
else
tmp = ((1.0 + 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, 4.3], N[(N[(N[(0.5 + N[(alpha * 0.5), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $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 4.3:\\
\;\;\;\;\frac{\frac{0.5 + \alpha \cdot 0.5}{\alpha + 2}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 4.29999999999999982Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
*-un-lft-identity70.1%
associate-+r+70.1%
metadata-eval70.1%
associate-*r/70.1%
+-commutative70.1%
metadata-eval70.1%
associate-+r+70.1%
Applied egg-rr70.1%
*-lft-identity70.1%
associate-/r*70.1%
associate-/l*70.1%
associate-+r+70.1%
+-commutative70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in beta around 0 69.2%
associate-*r/69.2%
distribute-lft-in69.2%
metadata-eval69.2%
+-commutative69.2%
Simplified69.2%
if 4.29999999999999982 < beta Initial program 86.2%
associate-/l/82.2%
associate-+l+82.2%
+-commutative82.2%
associate-+r+82.2%
associate-+l+82.2%
distribute-rgt1-in82.2%
*-rgt-identity82.2%
distribute-lft-out82.2%
+-commutative82.2%
associate-*r/94.0%
associate-*r/77.3%
Simplified77.3%
Taylor expanded in alpha around 0 66.6%
associate-*r/83.3%
+-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
*-un-lft-identity83.3%
associate-+r+83.3%
metadata-eval83.3%
associate-*r/75.2%
+-commutative75.2%
metadata-eval75.2%
associate-+r+75.2%
Applied egg-rr75.2%
*-lft-identity75.2%
associate-/r*79.2%
associate-/l*86.7%
associate-+r+86.7%
+-commutative86.7%
+-commutative86.7%
Simplified86.7%
Taylor expanded in beta around inf 86.6%
Final simplification74.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.65) (* 0.16666666666666666 (/ (+ 1.0 alpha) (+ alpha 2.0))) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.65) {
tmp = 0.16666666666666666 * ((1.0 + alpha) / (alpha + 2.0));
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.65d0) then
tmp = 0.16666666666666666d0 * ((1.0d0 + alpha) / (alpha + 2.0d0))
else
tmp = (1.0d0 + alpha) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.65) {
tmp = 0.16666666666666666 * ((1.0 + alpha) / (alpha + 2.0));
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.65: tmp = 0.16666666666666666 * ((1.0 + alpha) / (alpha + 2.0)) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.65) tmp = Float64(0.16666666666666666 * Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0))); else tmp = Float64(Float64(1.0 + alpha) / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.65)
tmp = 0.16666666666666666 * ((1.0 + alpha) / (alpha + 2.0));
else
tmp = (1.0 + alpha) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.65], N[(0.16666666666666666 * N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $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 3.65:\\
\;\;\;\;0.16666666666666666 \cdot \frac{1 + \alpha}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.64999999999999991Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
Taylor expanded in beta around 0 68.2%
if 3.64999999999999991 < beta Initial program 86.2%
associate-/l/82.2%
associate-+l+82.2%
+-commutative82.2%
associate-+r+82.2%
associate-+l+82.2%
distribute-rgt1-in82.2%
*-rgt-identity82.2%
distribute-lft-out82.2%
+-commutative82.2%
associate-*r/94.0%
associate-*r/77.3%
Simplified77.3%
Taylor expanded in alpha around 0 66.6%
associate-*r/83.3%
+-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in beta around inf 83.1%
unpow283.1%
Simplified83.1%
Final simplification72.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.65) (/ (* (+ 1.0 alpha) 0.16666666666666666) (+ alpha 2.0)) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.65) {
tmp = ((1.0 + alpha) * 0.16666666666666666) / (alpha + 2.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.65d0) then
tmp = ((1.0d0 + alpha) * 0.16666666666666666d0) / (alpha + 2.0d0)
else
tmp = (1.0d0 + alpha) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.65) {
tmp = ((1.0 + alpha) * 0.16666666666666666) / (alpha + 2.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.65: tmp = ((1.0 + alpha) * 0.16666666666666666) / (alpha + 2.0) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.65) tmp = Float64(Float64(Float64(1.0 + alpha) * 0.16666666666666666) / Float64(alpha + 2.0)); else tmp = Float64(Float64(1.0 + alpha) / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.65)
tmp = ((1.0 + alpha) * 0.16666666666666666) / (alpha + 2.0);
else
tmp = (1.0 + alpha) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.65], N[(N[(N[(1.0 + alpha), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.65:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot 0.16666666666666666}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.64999999999999991Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
Taylor expanded in beta around 0 68.2%
associate-*r/68.2%
Simplified68.2%
if 3.64999999999999991 < beta Initial program 86.2%
associate-/l/82.2%
associate-+l+82.2%
+-commutative82.2%
associate-+r+82.2%
associate-+l+82.2%
distribute-rgt1-in82.2%
*-rgt-identity82.2%
distribute-lft-out82.2%
+-commutative82.2%
associate-*r/94.0%
associate-*r/77.3%
Simplified77.3%
Taylor expanded in alpha around 0 66.6%
associate-*r/83.3%
+-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in beta around inf 83.1%
unpow283.1%
Simplified83.1%
Final simplification72.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.6) (/ (+ 0.16666666666666666 (* alpha 0.16666666666666666)) (+ alpha 2.0)) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.6) {
tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.6d0) then
tmp = (0.16666666666666666d0 + (alpha * 0.16666666666666666d0)) / (alpha + 2.0d0)
else
tmp = (1.0d0 + alpha) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.6) {
tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.6: tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.6) tmp = Float64(Float64(0.16666666666666666 + Float64(alpha * 0.16666666666666666)) / Float64(alpha + 2.0)); else tmp = Float64(Float64(1.0 + alpha) / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.6)
tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0);
else
tmp = (1.0 + alpha) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.6], N[(N[(0.16666666666666666 + N[(alpha * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.6:\\
\;\;\;\;\frac{0.16666666666666666 + \alpha \cdot 0.16666666666666666}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.60000000000000009Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
*-un-lft-identity70.1%
associate-+r+70.1%
metadata-eval70.1%
associate-*r/70.1%
+-commutative70.1%
metadata-eval70.1%
associate-+r+70.1%
Applied egg-rr70.1%
*-lft-identity70.1%
associate-/r*70.1%
associate-/l*70.1%
associate-+r+70.1%
+-commutative70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in beta around 0 68.2%
associate-*r/68.2%
distribute-lft-in68.2%
metadata-eval68.2%
+-commutative68.2%
Simplified68.2%
if 3.60000000000000009 < beta Initial program 86.2%
associate-/l/82.2%
associate-+l+82.2%
+-commutative82.2%
associate-+r+82.2%
associate-+l+82.2%
distribute-rgt1-in82.2%
*-rgt-identity82.2%
distribute-lft-out82.2%
+-commutative82.2%
associate-*r/94.0%
associate-*r/77.3%
Simplified77.3%
Taylor expanded in alpha around 0 66.6%
associate-*r/83.3%
+-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in beta around inf 83.1%
unpow283.1%
Simplified83.1%
Final simplification72.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.3) (/ (+ 0.16666666666666666 (* alpha 0.16666666666666666)) (+ alpha 2.0)) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0);
} else {
tmp = ((1.0 + 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 <= 2.3d0) then
tmp = (0.16666666666666666d0 + (alpha * 0.16666666666666666d0)) / (alpha + 2.0d0)
else
tmp = ((1.0d0 + 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 <= 2.3) {
tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.3: tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.3) tmp = Float64(Float64(0.16666666666666666 + Float64(alpha * 0.16666666666666666)) / Float64(alpha + 2.0)); else tmp = Float64(Float64(Float64(1.0 + 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 <= 2.3)
tmp = (0.16666666666666666 + (alpha * 0.16666666666666666)) / (alpha + 2.0);
else
tmp = ((1.0 + 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, 2.3], N[(N[(0.16666666666666666 + N[(alpha * 0.16666666666666666), $MachinePrecision]), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $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 2.3:\\
\;\;\;\;\frac{0.16666666666666666 + \alpha \cdot 0.16666666666666666}{\alpha + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 2.2999999999999998Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
*-un-lft-identity70.1%
associate-+r+70.1%
metadata-eval70.1%
associate-*r/70.1%
+-commutative70.1%
metadata-eval70.1%
associate-+r+70.1%
Applied egg-rr70.1%
*-lft-identity70.1%
associate-/r*70.1%
associate-/l*70.1%
associate-+r+70.1%
+-commutative70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in beta around 0 68.2%
associate-*r/68.2%
distribute-lft-in68.2%
metadata-eval68.2%
+-commutative68.2%
Simplified68.2%
if 2.2999999999999998 < beta Initial program 86.2%
associate-/l/82.2%
associate-+l+82.2%
+-commutative82.2%
associate-+r+82.2%
associate-+l+82.2%
distribute-rgt1-in82.2%
*-rgt-identity82.2%
distribute-lft-out82.2%
+-commutative82.2%
associate-*r/94.0%
associate-*r/77.3%
Simplified77.3%
Taylor expanded in alpha around 0 66.6%
associate-*r/83.3%
+-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
*-un-lft-identity83.3%
associate-+r+83.3%
metadata-eval83.3%
associate-*r/75.2%
+-commutative75.2%
metadata-eval75.2%
associate-+r+75.2%
Applied egg-rr75.2%
*-lft-identity75.2%
associate-/r*79.2%
associate-/l*86.7%
associate-+r+86.7%
+-commutative86.7%
+-commutative86.7%
Simplified86.7%
Taylor expanded in beta around inf 86.6%
Final simplification73.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.4) (* (+ 1.0 alpha) 0.16666666666666666) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.4d0) then
tmp = (1.0d0 + alpha) * 0.16666666666666666d0
else
tmp = (1.0d0 + alpha) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.4: tmp = (1.0 + alpha) * 0.16666666666666666 else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.4) tmp = Float64(Float64(1.0 + alpha) * 0.16666666666666666); 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 <= 2.4)
tmp = (1.0 + alpha) * 0.16666666666666666;
else
tmp = (1.0 + alpha) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.4], N[(N[(1.0 + alpha), $MachinePrecision] * 0.16666666666666666), $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 2.4:\\
\;\;\;\;\left(1 + \alpha\right) \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 2.39999999999999991Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
Taylor expanded in beta around inf 14.1%
Taylor expanded in beta around 0 14.1%
if 2.39999999999999991 < beta Initial program 86.2%
associate-/l/82.2%
associate-+l+82.2%
+-commutative82.2%
associate-+r+82.2%
associate-+l+82.2%
distribute-rgt1-in82.2%
*-rgt-identity82.2%
distribute-lft-out82.2%
+-commutative82.2%
associate-*r/94.0%
associate-*r/77.3%
Simplified77.3%
Taylor expanded in alpha around 0 66.6%
associate-*r/83.3%
+-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in beta around inf 83.1%
unpow283.1%
Simplified83.1%
Final simplification35.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 0.49) (* (+ 1.0 alpha) 0.16666666666666666) (/ 0.08333333333333333 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 0.49) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = 0.08333333333333333 / 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 <= 0.49d0) then
tmp = (1.0d0 + alpha) * 0.16666666666666666d0
else
tmp = 0.08333333333333333d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 0.49) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = 0.08333333333333333 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 0.49: tmp = (1.0 + alpha) * 0.16666666666666666 else: tmp = 0.08333333333333333 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 0.49) tmp = Float64(Float64(1.0 + alpha) * 0.16666666666666666); else tmp = Float64(0.08333333333333333 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 0.49)
tmp = (1.0 + alpha) * 0.16666666666666666;
else
tmp = 0.08333333333333333 / 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, 0.49], N[(N[(1.0 + alpha), $MachinePrecision] * 0.16666666666666666), $MachinePrecision], N[(0.08333333333333333 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 0.49:\\
\;\;\;\;\left(1 + \alpha\right) \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{0.08333333333333333}{\beta}\\
\end{array}
\end{array}
if beta < 0.48999999999999999Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
Taylor expanded in beta around inf 14.1%
Taylor expanded in beta around 0 14.1%
if 0.48999999999999999 < beta Initial program 86.2%
associate-/l/82.1%
associate-/l/61.3%
associate-+l+61.3%
+-commutative61.3%
associate-+r+61.3%
associate-+l+61.3%
distribute-rgt1-in61.3%
*-rgt-identity61.3%
distribute-lft-out61.3%
+-commutative61.3%
times-frac94.0%
Simplified94.0%
Taylor expanded in beta around -inf 87.1%
unpow287.1%
associate-*r*87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in beta around 0 20.9%
associate-*r/20.9%
associate-*r*20.9%
times-frac17.5%
+-commutative17.5%
Simplified17.5%
Taylor expanded in alpha around 0 6.6%
Final simplification11.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.8e+113) (* (+ 1.0 alpha) 0.16666666666666666) (/ 0.5 (* beta alpha))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.8e+113) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = 0.5 / (beta * alpha);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.8d+113) then
tmp = (1.0d0 + alpha) * 0.16666666666666666d0
else
tmp = 0.5d0 / (beta * alpha)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.8e+113) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = 0.5 / (beta * alpha);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.8e+113: tmp = (1.0 + alpha) * 0.16666666666666666 else: tmp = 0.5 / (beta * alpha) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.8e+113) tmp = Float64(Float64(1.0 + alpha) * 0.16666666666666666); else tmp = Float64(0.5 / Float64(beta * alpha)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.8e+113)
tmp = (1.0 + alpha) * 0.16666666666666666;
else
tmp = 0.5 / (beta * alpha);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.8e+113], N[(N[(1.0 + alpha), $MachinePrecision] * 0.16666666666666666), $MachinePrecision], N[(0.5 / N[(beta * alpha), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.8 \cdot 10^{+113}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{\beta \cdot \alpha}\\
\end{array}
\end{array}
if beta < 4.79999999999999966e113Initial program 99.3%
associate-/l/99.3%
associate-+l+99.3%
+-commutative99.3%
associate-+r+99.3%
associate-+l+99.3%
distribute-rgt1-in99.3%
*-rgt-identity99.3%
distribute-lft-out99.3%
+-commutative99.3%
associate-*r/99.8%
associate-*r/98.1%
Simplified98.1%
Taylor expanded in alpha around 0 69.9%
associate-*r/71.5%
+-commutative71.5%
*-commutative71.5%
Applied egg-rr71.5%
Taylor expanded in beta around inf 23.3%
Taylor expanded in beta around 0 12.8%
if 4.79999999999999966e113 < beta Initial program 80.5%
associate-/l/74.3%
associate-/l/52.7%
associate-+l+52.7%
+-commutative52.7%
associate-+r+52.7%
associate-+l+52.7%
distribute-rgt1-in52.7%
*-rgt-identity52.7%
distribute-lft-out52.7%
+-commutative52.7%
times-frac90.9%
Simplified90.9%
Taylor expanded in beta around -inf 89.1%
unpow289.1%
associate-*r*89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in beta around 0 21.4%
associate-*r/21.4%
associate-*r*21.4%
times-frac21.5%
+-commutative21.5%
Simplified21.5%
Taylor expanded in alpha around inf 19.6%
Final simplification14.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.3) (* (+ 1.0 alpha) 0.16666666666666666) (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} 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 <= 2.3d0) then
tmp = (1.0d0 + alpha) * 0.16666666666666666d0
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 <= 2.3) {
tmp = (1.0 + alpha) * 0.16666666666666666;
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.3: tmp = (1.0 + alpha) * 0.16666666666666666 else: tmp = 1.0 / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.3) tmp = Float64(Float64(1.0 + alpha) * 0.16666666666666666); 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 <= 2.3)
tmp = (1.0 + alpha) * 0.16666666666666666;
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, 2.3], N[(N[(1.0 + alpha), $MachinePrecision] * 0.16666666666666666), $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 2.3:\\
\;\;\;\;\left(1 + \alpha\right) \cdot 0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 2.2999999999999998Initial program 99.9%
associate-/l/99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+l+99.8%
distribute-rgt1-in99.8%
*-rgt-identity99.8%
distribute-lft-out99.8%
+-commutative99.8%
associate-*r/99.8%
associate-*r/99.8%
Simplified99.8%
Taylor expanded in alpha around 0 70.1%
associate-*r/70.1%
+-commutative70.1%
*-commutative70.1%
Applied egg-rr70.1%
Taylor expanded in beta around inf 14.1%
Taylor expanded in beta around 0 14.1%
if 2.2999999999999998 < beta Initial program 86.2%
associate-/l/82.2%
associate-/r*61.3%
associate-+l+61.3%
+-commutative61.3%
associate-+r+61.3%
associate-+l+61.3%
distribute-rgt1-in61.3%
*-rgt-identity61.3%
distribute-lft-out61.3%
*-commutative61.3%
metadata-eval61.3%
associate-+l+61.3%
+-commutative61.3%
Simplified61.3%
Taylor expanded in beta around inf 56.5%
Taylor expanded in alpha around 0 66.6%
Taylor expanded in beta around inf 79.7%
unpow279.7%
Simplified79.7%
Final simplification34.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.08333333333333333 beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.08333333333333333 / 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.08333333333333333d0 / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.08333333333333333 / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.08333333333333333 / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.08333333333333333 / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.08333333333333333 / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.08333333333333333 / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.08333333333333333}{\beta}
\end{array}
Initial program 95.6%
associate-/l/94.3%
associate-/l/83.1%
associate-+l+83.1%
+-commutative83.1%
associate-+r+83.1%
associate-+l+83.1%
distribute-rgt1-in83.1%
*-rgt-identity83.1%
distribute-lft-out83.1%
+-commutative83.1%
times-frac98.0%
Simplified98.0%
Taylor expanded in beta around -inf 29.3%
unpow229.3%
associate-*r*29.3%
*-commutative29.3%
Simplified29.3%
Taylor expanded in beta around 0 16.9%
associate-*r/16.9%
associate-*r*13.5%
times-frac7.6%
+-commutative7.6%
Simplified7.6%
Taylor expanded in alpha around 0 4.0%
Final simplification4.0%
herbie shell --seed 2023255
(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)))