
(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 (+ beta (+ alpha 2.0))))
(/
(/ (* (+ beta 1.0) (/ (+ 1.0 alpha) t_0)) t_0)
(+ 1.0 (+ 2.0 (+ beta alpha))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = beta + (alpha + 2.0);
return (((beta + 1.0) * ((1.0 + alpha) / t_0)) / t_0) / (1.0 + (2.0 + (beta + alpha)));
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = beta + (alpha + 2.0d0)
code = (((beta + 1.0d0) * ((1.0d0 + alpha) / t_0)) / t_0) / (1.0d0 + (2.0d0 + (beta + alpha)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = beta + (alpha + 2.0);
return (((beta + 1.0) * ((1.0 + alpha) / t_0)) / t_0) / (1.0 + (2.0 + (beta + alpha)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = beta + (alpha + 2.0) return (((beta + 1.0) * ((1.0 + alpha) / t_0)) / t_0) / (1.0 + (2.0 + (beta + alpha)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(beta + Float64(alpha + 2.0)) return Float64(Float64(Float64(Float64(beta + 1.0) * Float64(Float64(1.0 + alpha) / t_0)) / t_0) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = beta + (alpha + 2.0);
tmp = (((beta + 1.0) * ((1.0 + alpha) / t_0)) / t_0) / (1.0 + (2.0 + (beta + alpha)));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(beta + 1.0), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \beta + \left(\alpha + 2\right)\\
\frac{\frac{\left(\beta + 1\right) \cdot \frac{1 + \alpha}{t_0}}{t_0}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}
\end{array}
\end{array}
Initial program 96.4%
div-inv96.4%
+-commutative96.4%
associate-+l+96.4%
*-commutative96.4%
metadata-eval96.4%
+-commutative96.4%
metadata-eval96.4%
+-commutative96.4%
Applied egg-rr96.4%
associate-*l/96.4%
associate-*r/96.4%
associate-+r+96.4%
*-rgt-identity96.4%
+-commutative96.4%
distribute-rgt1-in96.4%
distribute-lft-in96.4%
*-rgt-identity96.4%
+-commutative96.4%
+-commutative96.4%
*-commutative96.4%
+-commutative96.4%
+-commutative96.4%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 4e+68)
(* (+ 1.0 alpha) (/ (/ (+ beta 1.0) t_0) (* (+ beta 3.0) (+ beta 2.0))))
(* (/ (/ (+ 1.0 alpha) t_0) t_0) (- 1.0 (/ (+ alpha 2.0) beta))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 4e+68) {
tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0)));
} else {
tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 - ((alpha + 2.0) / beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 4d+68) then
tmp = (1.0d0 + alpha) * (((beta + 1.0d0) / t_0) / ((beta + 3.0d0) * (beta + 2.0d0)))
else
tmp = (((1.0d0 + alpha) / t_0) / t_0) * (1.0d0 - ((alpha + 2.0d0) / 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 <= 4e+68) {
tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0)));
} else {
tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 - ((alpha + 2.0) / beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 4e+68: tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0))) else: tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 - ((alpha + 2.0) / 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 <= 4e+68) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(beta + 1.0) / t_0) / Float64(Float64(beta + 3.0) * Float64(beta + 2.0)))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0) * Float64(1.0 - Float64(Float64(alpha + 2.0) / 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 <= 4e+68)
tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0)));
else
tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 - ((alpha + 2.0) / beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 4e+68], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(beta + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(N[(beta + 3.0), $MachinePrecision] * N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 - N[(N[(alpha + 2.0), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 4 \cdot 10^{+68}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{\beta + 1}{t_0}}{\left(\beta + 3\right) \cdot \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0}}{t_0} \cdot \left(1 - \frac{\alpha + 2}{\beta}\right)\\
\end{array}
\end{array}
if beta < 3.99999999999999981e68Initial program 99.8%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/96.0%
Simplified96.0%
Taylor expanded in alpha around 0 73.3%
if 3.99999999999999981e68 < beta Initial program 83.7%
div-inv83.7%
+-commutative83.7%
associate-+l+83.7%
*-commutative83.7%
metadata-eval83.7%
+-commutative83.7%
metadata-eval83.7%
+-commutative83.7%
Applied egg-rr83.7%
associate-*l/83.7%
associate-*r/83.7%
associate-+r+83.7%
*-rgt-identity83.7%
+-commutative83.7%
distribute-rgt1-in83.7%
distribute-lft-in83.7%
*-rgt-identity83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
+-commutative83.7%
+-commutative83.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
Simplified99.8%
*-un-lft-identity99.8%
associate-/l/86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r+86.3%
metadata-eval86.3%
associate-+l+86.3%
+-commutative86.3%
metadata-eval86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r+86.3%
Applied egg-rr86.3%
*-lft-identity86.3%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 88.8%
mul-1-neg88.8%
unsub-neg88.8%
Simplified88.8%
Final simplification76.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ beta (+ alpha 2.0)))) (* (/ (+ 1.0 alpha) t_0) (/ (/ (+ beta 1.0) t_0) (+ alpha (+ beta 3.0))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = beta + (alpha + 2.0);
return ((1.0 + alpha) / t_0) * (((beta + 1.0) / t_0) / (alpha + (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
real(8) :: t_0
t_0 = beta + (alpha + 2.0d0)
code = ((1.0d0 + alpha) / t_0) * (((beta + 1.0d0) / t_0) / (alpha + (beta + 3.0d0)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = beta + (alpha + 2.0);
return ((1.0 + alpha) / t_0) * (((beta + 1.0) / t_0) / (alpha + (beta + 3.0)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = beta + (alpha + 2.0) return ((1.0 + alpha) / t_0) * (((beta + 1.0) / t_0) / (alpha + (beta + 3.0)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(beta + Float64(alpha + 2.0)) return Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(Float64(Float64(beta + 1.0) / t_0) / Float64(alpha + Float64(beta + 3.0)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = beta + (alpha + 2.0);
tmp = ((1.0 + alpha) / t_0) * (((beta + 1.0) / t_0) / (alpha + (beta + 3.0)));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(N[(beta + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \beta + \left(\alpha + 2\right)\\
\frac{1 + \alpha}{t_0} \cdot \frac{\frac{\beta + 1}{t_0}}{\alpha + \left(\beta + 3\right)}
\end{array}
\end{array}
Initial program 96.4%
associate-/l/94.9%
associate-+l+94.9%
+-commutative94.9%
associate-+r+94.9%
associate-+l+94.9%
distribute-rgt1-in94.9%
*-rgt-identity94.9%
distribute-lft-out94.9%
+-commutative94.9%
associate-*l/97.0%
*-commutative97.0%
associate-*r/93.2%
Simplified93.2%
associate-*r/97.0%
+-commutative97.0%
associate-+r+97.0%
+-commutative97.0%
associate-+r+97.0%
+-commutative97.0%
Applied egg-rr97.0%
times-frac99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ alpha (+ beta 2.0)))) (* (/ (+ beta 1.0) (+ (+ beta alpha) 3.0)) (/ (/ (+ 1.0 alpha) t_0) t_0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return ((beta + 1.0) / ((beta + alpha) + 3.0)) * (((1.0 + alpha) / t_0) / t_0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = alpha + (beta + 2.0d0)
code = ((beta + 1.0d0) / ((beta + alpha) + 3.0d0)) * (((1.0d0 + alpha) / t_0) / t_0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return ((beta + 1.0) / ((beta + alpha) + 3.0)) * (((1.0 + alpha) / t_0) / t_0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return ((beta + 1.0) / ((beta + alpha) + 3.0)) * (((1.0 + alpha) / t_0) / t_0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) return Float64(Float64(Float64(beta + 1.0) / Float64(Float64(beta + alpha) + 3.0)) * Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = ((beta + 1.0) / ((beta + alpha) + 3.0)) * (((1.0 + alpha) / t_0) / t_0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + alpha), $MachinePrecision] + 3.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\frac{\beta + 1}{\left(\beta + \alpha\right) + 3} \cdot \frac{\frac{1 + \alpha}{t_0}}{t_0}
\end{array}
\end{array}
Initial program 96.4%
div-inv96.4%
+-commutative96.4%
associate-+l+96.4%
*-commutative96.4%
metadata-eval96.4%
+-commutative96.4%
metadata-eval96.4%
+-commutative96.4%
Applied egg-rr96.4%
associate-*l/96.4%
associate-*r/96.4%
associate-+r+96.4%
*-rgt-identity96.4%
+-commutative96.4%
distribute-rgt1-in96.4%
distribute-lft-in96.4%
*-rgt-identity96.4%
+-commutative96.4%
+-commutative96.4%
*-commutative96.4%
+-commutative96.4%
+-commutative96.4%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
Simplified99.8%
*-un-lft-identity99.8%
associate-/l/97.0%
associate-+l+97.0%
+-commutative97.0%
associate-+r+97.0%
metadata-eval97.0%
associate-+l+97.0%
+-commutative97.0%
metadata-eval97.0%
associate-+l+97.0%
+-commutative97.0%
associate-+r+97.0%
Applied egg-rr97.0%
*-lft-identity97.0%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 2e+68)
(* (+ 1.0 alpha) (/ (/ (+ beta 1.0) t_0) (* (+ beta 3.0) (+ beta 2.0))))
(* (- 1.0 (/ (+ alpha 2.0) beta)) (/ (/ (+ 1.0 alpha) beta) t_0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 2e+68) {
tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0)));
} else {
tmp = (1.0 - ((alpha + 2.0) / beta)) * (((1.0 + alpha) / beta) / t_0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 2d+68) then
tmp = (1.0d0 + alpha) * (((beta + 1.0d0) / t_0) / ((beta + 3.0d0) * (beta + 2.0d0)))
else
tmp = (1.0d0 - ((alpha + 2.0d0) / beta)) * (((1.0d0 + alpha) / beta) / t_0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 2e+68) {
tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0)));
} else {
tmp = (1.0 - ((alpha + 2.0) / beta)) * (((1.0 + alpha) / beta) / t_0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 2e+68: tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0))) else: tmp = (1.0 - ((alpha + 2.0) / beta)) * (((1.0 + alpha) / beta) / t_0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 2e+68) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(beta + 1.0) / t_0) / Float64(Float64(beta + 3.0) * Float64(beta + 2.0)))); else tmp = Float64(Float64(1.0 - Float64(Float64(alpha + 2.0) / beta)) * Float64(Float64(Float64(1.0 + alpha) / beta) / t_0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 2e+68)
tmp = (1.0 + alpha) * (((beta + 1.0) / t_0) / ((beta + 3.0) * (beta + 2.0)));
else
tmp = (1.0 - ((alpha + 2.0) / beta)) * (((1.0 + alpha) / beta) / t_0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 2e+68], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(beta + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(N[(beta + 3.0), $MachinePrecision] * N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(alpha + 2.0), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 2 \cdot 10^{+68}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{\beta + 1}{t_0}}{\left(\beta + 3\right) \cdot \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \frac{\alpha + 2}{\beta}\right) \cdot \frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 1.99999999999999991e68Initial program 99.8%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/96.0%
Simplified96.0%
Taylor expanded in alpha around 0 73.3%
if 1.99999999999999991e68 < beta Initial program 83.7%
div-inv83.7%
+-commutative83.7%
associate-+l+83.7%
*-commutative83.7%
metadata-eval83.7%
+-commutative83.7%
metadata-eval83.7%
+-commutative83.7%
Applied egg-rr83.7%
associate-*l/83.7%
associate-*r/83.7%
associate-+r+83.7%
*-rgt-identity83.7%
+-commutative83.7%
distribute-rgt1-in83.7%
distribute-lft-in83.7%
*-rgt-identity83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
+-commutative83.7%
+-commutative83.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
Simplified99.8%
*-un-lft-identity99.8%
associate-/l/86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r+86.3%
metadata-eval86.3%
associate-+l+86.3%
+-commutative86.3%
metadata-eval86.3%
associate-+l+86.3%
+-commutative86.3%
associate-+r+86.3%
Applied egg-rr86.3%
*-lft-identity86.3%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 88.8%
mul-1-neg88.8%
unsub-neg88.8%
Simplified88.8%
Taylor expanded in beta around inf 87.4%
Final simplification76.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 2.3)
(/ (+ beta 1.0) (* (+ beta 2.0) (+ 6.0 (* beta 5.0))))
(/
(/ (+ 1.0 alpha) (+ beta (+ alpha 2.0)))
(+ 1.0 (+ 2.0 (+ beta alpha))))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.3d0) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * (6.0d0 + (beta * 5.0d0)))
else
tmp = ((1.0d0 + alpha) / (beta + (alpha + 2.0d0))) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.3: tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0))) else: tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.3) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * 5.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(beta + Float64(alpha + 2.0))) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.3)
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
else
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.3], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.3:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot 5\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta + \left(\alpha + 2\right)}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 2.2999999999999998Initial program 99.9%
associate-/l/99.9%
associate-/r*95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+r+95.1%
associate-+l+95.1%
distribute-rgt1-in95.1%
*-rgt-identity95.1%
distribute-lft-out95.1%
*-commutative95.1%
metadata-eval95.1%
associate-+l+95.1%
+-commutative95.1%
Simplified95.1%
Taylor expanded in beta around 0 94.9%
Taylor expanded in alpha around 0 72.5%
if 2.2999999999999998 < beta Initial program 86.5%
div-inv86.5%
+-commutative86.5%
associate-+l+86.5%
*-commutative86.5%
metadata-eval86.5%
+-commutative86.5%
metadata-eval86.5%
+-commutative86.5%
Applied egg-rr86.5%
associate-*l/86.6%
associate-*r/86.5%
associate-+r+86.5%
*-rgt-identity86.5%
+-commutative86.5%
distribute-rgt1-in86.5%
distribute-lft-in86.5%
*-rgt-identity86.5%
+-commutative86.5%
+-commutative86.5%
*-commutative86.5%
+-commutative86.5%
+-commutative86.5%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
Simplified99.7%
Taylor expanded in beta around inf 85.7%
Final simplification75.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.3) (/ (+ beta 1.0) (* (+ beta 2.0) (+ 6.0 (* beta 5.0)))) (/ (/ (+ 1.0 alpha) (+ alpha (+ beta 3.0))) (+ alpha (+ beta 2.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / (alpha + (beta + 2.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.3d0) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * (6.0d0 + (beta * 5.0d0)))
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 3.0d0))) / (alpha + (beta + 2.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.3) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / (alpha + (beta + 2.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.3: tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0))) else: tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / (alpha + (beta + 2.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.3) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * 5.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 3.0))) / Float64(alpha + Float64(beta + 2.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.3)
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
else
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / (alpha + (beta + 2.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.3], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.3:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot 5\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + \left(\beta + 3\right)}}{\alpha + \left(\beta + 2\right)}\\
\end{array}
\end{array}
if beta < 2.2999999999999998Initial program 99.9%
associate-/l/99.9%
associate-/r*95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+r+95.1%
associate-+l+95.1%
distribute-rgt1-in95.1%
*-rgt-identity95.1%
distribute-lft-out95.1%
*-commutative95.1%
metadata-eval95.1%
associate-+l+95.1%
+-commutative95.1%
Simplified95.1%
Taylor expanded in beta around 0 94.9%
Taylor expanded in alpha around 0 72.5%
if 2.2999999999999998 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in beta around inf 83.0%
un-div-inv83.0%
+-commutative83.0%
associate-+r+83.0%
+-commutative83.0%
*-commutative83.0%
+-commutative83.0%
+-commutative83.0%
associate-+r+83.0%
+-commutative83.0%
associate-+l+83.0%
Applied egg-rr83.0%
associate-/r*85.7%
associate-+r+85.7%
+-commutative85.7%
+-commutative85.7%
Simplified85.7%
Final simplification75.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5e+29) (/ 1.0 (* (+ beta 3.0) (+ beta 2.0))) (* (/ (+ 1.0 alpha) (+ beta (+ alpha 2.0))) (/ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5e+29) {
tmp = 1.0 / ((beta + 3.0) * (beta + 2.0));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5d+29) then
tmp = 1.0d0 / ((beta + 3.0d0) * (beta + 2.0d0))
else
tmp = ((1.0d0 + alpha) / (beta + (alpha + 2.0d0))) * (1.0d0 / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5e+29) {
tmp = 1.0 / ((beta + 3.0) * (beta + 2.0));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5e+29: tmp = 1.0 / ((beta + 3.0) * (beta + 2.0)) else: tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5e+29) tmp = Float64(1.0 / Float64(Float64(beta + 3.0) * Float64(beta + 2.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(beta + Float64(alpha + 2.0))) * Float64(1.0 / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5e+29)
tmp = 1.0 / ((beta + 3.0) * (beta + 2.0));
else
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5e+29], N[(1.0 / N[(N[(beta + 3.0), $MachinePrecision] * N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5 \cdot 10^{+29}:\\
\;\;\;\;\frac{1}{\left(\beta + 3\right) \cdot \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta + \left(\alpha + 2\right)} \cdot \frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 5.0000000000000001e29Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.8%
Simplified95.8%
Taylor expanded in beta around inf 29.0%
Taylor expanded in alpha around 0 15.8%
if 5.0000000000000001e29 < beta Initial program 85.4%
associate-/l/79.2%
associate-+l+79.2%
+-commutative79.2%
associate-+r+79.2%
associate-+l+79.2%
distribute-rgt1-in79.2%
*-rgt-identity79.2%
distribute-lft-out79.2%
+-commutative79.2%
associate-*l/87.9%
*-commutative87.9%
associate-*r/84.9%
Simplified84.9%
associate-*r/87.9%
+-commutative87.9%
associate-+r+87.9%
+-commutative87.9%
associate-+r+87.9%
+-commutative87.9%
Applied egg-rr87.9%
times-frac99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in beta around inf 87.2%
Final simplification33.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.2) (/ (+ beta 1.0) (* (+ beta 2.0) (+ 6.0 (* beta 5.0)))) (* (/ (+ 1.0 alpha) (+ beta (+ alpha 2.0))) (/ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.2) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.2d0) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * (6.0d0 + (beta * 5.0d0)))
else
tmp = ((1.0d0 + alpha) / (beta + (alpha + 2.0d0))) * (1.0d0 / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.2) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.2: tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0))) else: tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.2) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * 5.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(beta + Float64(alpha + 2.0))) * Float64(1.0 / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.2)
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
else
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.2], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.2:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot 5\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta + \left(\alpha + 2\right)} \cdot \frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 5.20000000000000018Initial program 99.9%
associate-/l/99.9%
associate-/r*95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+r+95.1%
associate-+l+95.1%
distribute-rgt1-in95.1%
*-rgt-identity95.1%
distribute-lft-out95.1%
*-commutative95.1%
metadata-eval95.1%
associate-+l+95.1%
+-commutative95.1%
Simplified95.1%
Taylor expanded in beta around 0 94.9%
Taylor expanded in alpha around 0 72.5%
if 5.20000000000000018 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
associate-*r/88.7%
+-commutative88.7%
associate-+r+88.7%
+-commutative88.7%
associate-+r+88.7%
+-commutative88.7%
Applied egg-rr88.7%
times-frac99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in beta around inf 85.0%
Final simplification75.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.5) (/ (+ beta 1.0) (* (+ beta 2.0) (+ 6.0 (* beta 5.0)))) (/ (/ (+ 1.0 alpha) beta) (+ 1.0 (+ 2.0 (+ beta alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.5) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 4.5d0) then
tmp = (beta + 1.0d0) / ((beta + 2.0d0) * (6.0d0 + (beta * 5.0d0)))
else
tmp = ((1.0d0 + alpha) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 4.5) {
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.5: tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0))) else: tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.5) tmp = Float64(Float64(beta + 1.0) / Float64(Float64(beta + 2.0) * Float64(6.0 + Float64(beta * 5.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.5)
tmp = (beta + 1.0) / ((beta + 2.0) * (6.0 + (beta * 5.0)));
else
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 4.5], N[(N[(beta + 1.0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4.5:\\
\;\;\;\;\frac{\beta + 1}{\left(\beta + 2\right) \cdot \left(6 + \beta \cdot 5\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 4.5Initial program 99.9%
associate-/l/99.9%
associate-/r*95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+r+95.1%
associate-+l+95.1%
distribute-rgt1-in95.1%
*-rgt-identity95.1%
distribute-lft-out95.1%
*-commutative95.1%
metadata-eval95.1%
associate-+l+95.1%
+-commutative95.1%
Simplified95.1%
Taylor expanded in beta around 0 94.9%
Taylor expanded in alpha around 0 72.5%
if 4.5 < beta Initial program 86.5%
div-inv86.5%
+-commutative86.5%
associate-+l+86.5%
*-commutative86.5%
metadata-eval86.5%
+-commutative86.5%
metadata-eval86.5%
+-commutative86.5%
Applied egg-rr86.5%
associate-*l/86.6%
associate-*r/86.5%
associate-+r+86.5%
*-rgt-identity86.5%
+-commutative86.5%
distribute-rgt1-in86.5%
distribute-lft-in86.5%
*-rgt-identity86.5%
+-commutative86.5%
+-commutative86.5%
*-commutative86.5%
+-commutative86.5%
+-commutative86.5%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
Simplified99.7%
Taylor expanded in beta around inf 85.1%
Final simplification75.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.0) (/ 1.0 (+ 6.0 (* beta 5.0))) (* (+ 1.0 alpha) (/ 1.0 (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.0) {
tmp = 1.0 / (6.0 + (beta * 5.0));
} else {
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 6.0d0) then
tmp = 1.0d0 / (6.0d0 + (beta * 5.0d0))
else
tmp = (1.0d0 + alpha) * (1.0d0 / (beta * beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.0) {
tmp = 1.0 / (6.0 + (beta * 5.0));
} else {
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.0: tmp = 1.0 / (6.0 + (beta * 5.0)) else: tmp = (1.0 + alpha) * (1.0 / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.0) tmp = Float64(1.0 / Float64(6.0 + Float64(beta * 5.0))); else tmp = Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta * beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 6.0)
tmp = 1.0 / (6.0 + (beta * 5.0));
else
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 6.0], N[(1.0 / N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6:\\
\;\;\;\;\frac{1}{6 + \beta \cdot 5}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 6Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.7%
Simplified95.7%
Taylor expanded in beta around inf 28.2%
Taylor expanded in alpha around 0 14.7%
Taylor expanded in beta around 0 14.7%
*-commutative14.7%
Simplified14.7%
if 6 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in beta around inf 79.7%
unpow279.7%
Simplified79.7%
Final simplification31.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.7e+16) (/ 1.0 (* (+ beta 3.0) (+ beta 2.0))) (* (+ 1.0 alpha) (/ 1.0 (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.7e+16) {
tmp = 1.0 / ((beta + 3.0) * (beta + 2.0));
} else {
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 1.7d+16) then
tmp = 1.0d0 / ((beta + 3.0d0) * (beta + 2.0d0))
else
tmp = (1.0d0 + alpha) * (1.0d0 / (beta * beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1.7e+16) {
tmp = 1.0 / ((beta + 3.0) * (beta + 2.0));
} else {
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.7e+16: tmp = 1.0 / ((beta + 3.0) * (beta + 2.0)) else: tmp = (1.0 + alpha) * (1.0 / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.7e+16) tmp = Float64(1.0 / Float64(Float64(beta + 3.0) * Float64(beta + 2.0))); else tmp = Float64(Float64(1.0 + alpha) * Float64(1.0 / Float64(beta * beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1.7e+16)
tmp = 1.0 / ((beta + 3.0) * (beta + 2.0));
else
tmp = (1.0 + alpha) * (1.0 / (beta * beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 1.7e+16], N[(1.0 / N[(N[(beta + 3.0), $MachinePrecision] * N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.7 \cdot 10^{+16}:\\
\;\;\;\;\frac{1}{\left(\beta + 3\right) \cdot \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 1.7e16Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.8%
Simplified95.8%
Taylor expanded in beta around inf 28.8%
Taylor expanded in alpha around 0 15.5%
if 1.7e16 < beta Initial program 85.9%
associate-/l/79.8%
associate-+l+79.8%
+-commutative79.8%
associate-+r+79.8%
associate-+l+79.8%
distribute-rgt1-in79.8%
*-rgt-identity79.8%
distribute-lft-out79.9%
+-commutative79.9%
associate-*l/88.2%
*-commutative88.2%
associate-*r/85.3%
Simplified85.3%
Taylor expanded in beta around inf 80.7%
unpow280.7%
Simplified80.7%
Final simplification31.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.0) (/ 1.0 (+ 6.0 (* beta 5.0))) (/ (/ 1.0 beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.0) {
tmp = 1.0 / (6.0 + (beta * 5.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 <= 6.0d0) then
tmp = 1.0d0 / (6.0d0 + (beta * 5.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 <= 6.0) {
tmp = 1.0 / (6.0 + (beta * 5.0));
} else {
tmp = (1.0 / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.0: tmp = 1.0 / (6.0 + (beta * 5.0)) else: tmp = (1.0 / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.0) tmp = Float64(1.0 / Float64(6.0 + Float64(beta * 5.0))); else tmp = Float64(Float64(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 <= 6.0)
tmp = 1.0 / (6.0 + (beta * 5.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, 6.0], N[(1.0 / N[(6.0 + N[(beta * 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6:\\
\;\;\;\;\frac{1}{6 + \beta \cdot 5}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 6Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.7%
Simplified95.7%
Taylor expanded in beta around inf 28.2%
Taylor expanded in alpha around 0 14.7%
Taylor expanded in beta around 0 14.7%
*-commutative14.7%
Simplified14.7%
if 6 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in beta around inf 79.7%
unpow279.7%
Simplified79.7%
Taylor expanded in alpha around 0 75.1%
unpow275.1%
associate-/r*75.2%
Simplified75.2%
Final simplification30.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.5) (/ 1.0 (+ 6.0 (* beta 5.0))) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.5) {
tmp = 1.0 / (6.0 + (beta * 5.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 <= 6.5d0) then
tmp = 1.0d0 / (6.0d0 + (beta * 5.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 <= 6.5) {
tmp = 1.0 / (6.0 + (beta * 5.0));
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.5: tmp = 1.0 / (6.0 + (beta * 5.0)) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.5) tmp = Float64(1.0 / Float64(6.0 + Float64(beta * 5.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 <= 6.5)
tmp = 1.0 / (6.0 + (beta * 5.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, 6.5], N[(1.0 / N[(6.0 + N[(beta * 5.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 6.5:\\
\;\;\;\;\frac{1}{6 + \beta \cdot 5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 6.5Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.7%
Simplified95.7%
Taylor expanded in beta around inf 28.2%
Taylor expanded in alpha around 0 14.7%
Taylor expanded in beta around 0 14.7%
*-commutative14.7%
Simplified14.7%
if 6.5 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in beta around inf 79.7%
unpow279.7%
Simplified79.7%
Final simplification31.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.4) 0.16666666666666666 (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = 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.4d0) then
tmp = 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.4) {
tmp = 0.16666666666666666;
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.4: tmp = 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.4) tmp = 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.4)
tmp = 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.4], 0.16666666666666666, 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.4:\\
\;\;\;\;0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 2.39999999999999991Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.7%
Simplified95.7%
Taylor expanded in beta around inf 28.2%
Taylor expanded in alpha around 0 14.7%
Taylor expanded in beta around 0 14.7%
if 2.39999999999999991 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in beta around inf 83.0%
Taylor expanded in alpha around 0 75.3%
Taylor expanded in beta around inf 75.1%
unpow275.1%
Simplified75.1%
Final simplification30.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.4) 0.16666666666666666 (/ (/ 1.0 beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = 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.4d0) then
tmp = 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.4) {
tmp = 0.16666666666666666;
} else {
tmp = (1.0 / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.4: tmp = 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.4) tmp = 0.16666666666666666; else tmp = Float64(Float64(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 <= 2.4)
tmp = 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.4], 0.16666666666666666, N[(N[(1.0 / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.4:\\
\;\;\;\;0.16666666666666666\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 2.39999999999999991Initial program 99.9%
associate-/l/99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
distribute-rgt1-in99.9%
*-rgt-identity99.9%
distribute-lft-out99.9%
+-commutative99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/95.7%
Simplified95.7%
Taylor expanded in beta around inf 28.2%
Taylor expanded in alpha around 0 14.7%
Taylor expanded in beta around 0 14.7%
if 2.39999999999999991 < beta Initial program 86.5%
associate-/l/80.7%
associate-+l+80.7%
+-commutative80.7%
associate-+r+80.7%
associate-+l+80.7%
distribute-rgt1-in80.7%
*-rgt-identity80.7%
distribute-lft-out80.7%
+-commutative80.7%
associate-*l/88.7%
*-commutative88.7%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in beta around inf 79.7%
unpow279.7%
Simplified79.7%
Taylor expanded in alpha around 0 75.1%
unpow275.1%
associate-/r*75.2%
Simplified75.2%
Final simplification30.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 0.16666666666666666)
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.16666666666666666d0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return 0.16666666666666666 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := 0.16666666666666666
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.16666666666666666
\end{array}
Initial program 96.4%
associate-/l/94.9%
associate-+l+94.9%
+-commutative94.9%
associate-+r+94.9%
associate-+l+94.9%
distribute-rgt1-in94.9%
*-rgt-identity94.9%
distribute-lft-out94.9%
+-commutative94.9%
associate-*l/97.0%
*-commutative97.0%
associate-*r/93.2%
Simplified93.2%
Taylor expanded in beta around inf 42.6%
Taylor expanded in alpha around 0 30.6%
Taylor expanded in beta around 0 11.9%
Final simplification11.9%
herbie shell --seed 2023199
(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)))