
(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 21 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 alpha) t_0) (/ (+ 1.0 beta) (+ alpha (+ beta 3.0)))) t_0)))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + alpha) / t_0) * ((1.0 + beta) / (alpha + (beta + 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 + alpha) / t_0) * ((1.0d0 + beta) / (alpha + (beta + 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 + alpha) / t_0) * ((1.0 + beta) / (alpha + (beta + 3.0)))) / t_0;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return (((1.0 + alpha) / t_0) * ((1.0 + beta) / (alpha + (beta + 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 + alpha) / t_0) * Float64(Float64(1.0 + beta) / Float64(alpha + Float64(beta + 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 + alpha) / t_0) * ((1.0 + beta) / (alpha + (beta + 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 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $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{1 + \alpha}{t\_0} \cdot \frac{1 + \beta}{\alpha + \left(\beta + 3\right)}}{t\_0}
\end{array}
\end{array}
Initial program 94.4%
Simplified83.2%
times-frac96.4%
+-commutative96.4%
Applied egg-rr96.4%
associate-*r/96.4%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.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 5.6)
(/ (/ (+ 1.0 alpha) (* (+ alpha 2.0) (+ alpha 3.0))) t_0)
(/ (/ (* (+ 1.0 alpha) (+ 1.0 (/ (- -2.0 alpha) beta))) t_0) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 5.6) {
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
} else {
tmp = (((1.0 + alpha) * (1.0 + ((-2.0 - alpha) / beta))) / t_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 <= 5.6d0) then
tmp = ((1.0d0 + alpha) / ((alpha + 2.0d0) * (alpha + 3.0d0))) / t_0
else
tmp = (((1.0d0 + alpha) * (1.0d0 + (((-2.0d0) - alpha) / beta))) / t_0) / 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 <= 5.6) {
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
} else {
tmp = (((1.0 + alpha) * (1.0 + ((-2.0 - alpha) / beta))) / t_0) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 5.6: tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0 else: tmp = (((1.0 + alpha) * (1.0 + ((-2.0 - alpha) / beta))) / t_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 <= 5.6) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))) / t_0); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 + Float64(Float64(-2.0 - alpha) / beta))) / t_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 <= 5.6)
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
else
tmp = (((1.0 + alpha) * (1.0 + ((-2.0 - alpha) / beta))) / t_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, 5.6], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 + N[(N[(-2.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 5.6:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(1 + \alpha\right) \cdot \left(1 + \frac{-2 - \alpha}{\beta}\right)}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if beta < 5.5999999999999996Initial program 99.8%
Simplified91.8%
times-frac99.5%
+-commutative99.5%
Applied egg-rr99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around 0 98.0%
if 5.5999999999999996 < beta Initial program 84.3%
Simplified67.0%
times-frac90.7%
+-commutative90.7%
Applied egg-rr90.7%
associate-*r/90.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*l/99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 87.3%
associate-*r/87.3%
distribute-lft-in87.3%
metadata-eval87.3%
mul-1-neg87.3%
unsub-neg87.3%
Simplified87.3%
Final simplification94.3%
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 11.5)
(/ (/ (+ 1.0 alpha) (* (+ alpha 2.0) (+ alpha 3.0))) t_0)
(* (/ (/ (+ 1.0 alpha) t_0) t_0) (+ 1.0 (/ (- -2.0 alpha) beta))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 11.5) {
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
} else {
tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 + ((-2.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 = alpha + (beta + 2.0d0)
if (beta <= 11.5d0) then
tmp = ((1.0d0 + alpha) / ((alpha + 2.0d0) * (alpha + 3.0d0))) / t_0
else
tmp = (((1.0d0 + alpha) / t_0) / t_0) * (1.0d0 + (((-2.0d0) - alpha) / beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 11.5) {
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
} else {
tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 + ((-2.0 - alpha) / beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 11.5: tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0 else: tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 + ((-2.0 - alpha) / beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 11.5) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))) / t_0); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0) * Float64(1.0 + Float64(Float64(-2.0 - alpha) / beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 11.5)
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
else
tmp = (((1.0 + alpha) / t_0) / t_0) * (1.0 + ((-2.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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 11.5], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 + N[(N[(-2.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 11.5:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0}}{t\_0} \cdot \left(1 + \frac{-2 - \alpha}{\beta}\right)\\
\end{array}
\end{array}
if beta < 11.5Initial program 99.8%
Simplified91.8%
times-frac99.5%
+-commutative99.5%
Applied egg-rr99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around 0 98.0%
if 11.5 < beta Initial program 84.3%
Simplified67.0%
times-frac90.7%
+-commutative90.7%
Applied egg-rr90.7%
associate-*r/90.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in beta around inf 87.4%
associate-*r/87.4%
distribute-lft-in87.4%
metadata-eval87.4%
mul-1-neg87.4%
Simplified87.4%
Final simplification94.3%
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 9.2)
(/ (/ (+ 1.0 alpha) (* (+ alpha 2.0) (+ alpha 3.0))) t_0)
(/ (* (/ (+ 1.0 alpha) t_0) (+ 1.0 (/ (- -2.0 alpha) beta))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 9.2) {
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 9.2d0) then
tmp = ((1.0d0 + alpha) / ((alpha + 2.0d0) * (alpha + 3.0d0))) / t_0
else
tmp = (((1.0d0 + alpha) / t_0) * (1.0d0 + (((-2.0d0) - alpha) / beta))) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 9.2) {
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 9.2: tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0 else: tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 9.2) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))) / t_0); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(1.0 + Float64(Float64(-2.0 - alpha) / beta))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 9.2)
tmp = ((1.0 + alpha) / ((alpha + 2.0) * (alpha + 3.0))) / t_0;
else
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-2.0 - alpha) / beta))) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 9.2], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 + N[(N[(-2.0 - alpha), $MachinePrecision] / beta), $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)\\
\mathbf{if}\;\beta \leq 9.2:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0} \cdot \left(1 + \frac{-2 - \alpha}{\beta}\right)}{t\_0}\\
\end{array}
\end{array}
if beta < 9.1999999999999993Initial program 99.8%
Simplified91.8%
times-frac99.5%
+-commutative99.5%
Applied egg-rr99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around 0 98.0%
if 9.1999999999999993 < beta Initial program 84.3%
Simplified67.0%
times-frac90.7%
+-commutative90.7%
Applied egg-rr90.7%
associate-*r/90.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*l/99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 87.4%
associate-*r/87.4%
distribute-lft-in87.4%
metadata-eval87.4%
mul-1-neg87.4%
Simplified87.4%
Final simplification94.3%
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 1.25e+15)
(/ (/ (+ 1.0 beta) (* (+ beta 2.0) (+ beta 3.0))) t_0)
(/
(* (/ (+ 1.0 beta) (+ alpha (+ beta 3.0))) (/ (+ 1.0 alpha) beta))
t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.25e+15) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = (((1.0 + beta) / (alpha + (beta + 3.0))) * ((1.0 + alpha) / beta)) / t_0;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = alpha + (beta + 2.0d0)
if (beta <= 1.25d+15) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) * (beta + 3.0d0))) / t_0
else
tmp = (((1.0d0 + beta) / (alpha + (beta + 3.0d0))) * ((1.0d0 + alpha) / beta)) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.25e+15) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = (((1.0 + beta) / (alpha + (beta + 3.0))) * ((1.0 + alpha) / beta)) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1.25e+15: tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0 else: tmp = (((1.0 + beta) / (alpha + (beta + 3.0))) * ((1.0 + alpha) / beta)) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 1.25e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))) / t_0); else tmp = Float64(Float64(Float64(Float64(1.0 + beta) / Float64(alpha + Float64(beta + 3.0))) * Float64(Float64(1.0 + alpha) / beta)) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 1.25e+15)
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
else
tmp = (((1.0 + beta) / (alpha + (beta + 3.0))) * ((1.0 + alpha) / beta)) / t_0;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.25e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / beta), $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)\\
\mathbf{if}\;\beta \leq 1.25 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\alpha + \left(\beta + 3\right)} \cdot \frac{1 + \alpha}{\beta}}{t\_0}\\
\end{array}
\end{array}
if beta < 1.25e15Initial program 99.8%
Simplified92.0%
times-frac99.5%
+-commutative99.5%
Applied egg-rr99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in alpha around 0 67.6%
+-commutative67.6%
+-commutative67.6%
Simplified67.6%
if 1.25e15 < beta Initial program 83.6%
Simplified65.5%
times-frac90.3%
+-commutative90.3%
Applied egg-rr90.3%
associate-*r/90.4%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 88.3%
Final simplification74.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (let* ((t_0 (+ alpha (+ beta 2.0)))) (* (/ (/ (+ 1.0 alpha) t_0) t_0) (/ (+ 1.0 beta) (+ 3.0 (+ alpha beta))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + 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
real(8) :: t_0
t_0 = alpha + (beta + 2.0d0)
code = (((1.0d0 + alpha) / t_0) / t_0) * ((1.0d0 + beta) / (3.0d0 + (alpha + beta)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(beta + 2.0)) return Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0) * Float64(Float64(1.0 + beta) / Float64(3.0 + Float64(alpha + beta)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)));
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 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\frac{\frac{1 + \alpha}{t\_0}}{t\_0} \cdot \frac{1 + \beta}{3 + \left(\alpha + \beta\right)}
\end{array}
\end{array}
Initial program 94.4%
Simplified83.2%
times-frac96.4%
+-commutative96.4%
Applied egg-rr96.4%
associate-*r/96.4%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 1.5e+15)
(/ (/ (+ 1.0 beta) (* (+ beta 2.0) (+ beta 3.0))) t_0)
(/ (/ (+ 1.0 alpha) t_0) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.5e+15) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((1.0 + alpha) / t_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 <= 1.5d+15) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) * (beta + 3.0d0))) / t_0
else
tmp = ((1.0d0 + alpha) / t_0) / 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 <= 1.5e+15) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1.5e+15: tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0 else: tmp = ((1.0 + alpha) / t_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 <= 1.5e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_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 <= 1.5e+15)
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
else
tmp = ((1.0 + alpha) / t_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, 1.5e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 1.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if beta < 1.5e15Initial program 99.8%
Simplified92.0%
times-frac99.5%
+-commutative99.5%
Applied egg-rr99.5%
associate-*r/99.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in alpha around 0 67.6%
+-commutative67.6%
+-commutative67.6%
Simplified67.6%
if 1.5e15 < beta Initial program 83.6%
Simplified65.5%
times-frac90.3%
+-commutative90.3%
Applied egg-rr90.3%
associate-*r/90.4%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 88.3%
Final simplification74.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 2.0))))
(if (<= beta 4.0)
(/ 1.0 (* t_0 (- 6.0 alpha)))
(/ (/ (+ 1.0 alpha) t_0) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 4.0) {
tmp = 1.0 / (t_0 * (6.0 - alpha));
} else {
tmp = ((1.0 + alpha) / t_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 <= 4.0d0) then
tmp = 1.0d0 / (t_0 * (6.0d0 - alpha))
else
tmp = ((1.0d0 + alpha) / t_0) / 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 <= 4.0) {
tmp = 1.0 / (t_0 * (6.0 - alpha));
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 4.0: tmp = 1.0 / (t_0 * (6.0 - alpha)) else: tmp = ((1.0 + alpha) / t_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 <= 4.0) tmp = Float64(1.0 / Float64(t_0 * Float64(6.0 - alpha))); else tmp = Float64(Float64(Float64(1.0 + alpha) / t_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 <= 4.0)
tmp = 1.0 / (t_0 * (6.0 - alpha));
else
tmp = ((1.0 + alpha) / t_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, 4.0], N[(1.0 / N[(t$95$0 * N[(6.0 - alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 4:\\
\;\;\;\;\frac{1}{t\_0 \cdot \left(6 - \alpha\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if beta < 4Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 83.2%
mul-1-neg83.2%
Simplified83.2%
if 4 < beta Initial program 84.3%
Simplified67.0%
times-frac90.7%
+-commutative90.7%
Applied egg-rr90.7%
associate-*r/90.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*l/99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 86.3%
Final simplification84.3%
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 1.3e+16)
(/ (/ (+ 1.0 beta) (+ beta 2.0)) (* (+ beta 2.0) (+ beta 3.0)))
(/ (/ (+ 1.0 alpha) t_0) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.3e+16) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / t_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 <= 1.3d+16) then
tmp = ((1.0d0 + beta) / (beta + 2.0d0)) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / t_0) / 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 <= 1.3e+16) {
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / t_0) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) tmp = 0 if beta <= 1.3e+16: tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / t_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 <= 1.3e+16) tmp = 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) / t_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 <= 1.3e+16)
tmp = ((1.0 + beta) / (beta + 2.0)) / ((beta + 2.0) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / t_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, 1.3e+16], 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], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 1.3 \cdot 10^{+16}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\beta + 2}}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t\_0}}{t\_0}\\
\end{array}
\end{array}
if beta < 1.3e16Initial program 99.8%
associate-/l/99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in alpha around 0 85.6%
+-commutative85.6%
Simplified85.6%
Taylor expanded in alpha around 0 66.3%
+-commutative66.3%
Simplified66.3%
if 1.3e16 < beta Initial program 83.6%
Simplified65.5%
times-frac90.3%
+-commutative90.3%
Applied egg-rr90.3%
associate-*r/90.4%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
Simplified99.7%
associate-*l/99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 88.3%
Final simplification73.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.2) (/ 1.0 (* (+ alpha (+ beta 2.0)) 6.0)) (/ (* (+ 1.0 alpha) (/ 1.0 beta)) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.2) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} else {
tmp = ((1.0 + alpha) * (1.0 / beta)) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 6.2d0) then
tmp = 1.0d0 / ((alpha + (beta + 2.0d0)) * 6.0d0)
else
tmp = ((1.0d0 + alpha) * (1.0d0 / beta)) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.2) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} else {
tmp = ((1.0 + alpha) * (1.0 / beta)) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.2: tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0) else: tmp = ((1.0 + alpha) * (1.0 / beta)) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.2) tmp = Float64(1.0 / Float64(Float64(alpha + Float64(beta + 2.0)) * 6.0)); else tmp = Float64(Float64(Float64(1.0 + alpha) * Float64(1.0 / beta)) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 6.2)
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
else
tmp = ((1.0 + alpha) * (1.0 / beta)) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 6.2], N[(1.0 / N[(N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6.2:\\
\;\;\;\;\frac{1}{\left(\alpha + \left(\beta + 2\right)\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + \alpha\right) \cdot \frac{1}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 6.20000000000000018Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 66.6%
if 6.20000000000000018 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
Taylor expanded in alpha around 0 85.8%
+-commutative85.8%
Simplified85.8%
div-inv85.8%
Applied egg-rr85.8%
Final simplification73.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.5) (/ 1.0 (* (+ alpha (+ beta 2.0)) 6.0)) (/ (/ (+ 1.0 alpha) beta) (+ beta (+ alpha 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.5) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} 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 <= 5.5d0) then
tmp = 1.0d0 / ((alpha + (beta + 2.0d0)) * 6.0d0)
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 <= 5.5) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} 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 <= 5.5: tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0) 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 <= 5.5) tmp = Float64(1.0 / Float64(Float64(alpha + Float64(beta + 2.0)) * 6.0)); 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 <= 5.5)
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
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, 5.5], N[(1.0 / N[(N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 6.0), $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 5.5:\\
\;\;\;\;\frac{1}{\left(\alpha + \left(\beta + 2\right)\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 5.5Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 66.6%
if 5.5 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
metadata-eval85.9%
associate-+l+85.9%
metadata-eval85.9%
+-commutative85.9%
associate-+r+85.9%
*-un-lft-identity85.9%
fma-define85.9%
Applied egg-rr85.9%
fma-undefine85.9%
*-lft-identity85.9%
+-commutative85.9%
Simplified85.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 4.9) (/ 1.0 (* (+ alpha (+ beta 2.0)) (- 6.0 alpha))) (/ (/ (+ 1.0 alpha) beta) (+ beta (+ alpha 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 4.9) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * (6.0 - alpha));
} 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 <= 4.9d0) then
tmp = 1.0d0 / ((alpha + (beta + 2.0d0)) * (6.0d0 - alpha))
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 <= 4.9) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * (6.0 - alpha));
} 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 <= 4.9: tmp = 1.0 / ((alpha + (beta + 2.0)) * (6.0 - alpha)) 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 <= 4.9) tmp = Float64(1.0 / Float64(Float64(alpha + Float64(beta + 2.0)) * Float64(6.0 - alpha))); 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 <= 4.9)
tmp = 1.0 / ((alpha + (beta + 2.0)) * (6.0 - alpha));
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, 4.9], N[(1.0 / N[(N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * N[(6.0 - alpha), $MachinePrecision]), $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 4.9:\\
\;\;\;\;\frac{1}{\left(\alpha + \left(\beta + 2\right)\right) \cdot \left(6 - \alpha\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 4.9000000000000004Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 83.2%
mul-1-neg83.2%
Simplified83.2%
if 4.9000000000000004 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
metadata-eval85.9%
associate-+l+85.9%
metadata-eval85.9%
+-commutative85.9%
associate-+r+85.9%
*-un-lft-identity85.9%
fma-define85.9%
Applied egg-rr85.9%
fma-undefine85.9%
*-lft-identity85.9%
+-commutative85.9%
Simplified85.9%
Final simplification84.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.2) (/ 1.0 (* (+ alpha (+ beta 2.0)) 6.0)) (/ (/ (+ 1.0 alpha) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.2) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 8.2d0) then
tmp = 1.0d0 / ((alpha + (beta + 2.0d0)) * 6.0d0)
else
tmp = ((1.0d0 + alpha) / beta) / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 8.2) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.2: tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0) else: tmp = ((1.0 + alpha) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.2) tmp = Float64(1.0 / Float64(Float64(alpha + Float64(beta + 2.0)) * 6.0)); 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 <= 8.2)
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
else
tmp = ((1.0 + alpha) / beta) / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 8.2], N[(1.0 / N[(N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 6.0), $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 8.2:\\
\;\;\;\;\frac{1}{\left(\alpha + \left(\beta + 2\right)\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 8.1999999999999993Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 66.6%
if 8.1999999999999993 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
Taylor expanded in alpha around -inf 80.1%
associate-*r*80.1%
mul-1-neg80.1%
sub-neg80.1%
associate-*r/80.1%
mul-1-neg80.1%
distribute-neg-in80.1%
unsub-neg80.1%
metadata-eval80.1%
metadata-eval80.1%
Simplified80.1%
Taylor expanded in beta around inf 85.7%
Final simplification73.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.6) (/ 1.0 (* (+ alpha (+ beta 2.0)) 6.0)) (/ (/ (+ 1.0 alpha) beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.6) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.6d0) then
tmp = 1.0d0 / ((alpha + (beta + 2.0d0)) * 6.0d0)
else
tmp = ((1.0d0 + alpha) / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.6) {
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
} else {
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.6: tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0) else: tmp = ((1.0 + alpha) / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.6) tmp = Float64(1.0 / Float64(Float64(alpha + Float64(beta + 2.0)) * 6.0)); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.6)
tmp = 1.0 / ((alpha + (beta + 2.0)) * 6.0);
else
tmp = ((1.0 + alpha) / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.6], N[(1.0 / N[(N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.6:\\
\;\;\;\;\frac{1}{\left(\alpha + \left(\beta + 2\right)\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 5.5999999999999996Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 66.6%
if 5.5999999999999996 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
Taylor expanded in alpha around 0 85.8%
+-commutative85.8%
Simplified85.8%
Final simplification73.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.4) (/ 1.0 (* (+ beta 2.0) 6.0)) (/ 1.0 (* beta (+ beta 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 1.0 / ((beta + 2.0) * 6.0);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.4d0) then
tmp = 1.0d0 / ((beta + 2.0d0) * 6.0d0)
else
tmp = 1.0d0 / (beta * (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 1.0 / ((beta + 2.0) * 6.0);
} else {
tmp = 1.0 / (beta * (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.4: tmp = 1.0 / ((beta + 2.0) * 6.0) else: tmp = 1.0 / (beta * (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.4) tmp = Float64(1.0 / Float64(Float64(beta + 2.0) * 6.0)); else tmp = Float64(1.0 / Float64(beta * Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.4)
tmp = 1.0 / ((beta + 2.0) * 6.0);
else
tmp = 1.0 / (beta * (beta + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.4], N[(1.0 / N[(N[(beta + 2.0), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.4:\\
\;\;\;\;\frac{1}{\left(\beta + 2\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 5.4000000000000004Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 64.9%
if 5.4000000000000004 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
Taylor expanded in alpha around 0 80.4%
+-commutative80.4%
Simplified80.4%
Final simplification70.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 5.4) (/ 1.0 (* (+ beta 2.0) 6.0)) (/ (/ 1.0 beta) (+ beta 3.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 1.0 / ((beta + 2.0) * 6.0);
} else {
tmp = (1.0 / beta) / (beta + 3.0);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 5.4d0) then
tmp = 1.0d0 / ((beta + 2.0d0) * 6.0d0)
else
tmp = (1.0d0 / beta) / (beta + 3.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 5.4) {
tmp = 1.0 / ((beta + 2.0) * 6.0);
} else {
tmp = (1.0 / beta) / (beta + 3.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.4: tmp = 1.0 / ((beta + 2.0) * 6.0) else: tmp = (1.0 / beta) / (beta + 3.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.4) tmp = Float64(1.0 / Float64(Float64(beta + 2.0) * 6.0)); else tmp = Float64(Float64(1.0 / beta) / Float64(beta + 3.0)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 5.4)
tmp = 1.0 / ((beta + 2.0) * 6.0);
else
tmp = (1.0 / beta) / (beta + 3.0);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 5.4], N[(1.0 / N[(N[(beta + 2.0), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.4:\\
\;\;\;\;\frac{1}{\left(\beta + 2\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 3}\\
\end{array}
\end{array}
if beta < 5.4000000000000004Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 64.9%
if 5.4000000000000004 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
clear-num85.2%
inv-pow85.2%
metadata-eval85.2%
associate-+l+85.2%
metadata-eval85.2%
+-commutative85.2%
+-commutative85.2%
associate-+r+85.2%
Applied egg-rr85.2%
unpow-185.2%
associate-/r/85.2%
+-commutative85.2%
+-commutative85.2%
Simplified85.2%
Taylor expanded in alpha around 0 80.4%
associate-/r*81.0%
+-commutative81.0%
Simplified81.0%
Final simplification70.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 8.0) (/ 1.0 (* (+ beta 2.0) 6.0)) (/ (/ (+ 1.0 alpha) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 1.0 / ((beta + 2.0) * 6.0);
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 8.0d0) then
tmp = 1.0d0 / ((beta + 2.0d0) * 6.0d0)
else
tmp = ((1.0d0 + alpha) / beta) / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 8.0) {
tmp = 1.0 / ((beta + 2.0) * 6.0);
} else {
tmp = ((1.0 + alpha) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 8.0: tmp = 1.0 / ((beta + 2.0) * 6.0) else: tmp = ((1.0 + alpha) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 8.0) tmp = Float64(1.0 / Float64(Float64(beta + 2.0) * 6.0)); 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 <= 8.0)
tmp = 1.0 / ((beta + 2.0) * 6.0);
else
tmp = ((1.0 + alpha) / beta) / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 8.0], N[(1.0 / N[(N[(beta + 2.0), $MachinePrecision] * 6.0), $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 8:\\
\;\;\;\;\frac{1}{\left(\beta + 2\right) \cdot 6}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 8Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 64.9%
if 8 < beta Initial program 84.3%
Taylor expanded in beta around inf 85.9%
Taylor expanded in alpha around -inf 80.1%
associate-*r*80.1%
mul-1-neg80.1%
sub-neg80.1%
associate-*r/80.1%
mul-1-neg80.1%
distribute-neg-in80.1%
unsub-neg80.1%
metadata-eval80.1%
metadata-eval80.1%
Simplified80.1%
Taylor expanded in beta around inf 85.7%
Final simplification72.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.0) 0.08333333333333333 (/ 0.16666666666666666 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.16666666666666666 / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.0d0) then
tmp = 0.08333333333333333d0
else
tmp = 0.16666666666666666d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.0) {
tmp = 0.08333333333333333;
} else {
tmp = 0.16666666666666666 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.0: tmp = 0.08333333333333333 else: tmp = 0.16666666666666666 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.0) tmp = 0.08333333333333333; else tmp = Float64(0.16666666666666666 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.0)
tmp = 0.08333333333333333;
else
tmp = 0.16666666666666666 / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.0], 0.08333333333333333, N[(0.16666666666666666 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{0.16666666666666666}{\beta}\\
\end{array}
\end{array}
if beta < 2Initial program 99.8%
Simplified91.8%
associate-+r+91.8%
fma-undefine91.8%
*-commutative91.8%
associate-+l+91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
associate-*r*91.8%
associate-+r+91.8%
+-commutative91.8%
associate-/l/99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
associate-/l*99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
fma-undefine99.5%
+-commutative99.5%
*-commutative99.5%
+-commutative99.5%
associate-+r+99.5%
distribute-lft1-in99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 64.9%
+-commutative64.9%
Simplified64.9%
Taylor expanded in beta around 0 64.9%
if 2 < beta Initial program 84.3%
Simplified67.0%
associate-+r+67.0%
fma-undefine67.0%
*-commutative67.0%
associate-+l+67.0%
+-commutative67.0%
associate-+l+67.0%
*-commutative67.0%
associate-*r*67.0%
associate-+r+67.0%
+-commutative67.0%
associate-/l/81.3%
clear-num81.3%
inv-pow81.3%
Applied egg-rr81.3%
unpow-181.3%
associate-/l*83.6%
+-commutative83.6%
+-commutative83.6%
+-commutative83.6%
associate-+r+83.6%
+-commutative83.6%
+-commutative83.6%
+-commutative83.6%
fma-undefine83.6%
+-commutative83.6%
*-commutative83.6%
+-commutative83.6%
associate-+r+83.6%
distribute-lft1-in83.6%
+-commutative83.6%
+-commutative83.6%
+-commutative83.6%
+-commutative83.6%
Simplified83.6%
Taylor expanded in beta around 0 16.0%
Taylor expanded in alpha around 0 7.5%
+-commutative7.5%
Simplified7.5%
Taylor expanded in beta around inf 7.5%
Final simplification44.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 (* (+ beta 2.0) 6.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / ((beta + 2.0) * 6.0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 1.0d0 / ((beta + 2.0d0) * 6.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / ((beta + 2.0) * 6.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / ((beta + 2.0) * 6.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / Float64(Float64(beta + 2.0) * 6.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / ((beta + 2.0) * 6.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / N[(N[(beta + 2.0), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\left(\beta + 2\right) \cdot 6}
\end{array}
Initial program 94.4%
Simplified83.2%
associate-+r+83.2%
fma-undefine83.2%
*-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-+l+83.2%
*-commutative83.2%
associate-*r*83.2%
associate-+r+83.2%
+-commutative83.2%
associate-/l/93.2%
clear-num93.1%
inv-pow93.1%
Applied egg-rr93.2%
unpow-193.2%
associate-/l*94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
fma-undefine94.0%
+-commutative94.0%
*-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
distribute-lft1-in94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
Simplified94.0%
Taylor expanded in beta around 0 69.5%
Taylor expanded in alpha around 0 45.2%
Final simplification45.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ beta 2.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (beta + 2.0);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.16666666666666666d0 / (beta + 2.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (beta + 2.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (beta + 2.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(beta + 2.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (beta + 2.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{\beta + 2}
\end{array}
Initial program 94.4%
Simplified83.2%
associate-+r+83.2%
fma-undefine83.2%
*-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-+l+83.2%
*-commutative83.2%
associate-*r*83.2%
associate-+r+83.2%
+-commutative83.2%
associate-/l/93.2%
clear-num93.1%
inv-pow93.1%
Applied egg-rr93.2%
unpow-193.2%
associate-/l*94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
fma-undefine94.0%
+-commutative94.0%
*-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
distribute-lft1-in94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
Simplified94.0%
Taylor expanded in beta around 0 69.5%
Taylor expanded in alpha around 0 44.9%
+-commutative44.9%
Simplified44.9%
Final simplification44.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 0.08333333333333333)
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.08333333333333333;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.08333333333333333d0
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.08333333333333333;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.08333333333333333
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return 0.08333333333333333 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.08333333333333333;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := 0.08333333333333333
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.08333333333333333
\end{array}
Initial program 94.4%
Simplified83.2%
associate-+r+83.2%
fma-undefine83.2%
*-commutative83.2%
associate-+l+83.2%
+-commutative83.2%
associate-+l+83.2%
*-commutative83.2%
associate-*r*83.2%
associate-+r+83.2%
+-commutative83.2%
associate-/l/93.2%
clear-num93.1%
inv-pow93.1%
Applied egg-rr93.2%
unpow-193.2%
associate-/l*94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
fma-undefine94.0%
+-commutative94.0%
*-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
distribute-lft1-in94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
Simplified94.0%
Taylor expanded in beta around 0 69.5%
Taylor expanded in alpha around 0 44.9%
+-commutative44.9%
Simplified44.9%
Taylor expanded in beta around 0 43.7%
Final simplification43.7%
herbie shell --seed 2024073
(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)))