
(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 (+ alpha (+ beta 2.0)))) (/ (/ (/ (+ 1.0 beta) (/ t_0 (+ 1.0 alpha))) (+ beta (+ alpha 3.0))) t_0)))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + beta) / (t_0 / (1.0 + alpha))) / (beta + (alpha + 3.0))) / t_0;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = alpha + (beta + 2.0d0)
code = (((1.0d0 + beta) / (t_0 / (1.0d0 + alpha))) / (beta + (alpha + 3.0d0))) / t_0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + beta) / (t_0 / (1.0 + alpha))) / (beta + (alpha + 3.0))) / t_0;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return (((1.0 + beta) / (t_0 / (1.0 + alpha))) / (beta + (alpha + 3.0))) / t_0
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) return Float64(Float64(Float64(Float64(1.0 + beta) / Float64(t_0 / Float64(1.0 + alpha))) / Float64(beta + Float64(alpha + 3.0))) / t_0) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = (((1.0 + beta) / (t_0 / (1.0 + alpha))) / (beta + (alpha + 3.0))) / t_0;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(t$95$0 / N[(1.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\frac{\frac{\frac{1 + \beta}{\frac{t_0}{1 + \alpha}}}{\beta + \left(\alpha + 3\right)}}{t_0}
\end{array}
\end{array}
Initial program 93.3%
div-inv93.3%
+-commutative93.3%
associate-+l+93.3%
*-commutative93.3%
metadata-eval93.3%
+-commutative93.3%
metadata-eval93.3%
+-commutative93.3%
Applied egg-rr93.3%
associate-*l/93.3%
associate-*r/93.3%
*-rgt-identity93.3%
associate-+r+93.3%
*-rgt-identity93.3%
+-commutative93.3%
distribute-rgt1-in93.3%
distribute-lft-in93.3%
+-commutative93.3%
+-commutative93.3%
*-commutative93.3%
+-commutative93.3%
+-commutative93.3%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
div-inv99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
metadata-eval99.8%
associate-+l+99.7%
metadata-eval99.7%
associate-+r+99.7%
Applied egg-rr99.7%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/93.3%
associate-/l*99.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 3.0))) (t_1 (+ alpha (+ beta 2.0))))
(if (<= beta 3e+151)
(* (+ 1.0 alpha) (/ (/ (+ 1.0 beta) t_1) (* t_1 t_0)))
(* (/ (+ 1.0 alpha) t_0) (/ 1.0 t_1)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double t_1 = alpha + (beta + 2.0);
double tmp;
if (beta <= 3e+151) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_1 * t_0));
} else {
tmp = ((1.0 + alpha) / t_0) * (1.0 / t_1);
}
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) :: t_1
real(8) :: tmp
t_0 = alpha + (beta + 3.0d0)
t_1 = alpha + (beta + 2.0d0)
if (beta <= 3d+151) then
tmp = (1.0d0 + alpha) * (((1.0d0 + beta) / t_1) / (t_1 * t_0))
else
tmp = ((1.0d0 + alpha) / t_0) * (1.0d0 / t_1)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double t_1 = alpha + (beta + 2.0);
double tmp;
if (beta <= 3e+151) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_1 * t_0));
} else {
tmp = ((1.0 + alpha) / t_0) * (1.0 / t_1);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 3.0) t_1 = alpha + (beta + 2.0) tmp = 0 if beta <= 3e+151: tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_1 * t_0)) else: tmp = ((1.0 + alpha) / t_0) * (1.0 / t_1) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 3.0)) t_1 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 3e+151) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / t_1) / Float64(t_1 * t_0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(1.0 / t_1)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 3.0);
t_1 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 3e+151)
tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_1 * t_0));
else
tmp = ((1.0 + alpha) / t_0) * (1.0 / t_1);
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 + 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3e+151], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$1), $MachinePrecision] / N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 3\right)\\
t_1 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 3 \cdot 10^{+151}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{t_1}}{t_1 \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{t_0} \cdot \frac{1}{t_1}\\
\end{array}
\end{array}
if beta < 2.9999999999999999e151Initial program 98.4%
associate-/l/98.5%
associate-+l+98.5%
+-commutative98.5%
associate-+r+98.5%
associate-+l+98.5%
distribute-rgt1-in98.5%
*-rgt-identity98.5%
distribute-lft-out98.5%
+-commutative98.5%
associate-*l/99.4%
*-commutative99.4%
associate-*r/93.4%
Simplified93.4%
if 2.9999999999999999e151 < beta Initial program 70.0%
associate-/l/68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+r+68.0%
associate-+l+68.0%
distribute-rgt1-in68.0%
*-rgt-identity68.0%
distribute-lft-out68.0%
+-commutative68.0%
associate-*l/82.7%
*-commutative82.7%
associate-*r/82.7%
Simplified82.7%
Taylor expanded in beta around inf 82.7%
un-div-inv82.7%
+-commutative82.7%
*-commutative82.7%
Applied egg-rr82.7%
associate-/r*88.2%
+-commutative88.2%
+-commutative88.2%
Simplified88.2%
div-inv88.2%
+-commutative88.2%
+-commutative88.2%
Applied egg-rr88.2%
Final simplification92.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 3e+151)
(* (/ (+ 1.0 beta) (+ beta 3.0)) (/ (+ 1.0 alpha) (* t_0 t_0)))
(* (/ (+ 1.0 alpha) (+ alpha (+ beta 3.0))) (/ 1.0 t_0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 3e+151) {
tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / t_0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 3d+151) then
tmp = ((1.0d0 + beta) / (beta + 3.0d0)) * ((1.0d0 + alpha) / (t_0 * t_0))
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 3.0d0))) * (1.0d0 / 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 <= 3e+151) {
tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / t_0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 3e+151: tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0)) else: tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / 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 <= 3e+151) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(beta + 3.0)) * Float64(Float64(1.0 + alpha) / Float64(t_0 * t_0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 3.0))) * Float64(1.0 / 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 <= 3e+151)
tmp = ((1.0 + beta) / (beta + 3.0)) * ((1.0 + alpha) / (t_0 * t_0));
else
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / t_0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3e+151], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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 3 \cdot 10^{+151}:\\
\;\;\;\;\frac{1 + \beta}{\beta + 3} \cdot \frac{1 + \alpha}{t_0 \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\alpha + \left(\beta + 3\right)} \cdot \frac{1}{t_0}\\
\end{array}
\end{array}
if beta < 2.9999999999999999e151Initial program 98.4%
associate-/l/98.4%
associate-/l/89.6%
associate-+l+89.6%
+-commutative89.6%
associate-+r+89.6%
associate-+l+89.6%
distribute-rgt1-in89.6%
*-rgt-identity89.6%
distribute-lft-out89.6%
+-commutative89.6%
times-frac99.3%
Simplified99.3%
Taylor expanded in alpha around 0 82.6%
if 2.9999999999999999e151 < beta Initial program 70.0%
associate-/l/68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+r+68.0%
associate-+l+68.0%
distribute-rgt1-in68.0%
*-rgt-identity68.0%
distribute-lft-out68.0%
+-commutative68.0%
associate-*l/82.7%
*-commutative82.7%
associate-*r/82.7%
Simplified82.7%
Taylor expanded in beta around inf 82.7%
un-div-inv82.7%
+-commutative82.7%
*-commutative82.7%
Applied egg-rr82.7%
associate-/r*88.2%
+-commutative88.2%
+-commutative88.2%
Simplified88.2%
div-inv88.2%
+-commutative88.2%
+-commutative88.2%
Applied egg-rr88.2%
Final simplification83.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ 2.0 (+ beta alpha)))) (/ (/ (* (+ 1.0 beta) (/ (+ 1.0 alpha) t_0)) t_0) (+ beta (+ alpha 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (beta + alpha);
return (((1.0 + beta) * ((1.0 + alpha) / t_0)) / 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 = 2.0d0 + (beta + alpha)
code = (((1.0d0 + beta) * ((1.0d0 + alpha) / t_0)) / t_0) / (beta + (alpha + 3.0d0))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (beta + alpha);
return (((1.0 + beta) * ((1.0 + alpha) / t_0)) / t_0) / (beta + (alpha + 3.0));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (beta + alpha) return (((1.0 + beta) * ((1.0 + alpha) / t_0)) / t_0) / (beta + (alpha + 3.0))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(beta + alpha)) return Float64(Float64(Float64(Float64(1.0 + beta) * Float64(Float64(1.0 + alpha) / t_0)) / t_0) / Float64(beta + Float64(alpha + 3.0))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = 2.0 + (beta + alpha);
tmp = (((1.0 + beta) * ((1.0 + alpha) / t_0)) / 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[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + beta), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision]), $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 := 2 + \left(\beta + \alpha\right)\\
\frac{\frac{\left(1 + \beta\right) \cdot \frac{1 + \alpha}{t_0}}{t_0}}{\beta + \left(\alpha + 3\right)}
\end{array}
\end{array}
Initial program 93.3%
div-inv93.3%
+-commutative93.3%
associate-+l+93.3%
*-commutative93.3%
metadata-eval93.3%
+-commutative93.3%
metadata-eval93.3%
+-commutative93.3%
Applied egg-rr93.3%
associate-*l/93.3%
associate-*r/93.3%
*-rgt-identity93.3%
associate-+r+93.3%
*-rgt-identity93.3%
+-commutative93.3%
distribute-rgt1-in93.3%
distribute-lft-in93.3%
+-commutative93.3%
+-commutative93.3%
*-commutative93.3%
+-commutative93.3%
+-commutative93.3%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.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 3.3e+151)
(* (+ 1.0 alpha) (/ (/ (+ 1.0 beta) t_0) (* (+ beta 2.0) (+ beta 3.0))))
(* (/ (+ 1.0 alpha) (+ alpha (+ beta 3.0))) (/ 1.0 t_0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 3.3e+151) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / t_0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 3.3d+151) then
tmp = (1.0d0 + alpha) * (((1.0d0 + beta) / t_0) / ((beta + 2.0d0) * (beta + 3.0d0)))
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 3.0d0))) * (1.0d0 / 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 <= 3.3e+151) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / t_0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 3.3e+151: tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / ((beta + 2.0) * (beta + 3.0))) else: tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / 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 <= 3.3e+151) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / t_0) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 3.0))) * Float64(1.0 / 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 <= 3.3e+151)
tmp = (1.0 + alpha) * (((1.0 + beta) / t_0) / ((beta + 2.0) * (beta + 3.0)));
else
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / t_0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3.3e+151], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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 3.3 \cdot 10^{+151}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{t_0}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\alpha + \left(\beta + 3\right)} \cdot \frac{1}{t_0}\\
\end{array}
\end{array}
if beta < 3.30000000000000025e151Initial program 98.4%
associate-/l/98.5%
associate-+l+98.5%
+-commutative98.5%
associate-+r+98.5%
associate-+l+98.5%
distribute-rgt1-in98.5%
*-rgt-identity98.5%
distribute-lft-out98.5%
+-commutative98.5%
associate-*l/99.4%
*-commutative99.4%
associate-*r/93.4%
Simplified93.4%
Taylor expanded in alpha around 0 67.5%
if 3.30000000000000025e151 < beta Initial program 70.0%
associate-/l/68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+r+68.0%
associate-+l+68.0%
distribute-rgt1-in68.0%
*-rgt-identity68.0%
distribute-lft-out68.0%
+-commutative68.0%
associate-*l/82.7%
*-commutative82.7%
associate-*r/82.7%
Simplified82.7%
Taylor expanded in beta around inf 82.7%
un-div-inv82.7%
+-commutative82.7%
*-commutative82.7%
Applied egg-rr82.7%
associate-/r*88.2%
+-commutative88.2%
+-commutative88.2%
Simplified88.2%
div-inv88.2%
+-commutative88.2%
+-commutative88.2%
Applied egg-rr88.2%
Final simplification71.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 3.3e+151)
(*
(+ 1.0 alpha)
(/ (/ (+ 1.0 beta) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0))))
(*
(/ (+ 1.0 alpha) (+ alpha (+ beta 3.0)))
(/ 1.0 (+ alpha (+ beta 2.0))))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.3e+151) {
tmp = (1.0 + alpha) * (((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.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 <= 3.3d+151) then
tmp = (1.0d0 + alpha) * (((1.0d0 + beta) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0)))
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 3.0d0))) * (1.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 <= 3.3e+151) {
tmp = (1.0 + alpha) * (((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / (alpha + (beta + 2.0)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.3e+151: tmp = (1.0 + alpha) * (((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0))) else: tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.0 / (alpha + (beta + 2.0))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.3e+151) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / Float64(beta + 2.0)) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 3.0))) * Float64(1.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 <= 3.3e+151)
tmp = (1.0 + alpha) * (((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)));
else
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) * (1.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, 3.3e+151], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.3 \cdot 10^{+151}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\alpha + \left(\beta + 3\right)} \cdot \frac{1}{\alpha + \left(\beta + 2\right)}\\
\end{array}
\end{array}
if beta < 3.30000000000000025e151Initial program 98.4%
associate-/l/98.5%
associate-+l+98.5%
+-commutative98.5%
associate-+r+98.5%
associate-+l+98.5%
distribute-rgt1-in98.5%
*-rgt-identity98.5%
distribute-lft-out98.5%
+-commutative98.5%
associate-*l/99.4%
*-commutative99.4%
associate-*r/93.4%
Simplified93.4%
Taylor expanded in alpha around 0 67.5%
Taylor expanded in alpha around 0 66.2%
if 3.30000000000000025e151 < beta Initial program 70.0%
associate-/l/68.0%
associate-+l+68.0%
+-commutative68.0%
associate-+r+68.0%
associate-+l+68.0%
distribute-rgt1-in68.0%
*-rgt-identity68.0%
distribute-lft-out68.0%
+-commutative68.0%
associate-*l/82.7%
*-commutative82.7%
associate-*r/82.7%
Simplified82.7%
Taylor expanded in beta around inf 82.7%
un-div-inv82.7%
+-commutative82.7%
*-commutative82.7%
Applied egg-rr82.7%
associate-/r*88.2%
+-commutative88.2%
+-commutative88.2%
Simplified88.2%
div-inv88.2%
+-commutative88.2%
+-commutative88.2%
Applied egg-rr88.2%
Final simplification70.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ beta alpha))))
(if (<= beta 12.0)
(/ (/ (/ (+ 1.0 alpha) (+ alpha 2.0)) t_0) (+ alpha 3.0))
(/ (/ (+ 1.0 alpha) t_0) (+ beta (+ alpha 3.0))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (beta + alpha);
double tmp;
if (beta <= 12.0) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / t_0) / (alpha + 3.0);
} 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 = 2.0d0 + (beta + alpha)
if (beta <= 12.0d0) then
tmp = (((1.0d0 + alpha) / (alpha + 2.0d0)) / t_0) / (alpha + 3.0d0)
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 = 2.0 + (beta + alpha);
double tmp;
if (beta <= 12.0) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / t_0) / (alpha + 3.0);
} else {
tmp = ((1.0 + alpha) / t_0) / (beta + (alpha + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (beta + alpha) tmp = 0 if beta <= 12.0: tmp = (((1.0 + alpha) / (alpha + 2.0)) / t_0) / (alpha + 3.0) 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(2.0 + Float64(beta + alpha)) tmp = 0.0 if (beta <= 12.0) tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0)) / t_0) / Float64(alpha + 3.0)); 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 = 2.0 + (beta + alpha);
tmp = 0.0;
if (beta <= 12.0)
tmp = (((1.0 + alpha) / (alpha + 2.0)) / t_0) / (alpha + 3.0);
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[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 12.0], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(alpha + 3.0), $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 := 2 + \left(\beta + \alpha\right)\\
\mathbf{if}\;\beta \leq 12:\\
\;\;\;\;\frac{\frac{\frac{1 + \alpha}{\alpha + 2}}{t_0}}{\alpha + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 12Initial program 99.8%
div-inv99.8%
+-commutative99.8%
associate-+l+99.8%
*-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-+r+99.8%
*-rgt-identity99.8%
+-commutative99.8%
distribute-rgt1-in99.8%
distribute-lft-in99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 98.6%
Taylor expanded in beta around 0 98.4%
+-commutative98.4%
Simplified98.4%
if 12 < beta Initial program 78.7%
div-inv78.7%
+-commutative78.7%
associate-+l+78.7%
*-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
Applied egg-rr78.7%
associate-*l/78.6%
associate-*r/78.7%
*-rgt-identity78.7%
associate-+r+78.7%
*-rgt-identity78.7%
+-commutative78.7%
distribute-rgt1-in78.7%
distribute-lft-in78.7%
+-commutative78.7%
+-commutative78.7%
*-commutative78.7%
+-commutative78.7%
+-commutative78.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.8%
Taylor expanded in beta around inf 83.2%
Final simplification93.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ beta (+ alpha 3.0))))
(if (<= beta 3.6)
(/ (/ 0.5 (+ alpha 2.0)) t_0)
(/ (/ (+ 1.0 alpha) (+ 2.0 (+ beta alpha))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = beta + (alpha + 3.0);
double tmp;
if (beta <= 3.6) {
tmp = (0.5 / (alpha + 2.0)) / t_0;
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / 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 = beta + (alpha + 3.0d0)
if (beta <= 3.6d0) then
tmp = (0.5d0 / (alpha + 2.0d0)) / t_0
else
tmp = ((1.0d0 + alpha) / (2.0d0 + (beta + alpha))) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = beta + (alpha + 3.0);
double tmp;
if (beta <= 3.6) {
tmp = (0.5 / (alpha + 2.0)) / t_0;
} else {
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = beta + (alpha + 3.0) tmp = 0 if beta <= 3.6: tmp = (0.5 / (alpha + 2.0)) / t_0 else: tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(beta + Float64(alpha + 3.0)) tmp = 0.0 if (beta <= 3.6) tmp = Float64(Float64(0.5 / Float64(alpha + 2.0)) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(2.0 + Float64(beta + alpha))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = beta + (alpha + 3.0);
tmp = 0.0;
if (beta <= 3.6)
tmp = (0.5 / (alpha + 2.0)) / t_0;
else
tmp = ((1.0 + alpha) / (2.0 + (beta + alpha))) / 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[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3.6], N[(N[(0.5 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \beta + \left(\alpha + 3\right)\\
\mathbf{if}\;\beta \leq 3.6:\\
\;\;\;\;\frac{\frac{0.5}{\alpha + 2}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{2 + \left(\beta + \alpha\right)}}{t_0}\\
\end{array}
\end{array}
if beta < 3.60000000000000009Initial program 99.8%
div-inv99.8%
+-commutative99.8%
associate-+l+99.8%
*-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-+r+99.8%
*-rgt-identity99.8%
+-commutative99.8%
distribute-rgt1-in99.8%
distribute-lft-in99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.8%
Taylor expanded in alpha around 0 83.6%
Taylor expanded in beta around 0 82.8%
+-commutative82.8%
Simplified82.8%
if 3.60000000000000009 < beta Initial program 78.7%
div-inv78.7%
+-commutative78.7%
associate-+l+78.7%
*-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
Applied egg-rr78.7%
associate-*l/78.6%
associate-*r/78.7%
*-rgt-identity78.7%
associate-+r+78.7%
*-rgt-identity78.7%
+-commutative78.7%
distribute-rgt1-in78.7%
distribute-lft-in78.7%
+-commutative78.7%
+-commutative78.7%
*-commutative78.7%
+-commutative78.7%
+-commutative78.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.8%
Taylor expanded in beta around inf 83.2%
Final simplification82.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.5) 0.08333333333333333 (+ (/ (/ 1.0 beta) beta) (/ alpha (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 / beta) / beta) + (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.5d0) then
tmp = 0.08333333333333333d0
else
tmp = ((1.0d0 / beta) / beta) + (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.5) {
tmp = 0.08333333333333333;
} else {
tmp = ((1.0 / beta) / beta) + (alpha / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.5: tmp = 0.08333333333333333 else: tmp = ((1.0 / beta) / beta) + (alpha / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.5) tmp = 0.08333333333333333; else tmp = Float64(Float64(Float64(1.0 / beta) / beta) + Float64(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.5)
tmp = 0.08333333333333333;
else
tmp = ((1.0 / beta) / beta) + (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.5], 0.08333333333333333, N[(N[(N[(1.0 / beta), $MachinePrecision] / beta), $MachinePrecision] + N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.5:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta} + \frac{\alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.5Initial 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/93.8%
Simplified93.8%
Taylor expanded in alpha around 0 64.1%
Taylor expanded in beta around 0 62.8%
*-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in alpha around 0 62.9%
if 3.5 < beta Initial program 78.7%
associate-/l/77.5%
associate-+l+77.5%
+-commutative77.5%
associate-+r+77.5%
associate-+l+77.5%
distribute-rgt1-in77.5%
*-rgt-identity77.5%
distribute-lft-out77.5%
+-commutative77.5%
associate-*l/88.6%
*-commutative88.6%
associate-*r/86.2%
Simplified86.2%
Taylor expanded in beta around inf 79.6%
unpow279.6%
Simplified79.6%
Taylor expanded in alpha around 0 79.6%
unpow279.6%
associate-/r*80.3%
unpow280.3%
Simplified80.3%
Final simplification68.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 13.5) (/ (/ 0.5 (+ alpha 2.0)) (+ beta (+ alpha 3.0))) (+ (/ (/ 1.0 beta) beta) (/ alpha (* beta beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 13.5) {
tmp = (0.5 / (alpha + 2.0)) / (beta + (alpha + 3.0));
} else {
tmp = ((1.0 / beta) / beta) + (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 <= 13.5d0) then
tmp = (0.5d0 / (alpha + 2.0d0)) / (beta + (alpha + 3.0d0))
else
tmp = ((1.0d0 / beta) / beta) + (alpha / (beta * beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 13.5) {
tmp = (0.5 / (alpha + 2.0)) / (beta + (alpha + 3.0));
} else {
tmp = ((1.0 / beta) / beta) + (alpha / (beta * beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 13.5: tmp = (0.5 / (alpha + 2.0)) / (beta + (alpha + 3.0)) else: tmp = ((1.0 / beta) / beta) + (alpha / (beta * beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 13.5) tmp = Float64(Float64(0.5 / Float64(alpha + 2.0)) / Float64(beta + Float64(alpha + 3.0))); else tmp = Float64(Float64(Float64(1.0 / beta) / beta) + Float64(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 <= 13.5)
tmp = (0.5 / (alpha + 2.0)) / (beta + (alpha + 3.0));
else
tmp = ((1.0 / beta) / beta) + (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, 13.5], N[(N[(0.5 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / beta), $MachinePrecision] / beta), $MachinePrecision] + N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 13.5:\\
\;\;\;\;\frac{\frac{0.5}{\alpha + 2}}{\beta + \left(\alpha + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta} + \frac{\alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 13.5Initial program 99.8%
div-inv99.8%
+-commutative99.8%
associate-+l+99.8%
*-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-+r+99.8%
*-rgt-identity99.8%
+-commutative99.8%
distribute-rgt1-in99.8%
distribute-lft-in99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.8%
Taylor expanded in alpha around 0 83.6%
Taylor expanded in beta around 0 82.8%
+-commutative82.8%
Simplified82.8%
if 13.5 < beta Initial program 78.7%
associate-/l/77.5%
associate-+l+77.5%
+-commutative77.5%
associate-+r+77.5%
associate-+l+77.5%
distribute-rgt1-in77.5%
*-rgt-identity77.5%
distribute-lft-out77.5%
+-commutative77.5%
associate-*l/88.6%
*-commutative88.6%
associate-*r/86.2%
Simplified86.2%
Taylor expanded in beta around inf 79.6%
unpow279.6%
Simplified79.6%
Taylor expanded in alpha around 0 79.6%
unpow279.6%
associate-/r*80.3%
unpow280.3%
Simplified80.3%
Final simplification82.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ beta (+ alpha 3.0))))
(if (<= beta 4.5)
(/ (/ 0.5 (+ alpha 2.0)) t_0)
(/ (/ (+ 1.0 alpha) beta) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = beta + (alpha + 3.0);
double tmp;
if (beta <= 4.5) {
tmp = (0.5 / (alpha + 2.0)) / t_0;
} else {
tmp = ((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 = beta + (alpha + 3.0d0)
if (beta <= 4.5d0) then
tmp = (0.5d0 / (alpha + 2.0d0)) / t_0
else
tmp = ((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 = beta + (alpha + 3.0);
double tmp;
if (beta <= 4.5) {
tmp = (0.5 / (alpha + 2.0)) / t_0;
} else {
tmp = ((1.0 + alpha) / beta) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = beta + (alpha + 3.0) tmp = 0 if beta <= 4.5: tmp = (0.5 / (alpha + 2.0)) / t_0 else: tmp = ((1.0 + alpha) / beta) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(beta + Float64(alpha + 3.0)) tmp = 0.0 if (beta <= 4.5) tmp = Float64(Float64(0.5 / Float64(alpha + 2.0)) / t_0); else tmp = 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 = beta + (alpha + 3.0);
tmp = 0.0;
if (beta <= 4.5)
tmp = (0.5 / (alpha + 2.0)) / t_0;
else
tmp = ((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[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 4.5], N[(N[(0.5 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \beta + \left(\alpha + 3\right)\\
\mathbf{if}\;\beta \leq 4.5:\\
\;\;\;\;\frac{\frac{0.5}{\alpha + 2}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 4.5Initial program 99.8%
div-inv99.8%
+-commutative99.8%
associate-+l+99.8%
*-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
metadata-eval99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-+r+99.8%
*-rgt-identity99.8%
+-commutative99.8%
distribute-rgt1-in99.8%
distribute-lft-in99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.8%
Taylor expanded in alpha around 0 83.6%
Taylor expanded in beta around 0 82.8%
+-commutative82.8%
Simplified82.8%
if 4.5 < beta Initial program 78.7%
div-inv78.7%
+-commutative78.7%
associate-+l+78.7%
*-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
Applied egg-rr78.7%
associate-*l/78.6%
associate-*r/78.7%
*-rgt-identity78.7%
associate-+r+78.7%
*-rgt-identity78.7%
+-commutative78.7%
distribute-rgt1-in78.7%
distribute-lft-in78.7%
+-commutative78.7%
+-commutative78.7%
*-commutative78.7%
+-commutative78.7%
+-commutative78.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in alpha around 0 99.8%
Taylor expanded in beta around inf 82.6%
Final simplification82.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.5) 0.08333333333333333 (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.08333333333333333;
} 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.5d0) then
tmp = 0.08333333333333333d0
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.5) {
tmp = 0.08333333333333333;
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.5: tmp = 0.08333333333333333 else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.5) tmp = 0.08333333333333333; 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.5)
tmp = 0.08333333333333333;
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.5], 0.08333333333333333, 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.5:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.5Initial 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/93.8%
Simplified93.8%
Taylor expanded in alpha around 0 64.1%
Taylor expanded in beta around 0 62.8%
*-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in alpha around 0 62.9%
if 3.5 < beta Initial program 78.7%
associate-/l/77.5%
associate-+l+77.5%
+-commutative77.5%
associate-+r+77.5%
associate-+l+77.5%
distribute-rgt1-in77.5%
*-rgt-identity77.5%
distribute-lft-out77.5%
+-commutative77.5%
associate-*l/88.6%
*-commutative88.6%
associate-*r/86.2%
Simplified86.2%
Taylor expanded in beta around inf 79.6%
unpow279.6%
Simplified79.6%
Final simplification68.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 9.6e+55) 0.08333333333333333 (/ alpha (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 9.6e+55) {
tmp = 0.08333333333333333;
} else {
tmp = 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 <= 9.6d+55) then
tmp = 0.08333333333333333d0
else
tmp = alpha / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 9.6e+55) {
tmp = 0.08333333333333333;
} else {
tmp = alpha / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 9.6e+55: tmp = 0.08333333333333333 else: tmp = alpha / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 9.6e+55) tmp = 0.08333333333333333; else tmp = Float64(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 <= 9.6e+55)
tmp = 0.08333333333333333;
else
tmp = 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, 9.6e+55], 0.08333333333333333, N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 9.6 \cdot 10^{+55}:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 9.5999999999999997e55Initial 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/93.9%
Simplified93.9%
Taylor expanded in alpha around 0 66.0%
Taylor expanded in beta around 0 57.7%
*-commutative57.7%
+-commutative57.7%
Simplified57.7%
Taylor expanded in alpha around 0 57.7%
if 9.5999999999999997e55 < beta Initial program 72.4%
associate-/l/70.9%
associate-+l+70.9%
+-commutative70.9%
associate-+r+70.9%
associate-+l+70.9%
distribute-rgt1-in70.9%
*-rgt-identity70.9%
distribute-lft-out70.9%
+-commutative70.9%
associate-*l/85.4%
*-commutative85.4%
associate-*r/83.8%
Simplified83.8%
Taylor expanded in beta around inf 80.6%
unpow280.6%
Simplified80.6%
Taylor expanded in alpha around inf 64.2%
unpow264.2%
Simplified64.2%
Final simplification59.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.5) 0.08333333333333333 (/ (/ 1.0 beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.08333333333333333;
} 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 <= 3.5d0) then
tmp = 0.08333333333333333d0
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 <= 3.5) {
tmp = 0.08333333333333333;
} else {
tmp = (1.0 / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.5: tmp = 0.08333333333333333 else: tmp = (1.0 / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.5) tmp = 0.08333333333333333; 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 <= 3.5)
tmp = 0.08333333333333333;
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, 3.5], 0.08333333333333333, N[(N[(1.0 / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.5:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 3.5Initial 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/93.8%
Simplified93.8%
Taylor expanded in alpha around 0 64.1%
Taylor expanded in beta around 0 62.8%
*-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in alpha around 0 62.9%
if 3.5 < beta Initial program 78.7%
associate-/l/77.5%
associate-+l+77.5%
+-commutative77.5%
associate-+r+77.5%
associate-+l+77.5%
distribute-rgt1-in77.5%
*-rgt-identity77.5%
distribute-lft-out77.5%
+-commutative77.5%
associate-*l/88.6%
*-commutative88.6%
associate-*r/86.2%
Simplified86.2%
Taylor expanded in beta around inf 79.6%
unpow279.6%
Simplified79.6%
Taylor expanded in alpha around 0 76.4%
unpow276.4%
associate-/r*77.0%
Simplified77.0%
Final simplification67.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 4.0) 0.08333333333333333 (/ 0.3333333333333333 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.3333333333333333 / 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.08333333333333333d0
else
tmp = 0.3333333333333333d0 / 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.08333333333333333;
} else {
tmp = 0.3333333333333333 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 4.0: tmp = 0.08333333333333333 else: tmp = 0.3333333333333333 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 4.0) tmp = 0.08333333333333333; else tmp = Float64(0.3333333333333333 / 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.08333333333333333;
else
tmp = 0.3333333333333333 / 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], 0.08333333333333333, N[(0.3333333333333333 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 4:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\beta}\\
\end{array}
\end{array}
if beta < 4Initial 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/93.8%
Simplified93.8%
Taylor expanded in alpha around 0 64.1%
Taylor expanded in beta around 0 62.8%
*-commutative62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in alpha around 0 62.9%
if 4 < beta Initial program 78.7%
div-inv78.7%
+-commutative78.7%
associate-+l+78.7%
*-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
metadata-eval78.7%
+-commutative78.7%
Applied egg-rr78.7%
associate-*l/78.6%
associate-*r/78.7%
*-rgt-identity78.7%
associate-+r+78.7%
*-rgt-identity78.7%
+-commutative78.7%
distribute-rgt1-in78.7%
distribute-lft-in78.7%
+-commutative78.7%
+-commutative78.7%
*-commutative78.7%
+-commutative78.7%
+-commutative78.7%
associate-*r/99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around 0 20.2%
Taylor expanded in beta around inf 7.5%
Taylor expanded in alpha around 0 7.5%
Final simplification45.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 0.08333333333333333)
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.08333333333333333;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.08333333333333333d0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.08333333333333333;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.08333333333333333
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return 0.08333333333333333 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.08333333333333333;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := 0.08333333333333333
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.08333333333333333
\end{array}
Initial program 93.3%
associate-/l/93.0%
associate-+l+93.0%
+-commutative93.0%
associate-+r+93.0%
associate-+l+93.0%
distribute-rgt1-in93.0%
*-rgt-identity93.0%
distribute-lft-out93.0%
+-commutative93.0%
associate-*l/96.4%
*-commutative96.4%
associate-*r/91.5%
Simplified91.5%
Taylor expanded in alpha around 0 70.2%
Taylor expanded in beta around 0 44.7%
*-commutative44.7%
+-commutative44.7%
Simplified44.7%
Taylor expanded in alpha around 0 44.8%
Final simplification44.8%
herbie shell --seed 2023192
(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)))