
(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 16 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 2.0) alpha))) (* (/ (+ 1.0 beta) t_0) (/ (/ (+ 1.0 alpha) t_0) (+ beta (+ alpha 3.0))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = (beta + 2.0) + alpha;
return ((1.0 + beta) / t_0) * (((1.0 + alpha) / t_0) / (beta + (alpha + 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 + 2.0d0) + alpha
code = ((1.0d0 + beta) / t_0) * (((1.0d0 + alpha) / t_0) / (beta + (alpha + 3.0d0)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = (beta + 2.0) + alpha;
return ((1.0 + beta) / t_0) * (((1.0 + alpha) / t_0) / (beta + (alpha + 3.0)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = (beta + 2.0) + alpha return ((1.0 + beta) / t_0) * (((1.0 + alpha) / t_0) / (beta + (alpha + 3.0)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(Float64(beta + 2.0) + alpha) return Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(Float64(1.0 + alpha) / t_0) / Float64(beta + Float64(alpha + 3.0)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = (beta + 2.0) + alpha;
tmp = ((1.0 + beta) / t_0) * (((1.0 + alpha) / t_0) / (beta + (alpha + 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[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]}, N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \left(\beta + 2\right) + \alpha\\
\frac{1 + \beta}{t_0} \cdot \frac{\frac{1 + \alpha}{t_0}}{\beta + \left(\alpha + 3\right)}
\end{array}
\end{array}
Initial program 95.6%
associate-/l/93.5%
associate-+l+93.5%
+-commutative93.5%
associate-+r+93.5%
associate-+l+93.5%
distribute-rgt1-in93.5%
*-rgt-identity93.5%
distribute-lft-out93.5%
+-commutative93.5%
associate-*l/96.7%
*-commutative96.7%
associate-*r/93.7%
Simplified93.7%
associate-*r/96.7%
+-commutative96.7%
Applied egg-rr96.7%
+-commutative96.7%
*-commutative96.7%
+-commutative96.7%
associate-*r/96.6%
+-commutative96.6%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Final simplification99.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ (+ beta 2.0) alpha)))
(if (<= beta 18500000000000.0)
(* (+ 1.0 alpha) (/ (/ (+ 1.0 beta) t_0) (* t_0 (+ alpha (+ beta 3.0)))))
(*
(/ (/ (+ 1.0 alpha) t_0) (+ beta (+ alpha 3.0)))
(- 1.0 (/ (+ 1.0 alpha) beta))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = (beta + 2.0) + alpha;
double tmp;
if (beta <= 18500000000000.0) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / (t_0 * (alpha + (beta + 3.0))));
} else {
tmp = (((1.0 + alpha) / t_0) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = (beta + 2.0d0) + alpha
if (beta <= 18500000000000.0d0) then
tmp = (1.0d0 + alpha) * (((1.0d0 + beta) / t_0) / (t_0 * (alpha + (beta + 3.0d0))))
else
tmp = (((1.0d0 + alpha) / t_0) / (beta + (alpha + 3.0d0))) * (1.0d0 - ((1.0d0 + alpha) / beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = (beta + 2.0) + alpha;
double tmp;
if (beta <= 18500000000000.0) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / (t_0 * (alpha + (beta + 3.0))));
} else {
tmp = (((1.0 + alpha) / t_0) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = (beta + 2.0) + alpha tmp = 0 if beta <= 18500000000000.0: tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / (t_0 * (alpha + (beta + 3.0)))) else: tmp = (((1.0 + alpha) / t_0) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(Float64(beta + 2.0) + alpha) tmp = 0.0 if (beta <= 18500000000000.0) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / t_0) / Float64(t_0 * Float64(alpha + Float64(beta + 3.0))))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / Float64(beta + Float64(alpha + 3.0))) * Float64(1.0 - Float64(Float64(1.0 + alpha) / beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = (beta + 2.0) + alpha;
tmp = 0.0;
if (beta <= 18500000000000.0)
tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / (t_0 * (alpha + (beta + 3.0))));
else
tmp = (((1.0 + alpha) / t_0) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]}, If[LessEqual[beta, 18500000000000.0], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(t$95$0 * N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \left(\beta + 2\right) + \alpha\\
\mathbf{if}\;\beta \leq 18500000000000:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{t_0}}{t_0 \cdot \left(\alpha + \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0}}{\beta + \left(\alpha + 3\right)} \cdot \left(1 - \frac{1 + \alpha}{\beta}\right)\\
\end{array}
\end{array}
if beta < 1.85e13Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.2%
Simplified95.2%
if 1.85e13 < beta Initial program 85.3%
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/90.2%
*-commutative90.2%
associate-*r/90.2%
Simplified90.2%
associate-*r/90.2%
+-commutative90.2%
Applied egg-rr90.2%
+-commutative90.2%
*-commutative90.2%
+-commutative90.2%
associate-*r/90.2%
+-commutative90.2%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 84.0%
associate-*r/84.0%
neg-mul-184.0%
distribute-neg-in84.0%
metadata-eval84.0%
unsub-neg84.0%
Simplified84.0%
Final simplification91.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 5e+31)
(/ (+ 1.0 beta) (* (* (+ beta 2.0) (+ beta 3.0)) (+ beta (+ 2.0 alpha))))
(*
(/ (/ (+ 1.0 alpha) (+ (+ beta 2.0) alpha)) (+ beta (+ alpha 3.0)))
(- 1.0 (/ (+ 1.0 alpha) beta)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5e+31) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
} else {
tmp = (((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5d+31) then
tmp = (1.0d0 + beta) / (((beta + 2.0d0) * (beta + 3.0d0)) * (beta + (2.0d0 + alpha)))
else
tmp = (((1.0d0 + alpha) / ((beta + 2.0d0) + alpha)) / (beta + (alpha + 3.0d0))) * (1.0d0 - ((1.0d0 + alpha) / beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5e+31) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
} else {
tmp = (((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5e+31: tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha))) else: tmp = (((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5e+31) tmp = Float64(Float64(1.0 + beta) / Float64(Float64(Float64(beta + 2.0) * Float64(beta + 3.0)) * Float64(beta + Float64(2.0 + alpha)))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(beta + 2.0) + alpha)) / Float64(beta + Float64(alpha + 3.0))) * Float64(1.0 - Float64(Float64(1.0 + alpha) / beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5e+31)
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
else
tmp = (((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0))) * (1.0 - ((1.0 + alpha) / beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5e+31], N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * N[(beta + N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5 \cdot 10^{+31}:\\
\;\;\;\;\frac{1 + \beta}{\left(\left(\beta + 2\right) \cdot \left(\beta + 3\right)\right) \cdot \left(\beta + \left(2 + \alpha\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\beta + 2\right) + \alpha}}{\beta + \left(\alpha + 3\right)} \cdot \left(1 - \frac{1 + \alpha}{\beta}\right)\\
\end{array}
\end{array}
if beta < 5.00000000000000027e31Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.4%
Simplified95.4%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 70.1%
expm1-log1p-u70.1%
expm1-udef76.6%
un-div-inv76.6%
associate-+l+76.6%
Applied egg-rr76.6%
expm1-def70.1%
expm1-log1p70.1%
associate-/l/70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
Simplified70.1%
if 5.00000000000000027e31 < beta Initial program 83.7%
associate-/l/76.8%
associate-+l+76.8%
+-commutative76.8%
associate-+r+76.8%
associate-+l+76.8%
distribute-rgt1-in76.8%
*-rgt-identity76.8%
distribute-lft-out76.8%
+-commutative76.8%
associate-*l/89.1%
*-commutative89.1%
associate-*r/89.1%
Simplified89.1%
associate-*r/89.1%
+-commutative89.1%
Applied egg-rr89.1%
+-commutative89.1%
*-commutative89.1%
+-commutative89.1%
associate-*r/89.1%
+-commutative89.1%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 85.1%
associate-*r/85.1%
neg-mul-185.1%
distribute-neg-in85.1%
metadata-eval85.1%
unsub-neg85.1%
Simplified85.1%
Final simplification74.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 1.9e+32)
(/ (+ 1.0 beta) (* (* (+ beta 2.0) (+ beta 3.0)) (+ beta (+ 2.0 alpha))))
(*
(/ (/ (- -1.0 alpha) beta) (+ beta (+ alpha 3.0)))
(/ (- -1.0 beta) (+ (+ beta 2.0) alpha)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.9e+32) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
} else {
tmp = (((-1.0 - alpha) / beta) / (beta + (alpha + 3.0))) * ((-1.0 - beta) / ((beta + 2.0) + 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 <= 1.9d+32) then
tmp = (1.0d0 + beta) / (((beta + 2.0d0) * (beta + 3.0d0)) * (beta + (2.0d0 + alpha)))
else
tmp = ((((-1.0d0) - alpha) / beta) / (beta + (alpha + 3.0d0))) * (((-1.0d0) - beta) / ((beta + 2.0d0) + alpha))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1.9e+32) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
} else {
tmp = (((-1.0 - alpha) / beta) / (beta + (alpha + 3.0))) * ((-1.0 - beta) / ((beta + 2.0) + alpha));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.9e+32: tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha))) else: tmp = (((-1.0 - alpha) / beta) / (beta + (alpha + 3.0))) * ((-1.0 - beta) / ((beta + 2.0) + alpha)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.9e+32) tmp = Float64(Float64(1.0 + beta) / Float64(Float64(Float64(beta + 2.0) * Float64(beta + 3.0)) * Float64(beta + Float64(2.0 + alpha)))); else tmp = Float64(Float64(Float64(Float64(-1.0 - alpha) / beta) / Float64(beta + Float64(alpha + 3.0))) * Float64(Float64(-1.0 - beta) / Float64(Float64(beta + 2.0) + alpha))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1.9e+32)
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
else
tmp = (((-1.0 - alpha) / beta) / (beta + (alpha + 3.0))) * ((-1.0 - beta) / ((beta + 2.0) + 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, 1.9e+32], N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * N[(beta + N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-1.0 - beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.9 \cdot 10^{+32}:\\
\;\;\;\;\frac{1 + \beta}{\left(\left(\beta + 2\right) \cdot \left(\beta + 3\right)\right) \cdot \left(\beta + \left(2 + \alpha\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-1 - \alpha}{\beta}}{\beta + \left(\alpha + 3\right)} \cdot \frac{-1 - \beta}{\left(\beta + 2\right) + \alpha}\\
\end{array}
\end{array}
if beta < 1.9000000000000002e32Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.4%
Simplified95.4%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 70.1%
expm1-log1p-u70.1%
expm1-udef76.6%
un-div-inv76.6%
associate-+l+76.6%
Applied egg-rr76.6%
expm1-def70.1%
expm1-log1p70.1%
associate-/l/70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
Simplified70.1%
if 1.9000000000000002e32 < beta Initial program 83.7%
associate-/l/76.8%
associate-+l+76.8%
+-commutative76.8%
associate-+r+76.8%
associate-+l+76.8%
distribute-rgt1-in76.8%
*-rgt-identity76.8%
distribute-lft-out76.8%
+-commutative76.8%
associate-*l/89.1%
*-commutative89.1%
associate-*r/89.1%
Simplified89.1%
associate-*r/89.1%
+-commutative89.1%
Applied egg-rr89.1%
+-commutative89.1%
*-commutative89.1%
+-commutative89.1%
associate-*r/89.1%
+-commutative89.1%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 85.2%
Final simplification74.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.2e+33) (/ (+ 1.0 beta) (* (* (+ beta 2.0) (+ beta 3.0)) (+ beta (+ 2.0 alpha)))) (/ (/ (+ 1.0 alpha) (+ (+ beta 2.0) alpha)) (+ beta (+ alpha 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.2e+33) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
} else {
tmp = ((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.2d+33) then
tmp = (1.0d0 + beta) / (((beta + 2.0d0) * (beta + 3.0d0)) * (beta + (2.0d0 + alpha)))
else
tmp = ((1.0d0 + alpha) / ((beta + 2.0d0) + alpha)) / (beta + (alpha + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.2e+33) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
} else {
tmp = ((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.2e+33: tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha))) else: tmp = ((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.2e+33) tmp = Float64(Float64(1.0 + beta) / Float64(Float64(Float64(beta + 2.0) * Float64(beta + 3.0)) * Float64(beta + Float64(2.0 + alpha)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(beta + 2.0) + alpha)) / Float64(beta + Float64(alpha + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.2e+33)
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (beta + (2.0 + alpha)));
else
tmp = ((1.0 + alpha) / ((beta + 2.0) + alpha)) / (beta + (alpha + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.2e+33], N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * N[(beta + N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.2 \cdot 10^{+33}:\\
\;\;\;\;\frac{1 + \beta}{\left(\left(\beta + 2\right) \cdot \left(\beta + 3\right)\right) \cdot \left(\beta + \left(2 + \alpha\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\beta + 2\right) + \alpha}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 3.20000000000000017e33Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.4%
Simplified95.4%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 70.1%
expm1-log1p-u70.1%
expm1-udef76.6%
un-div-inv76.6%
associate-+l+76.6%
Applied egg-rr76.6%
expm1-def70.1%
expm1-log1p70.1%
associate-/l/70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
Simplified70.1%
if 3.20000000000000017e33 < beta Initial program 83.7%
associate-/l/76.8%
associate-+l+76.8%
+-commutative76.8%
associate-+r+76.8%
associate-+l+76.8%
distribute-rgt1-in76.8%
*-rgt-identity76.8%
distribute-lft-out76.8%
+-commutative76.8%
associate-*l/89.1%
*-commutative89.1%
associate-*r/89.1%
Simplified89.1%
associate-*r/89.1%
+-commutative89.1%
Applied egg-rr89.1%
+-commutative89.1%
*-commutative89.1%
+-commutative89.1%
associate-*r/89.1%
+-commutative89.1%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 85.2%
Final simplification74.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 1.05)
(*
(/ (+ 1.0 beta) (+ (+ beta 2.0) alpha))
(+ (* beta -0.1388888888888889) 0.16666666666666666))
(/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.05) {
tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666);
} 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 <= 1.05d0) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) + alpha)) * ((beta * (-0.1388888888888889d0)) + 0.16666666666666666d0)
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 <= 1.05) {
tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.05: tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666) 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 <= 1.05) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) + alpha)) * Float64(Float64(beta * -0.1388888888888889) + 0.16666666666666666)); 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 <= 1.05)
tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666);
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, 1.05], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]), $MachinePrecision] * N[(N[(beta * -0.1388888888888889), $MachinePrecision] + 0.16666666666666666), $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 1.05:\\
\;\;\;\;\frac{1 + \beta}{\left(\beta + 2\right) + \alpha} \cdot \left(\beta \cdot -0.1388888888888889 + 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 1.05000000000000004Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 69.1%
if 1.05000000000000004 < beta Initial program 85.7%
Taylor expanded in beta around -inf 83.1%
Taylor expanded in alpha around 0 82.9%
Final simplification73.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 1.05)
(*
(/ (+ 1.0 beta) (+ (+ beta 2.0) alpha))
(+ (* beta -0.1388888888888889) 0.16666666666666666))
(/ (/ (+ 1.0 alpha) beta) (+ beta (+ alpha 3.0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.05) {
tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + (alpha + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 1.05d0) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) + alpha)) * ((beta * (-0.1388888888888889d0)) + 0.16666666666666666d0)
else
tmp = ((1.0d0 + alpha) / beta) / (beta + (alpha + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 1.05) {
tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + (alpha + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.05: tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666) else: tmp = ((1.0 + alpha) / beta) / (beta + (alpha + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.05) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) + alpha)) * Float64(Float64(beta * -0.1388888888888889) + 0.16666666666666666)); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(beta + Float64(alpha + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 1.05)
tmp = ((1.0 + beta) / ((beta + 2.0) + alpha)) * ((beta * -0.1388888888888889) + 0.16666666666666666);
else
tmp = ((1.0 + alpha) / beta) / (beta + (alpha + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 1.05], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]), $MachinePrecision] * N[(N[(beta * -0.1388888888888889), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.05:\\
\;\;\;\;\frac{1 + \beta}{\left(\beta + 2\right) + \alpha} \cdot \left(\beta \cdot -0.1388888888888889 + 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 1.05000000000000004Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 69.1%
if 1.05000000000000004 < beta Initial program 85.7%
Taylor expanded in beta around -inf 83.1%
Taylor expanded in alpha around 0 83.1%
+-commutative83.1%
Simplified83.1%
Final simplification73.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ (+ beta 2.0) alpha)))
(if (<= beta 0.7)
(*
(/ (+ 1.0 beta) t_0)
(+ (* beta -0.1388888888888889) 0.16666666666666666))
(/ (/ (+ 1.0 alpha) t_0) (+ beta (+ alpha 3.0))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = (beta + 2.0) + alpha;
double tmp;
if (beta <= 0.7) {
tmp = ((1.0 + beta) / t_0) * ((beta * -0.1388888888888889) + 0.16666666666666666);
} else {
tmp = ((1.0 + alpha) / t_0) / (beta + (alpha + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = (beta + 2.0d0) + alpha
if (beta <= 0.7d0) then
tmp = ((1.0d0 + beta) / t_0) * ((beta * (-0.1388888888888889d0)) + 0.16666666666666666d0)
else
tmp = ((1.0d0 + alpha) / t_0) / (beta + (alpha + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = (beta + 2.0) + alpha;
double tmp;
if (beta <= 0.7) {
tmp = ((1.0 + beta) / t_0) * ((beta * -0.1388888888888889) + 0.16666666666666666);
} else {
tmp = ((1.0 + alpha) / t_0) / (beta + (alpha + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = (beta + 2.0) + alpha tmp = 0 if beta <= 0.7: tmp = ((1.0 + beta) / t_0) * ((beta * -0.1388888888888889) + 0.16666666666666666) else: tmp = ((1.0 + alpha) / t_0) / (beta + (alpha + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(Float64(beta + 2.0) + alpha) tmp = 0.0 if (beta <= 0.7) tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(beta * -0.1388888888888889) + 0.16666666666666666)); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) / Float64(beta + Float64(alpha + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = (beta + 2.0) + alpha;
tmp = 0.0;
if (beta <= 0.7)
tmp = ((1.0 + beta) / t_0) * ((beta * -0.1388888888888889) + 0.16666666666666666);
else
tmp = ((1.0 + alpha) / t_0) / (beta + (alpha + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(beta + 2.0), $MachinePrecision] + alpha), $MachinePrecision]}, If[LessEqual[beta, 0.7], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(beta * -0.1388888888888889), $MachinePrecision] + 0.16666666666666666), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \left(\beta + 2\right) + \alpha\\
\mathbf{if}\;\beta \leq 0.7:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \left(\beta \cdot -0.1388888888888889 + 0.16666666666666666\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 0.69999999999999996Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 69.1%
if 0.69999999999999996 < beta Initial program 85.7%
associate-/l/79.7%
associate-+l+79.7%
+-commutative79.7%
associate-+r+79.7%
associate-+l+79.7%
distribute-rgt1-in79.7%
*-rgt-identity79.7%
distribute-lft-out79.7%
+-commutative79.7%
associate-*l/90.4%
*-commutative90.4%
associate-*r/90.4%
Simplified90.4%
associate-*r/90.4%
+-commutative90.4%
Applied egg-rr90.4%
+-commutative90.4%
*-commutative90.4%
+-commutative90.4%
associate-*r/90.4%
+-commutative90.4%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 83.6%
Final simplification73.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.2) (/ 0.16666666666666666 (+ 2.0 alpha)) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.2) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} 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.2d0) then
tmp = 0.16666666666666666d0 / (2.0d0 + alpha)
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.2) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} 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.2: tmp = 0.16666666666666666 / (2.0 + alpha) 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.2) tmp = Float64(0.16666666666666666 / Float64(2.0 + alpha)); 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.2)
tmp = 0.16666666666666666 / (2.0 + alpha);
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.2], N[(0.16666666666666666 / N[(2.0 + alpha), $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.2:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \alpha}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 2.2000000000000002Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 68.4%
+-commutative68.4%
Simplified68.4%
if 2.2000000000000002 < beta Initial program 85.7%
Taylor expanded in beta around -inf 83.1%
Taylor expanded in alpha around 0 82.9%
Final simplification72.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.2) (/ 0.16666666666666666 (+ 2.0 alpha)) (/ 1.0 (* beta (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.2) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.2d0) then
tmp = 0.16666666666666666d0 / (2.0d0 + alpha)
else
tmp = 1.0d0 / (beta * (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.2) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.2: tmp = 0.16666666666666666 / (2.0 + alpha) else: tmp = 1.0 / (beta * (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.2) tmp = Float64(0.16666666666666666 / Float64(2.0 + alpha)); else tmp = Float64(1.0 / Float64(beta * Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.2)
tmp = 0.16666666666666666 / (2.0 + alpha);
else
tmp = 1.0 / (beta * (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.2], N[(0.16666666666666666 / N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.2:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \alpha}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 2.2000000000000002Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 68.4%
+-commutative68.4%
Simplified68.4%
if 2.2000000000000002 < beta Initial program 85.7%
Taylor expanded in beta around -inf 83.1%
Taylor expanded in alpha around 0 80.9%
Final simplification72.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.4) (/ 0.16666666666666666 (+ 2.0 alpha)) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.4) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} 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.4d0) then
tmp = 0.16666666666666666d0 / (2.0d0 + alpha)
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.4) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.4: tmp = 0.16666666666666666 / (2.0 + alpha) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.4) tmp = Float64(0.16666666666666666 / Float64(2.0 + alpha)); 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.4)
tmp = 0.16666666666666666 / (2.0 + alpha);
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.4], N[(0.16666666666666666 / N[(2.0 + alpha), $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.4:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \alpha}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.39999999999999991Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 68.4%
+-commutative68.4%
Simplified68.4%
if 3.39999999999999991 < beta Initial program 85.7%
associate-/l/79.7%
associate-+l+79.7%
+-commutative79.7%
associate-+r+79.7%
associate-+l+79.7%
distribute-rgt1-in79.7%
*-rgt-identity79.7%
distribute-lft-out79.7%
+-commutative79.7%
associate-*l/90.4%
*-commutative90.4%
associate-*r/90.4%
Simplified90.4%
associate-*r/90.4%
+-commutative90.4%
Applied egg-rr90.4%
+-commutative90.4%
*-commutative90.4%
+-commutative90.4%
associate-*r/90.4%
+-commutative90.4%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
associate-*r/99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
Applied egg-rr99.7%
associate-/l*97.6%
associate-+r+97.6%
+-commutative97.6%
associate-+r+97.6%
Simplified97.6%
Taylor expanded in beta around inf 81.7%
unpow281.7%
Simplified81.7%
Final simplification72.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.0) (/ 0.16666666666666666 (+ 2.0 alpha)) (/ (/ (+ 1.0 alpha) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} 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 <= 4.0d0) then
tmp = 0.16666666666666666d0 / (2.0d0 + alpha)
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 <= 4.0) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.0: tmp = 0.16666666666666666 / (2.0 + alpha) else: tmp = ((1.0 + alpha) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.0) tmp = Float64(0.16666666666666666 / Float64(2.0 + alpha)); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 4.0)
tmp = 0.16666666666666666 / (2.0 + alpha);
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, 4.0], N[(0.16666666666666666 / N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \alpha}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 4Initial program 99.8%
associate-/l/99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
associate-+l+99.4%
distribute-rgt1-in99.4%
*-rgt-identity99.4%
distribute-lft-out99.4%
+-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
associate-*r/95.1%
Simplified95.1%
associate-*r/99.4%
+-commutative99.4%
Applied egg-rr99.4%
+-commutative99.4%
*-commutative99.4%
+-commutative99.4%
associate-*r/99.3%
+-commutative99.3%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 69.5%
Taylor expanded in beta around 0 68.4%
+-commutative68.4%
Simplified68.4%
if 4 < beta Initial program 85.7%
Taylor expanded in beta around -inf 83.1%
Taylor expanded in beta around inf 82.9%
Final simplification72.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 3.25) (/ 0.16666666666666666 (+ 2.0 alpha)) (/ 0.3333333333333333 (* alpha alpha))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 3.25) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} else {
tmp = 0.3333333333333333 / (alpha * alpha);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (alpha <= 3.25d0) then
tmp = 0.16666666666666666d0 / (2.0d0 + alpha)
else
tmp = 0.3333333333333333d0 / (alpha * alpha)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 3.25) {
tmp = 0.16666666666666666 / (2.0 + alpha);
} else {
tmp = 0.3333333333333333 / (alpha * alpha);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 3.25: tmp = 0.16666666666666666 / (2.0 + alpha) else: tmp = 0.3333333333333333 / (alpha * alpha) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 3.25) tmp = Float64(0.16666666666666666 / Float64(2.0 + alpha)); else tmp = Float64(0.3333333333333333 / Float64(alpha * alpha)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 3.25)
tmp = 0.16666666666666666 / (2.0 + alpha);
else
tmp = 0.3333333333333333 / (alpha * alpha);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[alpha, 3.25], N[(0.16666666666666666 / N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 / N[(alpha * alpha), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 3.25:\\
\;\;\;\;\frac{0.16666666666666666}{2 + \alpha}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\alpha \cdot \alpha}\\
\end{array}
\end{array}
if alpha < 3.25Initial program 99.8%
associate-/l/98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+r+98.9%
associate-+l+98.9%
distribute-rgt1-in98.9%
*-rgt-identity98.9%
distribute-lft-out98.9%
+-commutative98.9%
associate-*l/98.9%
*-commutative98.9%
associate-*r/98.9%
Simplified98.9%
associate-*r/98.9%
+-commutative98.9%
Applied egg-rr98.9%
+-commutative98.9%
*-commutative98.9%
+-commutative98.9%
associate-*r/98.9%
+-commutative98.9%
associate-/r*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 97.0%
Taylor expanded in beta around 0 67.1%
+-commutative67.1%
Simplified67.1%
if 3.25 < alpha Initial program 85.6%
associate-/l/80.6%
associate-/l/67.2%
associate-+l+67.2%
+-commutative67.2%
associate-+r+67.2%
associate-+l+67.2%
distribute-rgt1-in67.2%
*-rgt-identity67.2%
distribute-lft-out67.2%
+-commutative67.2%
times-frac91.3%
Simplified91.3%
Taylor expanded in alpha around 0 53.8%
Taylor expanded in alpha around inf 47.4%
unpow247.4%
Simplified47.4%
Taylor expanded in beta around 0 47.4%
associate-*r/47.4%
distribute-rgt-in47.4%
metadata-eval47.4%
unpow247.4%
Simplified47.4%
Taylor expanded in alpha around 0 51.6%
unpow251.6%
Simplified51.6%
Final simplification62.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ 2.0 alpha)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (2.0 + 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
code = 0.16666666666666666d0 / (2.0d0 + alpha)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (2.0 + alpha);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (2.0 + alpha)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(2.0 + alpha)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (2.0 + alpha);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(2.0 + alpha), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{2 + \alpha}
\end{array}
Initial program 95.6%
associate-/l/93.5%
associate-+l+93.5%
+-commutative93.5%
associate-+r+93.5%
associate-+l+93.5%
distribute-rgt1-in93.5%
*-rgt-identity93.5%
distribute-lft-out93.5%
+-commutative93.5%
associate-*l/96.7%
*-commutative96.7%
associate-*r/93.7%
Simplified93.7%
associate-*r/96.7%
+-commutative96.7%
Applied egg-rr96.7%
+-commutative96.7%
*-commutative96.7%
+-commutative96.7%
associate-*r/96.6%
+-commutative96.6%
associate-/r*99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in alpha around 0 74.4%
Taylor expanded in beta around 0 49.3%
+-commutative49.3%
Simplified49.3%
Final simplification49.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.3333333333333333 alpha))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.3333333333333333 / 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
code = 0.3333333333333333d0 / alpha
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.3333333333333333 / alpha;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.3333333333333333 / alpha
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.3333333333333333 / alpha) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.3333333333333333 / alpha;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.3333333333333333 / alpha), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.3333333333333333}{\alpha}
\end{array}
Initial program 95.6%
associate-/l/93.4%
associate-/l/87.7%
associate-+l+87.7%
+-commutative87.7%
associate-+r+87.7%
associate-+l+87.7%
distribute-rgt1-in87.7%
*-rgt-identity87.7%
distribute-lft-out87.7%
+-commutative87.7%
times-frac96.6%
Simplified96.6%
Taylor expanded in alpha around 0 84.1%
Taylor expanded in alpha around inf 16.7%
unpow216.7%
Simplified16.7%
Taylor expanded in beta around 0 16.7%
associate-*r/16.7%
distribute-rgt-in16.7%
metadata-eval16.7%
unpow216.7%
Simplified16.7%
Taylor expanded in alpha around inf 4.2%
Final simplification4.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / beta;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 1.0d0 / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\beta}
\end{array}
Initial program 95.6%
Taylor expanded in beta around -inf 27.0%
Taylor expanded in alpha around inf 4.2%
Final simplification4.2%
herbie shell --seed 2023207
(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)))