
(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 beta) (/ (/ (+ 1.0 alpha) t_0) (+ 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 + beta) * (((1.0 + alpha) / t_0) / (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 + beta) * (((1.0d0 + alpha) / t_0) / (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 + beta) * (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0)))) / t_0;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return ((1.0 + beta) * (((1.0 + alpha) / t_0) / (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(1.0 + beta) * Float64(Float64(Float64(1.0 + alpha) / t_0) / 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 + beta) * (((1.0 + alpha) / t_0) / (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[(1.0 + beta), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $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{\left(1 + \beta\right) \cdot \frac{\frac{1 + \alpha}{t_0}}{\alpha + \left(\beta + 3\right)}}{t_0}
\end{array}
\end{array}
Initial program 94.1%
associate-/l/92.9%
associate-/r*84.0%
+-commutative84.0%
associate-+l+84.0%
associate-+r+84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
times-frac96.3%
Simplified96.3%
associate-*l/96.3%
+-commutative96.3%
associate-+r+96.3%
associate-/r*99.8%
associate-+r+99.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 1e+154)
(* (/ (+ 1.0 beta) t_0) (/ (+ 1.0 alpha) (* t_0 (+ alpha (+ beta 3.0)))))
(*
(/ (+ 1.0 alpha) (+ 3.0 (+ beta alpha)))
(/ (+ 1.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 <= 1e+154) {
tmp = ((1.0 + beta) / t_0) * ((1.0 + alpha) / (t_0 * (alpha + (beta + 3.0))));
} else {
tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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 <= 1d+154) then
tmp = ((1.0d0 + beta) / t_0) * ((1.0d0 + alpha) / (t_0 * (alpha + (beta + 3.0d0))))
else
tmp = ((1.0d0 + alpha) / (3.0d0 + (beta + alpha))) * ((1.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 <= 1e+154) {
tmp = ((1.0 + beta) / t_0) * ((1.0 + alpha) / (t_0 * (alpha + (beta + 3.0))));
} else {
tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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 <= 1e+154: tmp = ((1.0 + beta) / t_0) * ((1.0 + alpha) / (t_0 * (alpha + (beta + 3.0)))) else: tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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 <= 1e+154) tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(1.0 + alpha) / Float64(t_0 * Float64(alpha + Float64(beta + 3.0))))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(3.0 + Float64(beta + alpha))) * Float64(Float64(1.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 <= 1e+154)
tmp = ((1.0 + beta) / t_0) * ((1.0 + alpha) / (t_0 * (alpha + (beta + 3.0))));
else
tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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, 1e+154], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / N[(t$95$0 * N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(3.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 10^{+154}:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \frac{1 + \alpha}{t_0 \cdot \left(\alpha + \left(\beta + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{3 + \left(\beta + \alpha\right)} \cdot \frac{1 + \frac{-1 - \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 1.00000000000000004e154Initial program 99.3%
associate-/l/98.6%
associate-/r*88.1%
+-commutative88.1%
associate-+l+88.1%
associate-+r+88.1%
*-commutative88.1%
distribute-rgt1-in88.1%
+-commutative88.1%
*-commutative88.1%
distribute-rgt1-in88.1%
+-commutative88.1%
times-frac99.0%
Simplified99.0%
if 1.00000000000000004e154 < beta Initial program 70.0%
associate-/l/66.8%
associate-/r*65.1%
+-commutative65.1%
associate-+l+65.1%
associate-+r+65.1%
*-commutative65.1%
distribute-rgt1-in65.1%
+-commutative65.1%
*-commutative65.1%
distribute-rgt1-in65.1%
+-commutative65.1%
times-frac83.8%
Simplified83.8%
associate-*r/83.8%
+-commutative83.8%
Applied egg-rr83.8%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 87.7%
mul-1-neg87.7%
unsub-neg87.7%
Simplified87.7%
Final simplification97.0%
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 10.2)
(/ (/ (/ (+ 1.0 alpha) (+ alpha 2.0)) (+ alpha 3.0)) t_0)
(*
(/ (+ 1.0 alpha) (+ 3.0 (+ beta alpha)))
(/ (+ 1.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 <= 10.2) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / t_0;
} else {
tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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 <= 10.2d0) then
tmp = (((1.0d0 + alpha) / (alpha + 2.0d0)) / (alpha + 3.0d0)) / t_0
else
tmp = ((1.0d0 + alpha) / (3.0d0 + (beta + alpha))) * ((1.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 <= 10.2) {
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / t_0;
} else {
tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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 <= 10.2: tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / t_0 else: tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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 <= 10.2) tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0)) / Float64(alpha + 3.0)) / t_0); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(3.0 + Float64(beta + alpha))) * Float64(Float64(1.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 <= 10.2)
tmp = (((1.0 + alpha) / (alpha + 2.0)) / (alpha + 3.0)) / t_0;
else
tmp = ((1.0 + alpha) / (3.0 + (beta + alpha))) * ((1.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, 10.2], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(3.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 10.2:\\
\;\;\;\;\frac{\frac{\frac{1 + \alpha}{\alpha + 2}}{\alpha + 3}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{3 + \left(\beta + \alpha\right)} \cdot \frac{1 + \frac{-1 - \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 10.199999999999999Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in beta around 0 97.6%
associate-/r*98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
if 10.199999999999999 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*r/90.3%
+-commutative90.3%
Applied egg-rr90.3%
times-frac99.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 82.6%
mul-1-neg82.6%
unsub-neg82.6%
Simplified82.6%
Final simplification92.7%
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) t_0) (/ (+ 1.0 alpha) (+ 3.0 (+ beta alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 2.0);
return (((1.0 + beta) / t_0) / t_0) * ((1.0 + alpha) / (3.0 + (beta + alpha)));
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = alpha + (beta + 2.0d0)
code = (((1.0d0 + beta) / t_0) / t_0) * ((1.0d0 + alpha) / (3.0d0 + (beta + alpha)))
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) / t_0) * ((1.0 + alpha) / (3.0 + (beta + alpha)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 2.0) return (((1.0 + beta) / t_0) / t_0) * ((1.0 + alpha) / (3.0 + (beta + alpha)))
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) / t_0) / t_0) * Float64(Float64(1.0 + alpha) / Float64(3.0 + Float64(beta + alpha)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (beta + 2.0);
tmp = (((1.0 + beta) / t_0) / t_0) * ((1.0 + alpha) / (3.0 + (beta + alpha)));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / N[(3.0 + N[(beta + alpha), $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 + \beta}{t_0}}{t_0} \cdot \frac{1 + \alpha}{3 + \left(\beta + \alpha\right)}
\end{array}
\end{array}
Initial program 94.1%
associate-/l/92.9%
associate-/r*84.0%
+-commutative84.0%
associate-+l+84.0%
associate-+r+84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
times-frac96.3%
Simplified96.3%
associate-*r/96.3%
+-commutative96.3%
Applied egg-rr96.3%
times-frac99.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.25e+15)
(/ (* (+ 1.0 beta) (/ 1.0 (* (+ beta 2.0) (+ beta 3.0)))) t_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) * (1.0 / ((beta + 2.0) * (beta + 3.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 = alpha + (beta + 2.0d0)
if (beta <= 1.25d+15) then
tmp = ((1.0d0 + beta) * (1.0d0 / ((beta + 2.0d0) * (beta + 3.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 = alpha + (beta + 2.0);
double tmp;
if (beta <= 1.25e+15) {
tmp = ((1.0 + beta) * (1.0 / ((beta + 2.0) * (beta + 3.0)))) / t_0;
} else {
tmp = ((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) * (1.0 / ((beta + 2.0) * (beta + 3.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(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 1.25e+15) tmp = Float64(Float64(Float64(1.0 + beta) * Float64(1.0 / Float64(Float64(beta + 2.0) * Float64(beta + 3.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 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 1.25e+15)
tmp = ((1.0 + beta) * (1.0 / ((beta + 2.0) * (beta + 3.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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.25e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] * N[(1.0 / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $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 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 1.25 \cdot 10^{+15}:\\
\;\;\;\;\frac{\left(1 + \beta\right) \cdot \frac{1}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 1.25e15Initial program 99.8%
associate-/l/99.5%
associate-/r*93.6%
+-commutative93.6%
associate-+l+93.6%
associate-+r+93.6%
*-commutative93.6%
distribute-rgt1-in93.6%
+-commutative93.6%
*-commutative93.6%
distribute-rgt1-in93.6%
+-commutative93.6%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.8%
if 1.25e15 < beta Initial program 82.7%
associate-/l/79.8%
associate-/r*64.9%
+-commutative64.9%
associate-+l+64.9%
associate-+r+64.9%
*-commutative64.9%
distribute-rgt1-in64.9%
+-commutative64.9%
*-commutative64.9%
distribute-rgt1-in64.9%
+-commutative64.9%
times-frac90.1%
Simplified90.1%
associate-*l/90.0%
+-commutative90.0%
associate-+r+90.0%
associate-/r*99.7%
associate-+r+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 84.1%
Final simplification73.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 1.7e+16) (/ (+ 1.0 beta) (* (* (+ beta 2.0) (+ beta 3.0)) (+ 2.0 (+ beta alpha)))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 2.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 1.7e+16) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (2.0 + (beta + alpha)));
} else {
tmp = ((1.0 + alpha) / beta) / (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 <= 1.7d+16) then
tmp = (1.0d0 + beta) / (((beta + 2.0d0) * (beta + 3.0d0)) * (2.0d0 + (beta + alpha)))
else
tmp = ((1.0d0 + alpha) / beta) / (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 <= 1.7e+16) {
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (2.0 + (beta + alpha)));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 2.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 1.7e+16: tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (2.0 + (beta + alpha))) else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 2.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 1.7e+16) tmp = Float64(Float64(1.0 + beta) / Float64(Float64(Float64(beta + 2.0) * Float64(beta + 3.0)) * Float64(2.0 + Float64(beta + alpha)))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / 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 <= 1.7e+16)
tmp = (1.0 + beta) / (((beta + 2.0) * (beta + 3.0)) * (2.0 + (beta + alpha)));
else
tmp = ((1.0 + alpha) / beta) / (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, 1.7e+16], N[(N[(1.0 + beta), $MachinePrecision] / N[(N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.7 \cdot 10^{+16}:\\
\;\;\;\;\frac{1 + \beta}{\left(\left(\beta + 2\right) \cdot \left(\beta + 3\right)\right) \cdot \left(2 + \left(\beta + \alpha\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 2\right)}\\
\end{array}
\end{array}
if beta < 1.7e16Initial program 99.8%
associate-/l/99.5%
associate-/r*93.6%
+-commutative93.6%
associate-+l+93.6%
associate-+r+93.6%
*-commutative93.6%
distribute-rgt1-in93.6%
+-commutative93.6%
*-commutative93.6%
distribute-rgt1-in93.6%
+-commutative93.6%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.8%
expm1-log1p-u68.8%
expm1-udef79.9%
un-div-inv79.9%
+-commutative79.9%
*-commutative79.9%
+-commutative79.9%
Applied egg-rr79.9%
expm1-def68.8%
expm1-log1p68.8%
associate-/l/68.7%
associate-+r+68.7%
+-commutative68.7%
+-commutative68.7%
*-commutative68.7%
Simplified68.7%
if 1.7e16 < beta Initial program 82.7%
associate-/l/79.8%
associate-/r*64.9%
+-commutative64.9%
associate-+l+64.9%
associate-+r+64.9%
*-commutative64.9%
distribute-rgt1-in64.9%
+-commutative64.9%
*-commutative64.9%
distribute-rgt1-in64.9%
+-commutative64.9%
times-frac90.1%
Simplified90.1%
associate-*l/90.0%
+-commutative90.0%
associate-+r+90.0%
associate-/r*99.7%
associate-+r+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 84.1%
Final simplification73.9%
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 6e+15)
(/ (/ (+ 1.0 beta) (* (+ beta 2.0) (+ beta 3.0))) t_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 <= 6e+15) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.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 = alpha + (beta + 2.0d0)
if (beta <= 6d+15) then
tmp = ((1.0d0 + beta) / ((beta + 2.0d0) * (beta + 3.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 = alpha + (beta + 2.0);
double tmp;
if (beta <= 6e+15) {
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.0))) / t_0;
} else {
tmp = ((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 <= 6e+15: tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.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(alpha + Float64(beta + 2.0)) tmp = 0.0 if (beta <= 6e+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) / 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 <= 6e+15)
tmp = ((1.0 + beta) / ((beta + 2.0) * (beta + 3.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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 6e+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] / beta), $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 6 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{1 + \beta}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 6e15Initial program 99.8%
associate-/l/99.5%
associate-/r*93.6%
+-commutative93.6%
associate-+l+93.6%
associate-+r+93.6%
*-commutative93.6%
distribute-rgt1-in93.6%
+-commutative93.6%
*-commutative93.6%
distribute-rgt1-in93.6%
+-commutative93.6%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.8%
if 6e15 < beta Initial program 82.7%
associate-/l/79.8%
associate-/r*64.9%
+-commutative64.9%
associate-+l+64.9%
associate-+r+64.9%
*-commutative64.9%
distribute-rgt1-in64.9%
+-commutative64.9%
*-commutative64.9%
distribute-rgt1-in64.9%
+-commutative64.9%
times-frac90.1%
Simplified90.1%
associate-*l/90.0%
+-commutative90.0%
associate-+r+90.0%
associate-/r*99.7%
associate-+r+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 84.1%
Final simplification73.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.4) (/ (/ (+ 1.0 alpha) (+ alpha 2.0)) (* (+ alpha 2.0) (+ alpha 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ 1.0 (+ 2.0 (+ beta alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.4d0) then
tmp = ((1.0d0 + alpha) / (alpha + 2.0d0)) / ((alpha + 2.0d0) * (alpha + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.4: tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.4) tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + 2.0)) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.4)
tmp = ((1.0 + alpha) / (alpha + 2.0)) / ((alpha + 2.0) * (alpha + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.4], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.4:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + 2}}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 2.39999999999999991Initial program 99.8%
associate-/l/99.5%
associate-+l+99.5%
*-commutative99.5%
+-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
+-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in beta around 0 98.0%
+-commutative81.1%
+-commutative81.1%
Simplified98.0%
if 2.39999999999999991 < beta Initial program 83.2%
Taylor expanded in beta around inf 81.8%
Final simplification92.4%
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.66)
(/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) t_0)
(if (<= beta 2e+156)
(/ (+ 1.0 alpha) (* (+ beta 2.0) (+ beta 3.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.66) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
} else if (beta <= 2e+156) {
tmp = (1.0 + alpha) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = (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.66d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / t_0
else if (beta <= 2d+156) then
tmp = (1.0d0 + alpha) / ((beta + 2.0d0) * (beta + 3.0d0))
else
tmp = (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.66) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
} else if (beta <= 2e+156) {
tmp = (1.0 + alpha) / ((beta + 2.0) * (beta + 3.0));
} else {
tmp = (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.66: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0 elif beta <= 2e+156: tmp = (1.0 + alpha) / ((beta + 2.0) * (beta + 3.0)) else: tmp = (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.66) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / t_0); elseif (beta <= 2e+156) tmp = Float64(Float64(1.0 + alpha) / Float64(Float64(beta + 2.0) * Float64(beta + 3.0))); else tmp = Float64(Float64(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.66)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
elseif (beta <= 2e+156)
tmp = (1.0 + alpha) / ((beta + 2.0) * (beta + 3.0));
else
tmp = (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.66], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[beta, 2e+156], N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(beta + 2.0), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(alpha / beta), $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.66:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{t_0}\\
\mathbf{elif}\;\beta \leq 2 \cdot 10^{+156}:\\
\;\;\;\;\frac{1 + \alpha}{\left(\beta + 2\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 1.65999999999999992Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.8%
Taylor expanded in beta around 0 68.2%
*-commutative68.2%
Simplified68.2%
if 1.65999999999999992 < beta < 2e156Initial program 97.4%
associate-/l/95.2%
associate-+l+95.2%
*-commutative95.2%
+-commutative95.2%
metadata-eval95.2%
associate-+l+95.2%
metadata-eval95.2%
associate-+l+95.2%
metadata-eval95.2%
+-commutative95.2%
metadata-eval95.2%
associate-+l+95.2%
Simplified95.2%
Taylor expanded in beta around inf 84.6%
Taylor expanded in alpha around 0 75.4%
if 2e156 < beta Initial program 69.4%
associate-/l/66.1%
associate-/r*66.1%
+-commutative66.1%
associate-+l+66.1%
associate-+r+66.1%
*-commutative66.1%
distribute-rgt1-in66.1%
+-commutative66.1%
*-commutative66.1%
distribute-rgt1-in66.1%
+-commutative66.1%
times-frac83.4%
Simplified83.4%
associate-*l/83.4%
+-commutative83.4%
associate-+r+83.4%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 87.7%
Taylor expanded in alpha around inf 87.0%
Final simplification72.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 16.0) (/ (+ 0.5 (* alpha 0.25)) (* (+ alpha 2.0) (+ alpha 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 2.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 16.0) {
tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (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 <= 16.0d0) then
tmp = (0.5d0 + (alpha * 0.25d0)) / ((alpha + 2.0d0) * (alpha + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (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 <= 16.0) {
tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 2.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 16.0: tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (alpha + (beta + 2.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 16.0) tmp = Float64(Float64(0.5 + Float64(alpha * 0.25)) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / 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 <= 16.0)
tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (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, 16.0], N[(N[(0.5 + N[(alpha * 0.25), $MachinePrecision]), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 16:\\
\;\;\;\;\frac{0.5 + \alpha \cdot 0.25}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 2\right)}\\
\end{array}
\end{array}
if beta < 16Initial program 99.8%
associate-/l/99.5%
associate-+l+99.5%
*-commutative99.5%
+-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
+-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in beta around 0 97.6%
Taylor expanded in alpha around 0 80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in beta around 0 80.7%
+-commutative80.7%
+-commutative80.7%
Simplified80.7%
if 16 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*l/90.2%
+-commutative90.2%
associate-+r+90.2%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.5%
Final simplification81.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 2.4) (/ (+ 0.5 (* alpha 0.25)) (* (+ alpha 2.0) (+ alpha 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ 1.0 (+ 2.0 (+ beta alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.4d0) then
tmp = (0.5d0 + (alpha * 0.25d0)) / ((alpha + 2.0d0) * (alpha + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (1.0d0 + (2.0d0 + (beta + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.4) {
tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.4: tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.4) tmp = Float64(Float64(0.5 + Float64(alpha * 0.25)) / Float64(Float64(alpha + 2.0) * Float64(alpha + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(1.0 + Float64(2.0 + Float64(beta + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.4)
tmp = (0.5 + (alpha * 0.25)) / ((alpha + 2.0) * (alpha + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (1.0 + (2.0 + (beta + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.4], N[(N[(0.5 + N[(alpha * 0.25), $MachinePrecision]), $MachinePrecision] / N[(N[(alpha + 2.0), $MachinePrecision] * N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(1.0 + N[(2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.4:\\
\;\;\;\;\frac{0.5 + \alpha \cdot 0.25}{\left(\alpha + 2\right) \cdot \left(\alpha + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{1 + \left(2 + \left(\beta + \alpha\right)\right)}\\
\end{array}
\end{array}
if beta < 2.39999999999999991Initial program 99.8%
associate-/l/99.5%
associate-+l+99.5%
*-commutative99.5%
+-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
associate-+l+99.5%
metadata-eval99.5%
+-commutative99.5%
metadata-eval99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in beta around 0 98.0%
Taylor expanded in alpha around 0 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in beta around 0 81.1%
+-commutative81.1%
+-commutative81.1%
Simplified81.1%
if 2.39999999999999991 < beta Initial program 83.2%
Taylor expanded in beta around inf 81.8%
Final simplification81.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 7.0)
(/ 0.16666666666666666 t_0)
(if (<= beta 8.8e+160)
(/ (/ 1.0 beta) (+ beta 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 <= 7.0) {
tmp = 0.16666666666666666 / t_0;
} else if (beta <= 8.8e+160) {
tmp = (1.0 / beta) / (beta + 2.0);
} else {
tmp = (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 <= 7.0d0) then
tmp = 0.16666666666666666d0 / t_0
else if (beta <= 8.8d+160) then
tmp = (1.0d0 / beta) / (beta + 2.0d0)
else
tmp = (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 <= 7.0) {
tmp = 0.16666666666666666 / t_0;
} else if (beta <= 8.8e+160) {
tmp = (1.0 / beta) / (beta + 2.0);
} else {
tmp = (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 <= 7.0: tmp = 0.16666666666666666 / t_0 elif beta <= 8.8e+160: tmp = (1.0 / beta) / (beta + 2.0) else: tmp = (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 <= 7.0) tmp = Float64(0.16666666666666666 / t_0); elseif (beta <= 8.8e+160) tmp = Float64(Float64(1.0 / beta) / Float64(beta + 2.0)); else tmp = Float64(Float64(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 <= 7.0)
tmp = 0.16666666666666666 / t_0;
elseif (beta <= 8.8e+160)
tmp = (1.0 / beta) / (beta + 2.0);
else
tmp = (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, 7.0], N[(0.16666666666666666 / t$95$0), $MachinePrecision], If[LessEqual[beta, 8.8e+160], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(alpha / beta), $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 7:\\
\;\;\;\;\frac{0.16666666666666666}{t_0}\\
\mathbf{elif}\;\beta \leq 8.8 \cdot 10^{+160}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 7Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.1%
if 7 < beta < 8.79999999999999968e160Initial program 97.4%
associate-/l/94.4%
associate-/r*65.3%
+-commutative65.3%
associate-+l+65.3%
associate-+r+65.3%
*-commutative65.3%
distribute-rgt1-in65.3%
+-commutative65.3%
*-commutative65.3%
distribute-rgt1-in65.3%
+-commutative65.3%
times-frac96.7%
Simplified96.7%
associate-*l/96.6%
+-commutative96.6%
associate-+r+96.6%
associate-/r*99.7%
associate-+r+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 77.5%
Taylor expanded in alpha around 0 56.3%
associate-/r*57.3%
+-commutative57.3%
Simplified57.3%
if 8.79999999999999968e160 < beta Initial program 68.7%
associate-/l/66.1%
associate-/r*66.1%
+-commutative66.1%
associate-+l+66.1%
associate-+r+66.1%
*-commutative66.1%
distribute-rgt1-in66.1%
+-commutative66.1%
*-commutative66.1%
distribute-rgt1-in66.1%
+-commutative66.1%
times-frac83.9%
Simplified83.9%
associate-*l/83.9%
+-commutative83.9%
associate-+r+83.9%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 87.5%
Taylor expanded in alpha around inf 87.5%
Final simplification68.9%
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.2)
(/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) t_0)
(if (<= beta 8.8e+160)
(/ (/ 1.0 beta) (+ beta 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 <= 4.2) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
} else if (beta <= 8.8e+160) {
tmp = (1.0 / beta) / (beta + 2.0);
} else {
tmp = (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 <= 4.2d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / t_0
else if (beta <= 8.8d+160) then
tmp = (1.0d0 / beta) / (beta + 2.0d0)
else
tmp = (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 <= 4.2) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
} else if (beta <= 8.8e+160) {
tmp = (1.0 / beta) / (beta + 2.0);
} else {
tmp = (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 <= 4.2: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0 elif beta <= 8.8e+160: tmp = (1.0 / beta) / (beta + 2.0) else: tmp = (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 <= 4.2) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / t_0); elseif (beta <= 8.8e+160) tmp = Float64(Float64(1.0 / beta) / Float64(beta + 2.0)); else tmp = Float64(Float64(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 <= 4.2)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
elseif (beta <= 8.8e+160)
tmp = (1.0 / beta) / (beta + 2.0);
else
tmp = (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, 4.2], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[beta, 8.8e+160], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(alpha / beta), $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.2:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{t_0}\\
\mathbf{elif}\;\beta \leq 8.8 \cdot 10^{+160}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 4.20000000000000018Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.9%
*-commutative67.9%
Simplified67.9%
if 4.20000000000000018 < beta < 8.79999999999999968e160Initial program 97.4%
associate-/l/94.4%
associate-/r*65.3%
+-commutative65.3%
associate-+l+65.3%
associate-+r+65.3%
*-commutative65.3%
distribute-rgt1-in65.3%
+-commutative65.3%
*-commutative65.3%
distribute-rgt1-in65.3%
+-commutative65.3%
times-frac96.7%
Simplified96.7%
associate-*l/96.6%
+-commutative96.6%
associate-+r+96.6%
associate-/r*99.7%
associate-+r+99.7%
Applied egg-rr99.7%
Taylor expanded in beta around inf 77.5%
Taylor expanded in alpha around 0 56.3%
associate-/r*57.3%
+-commutative57.3%
Simplified57.3%
if 8.79999999999999968e160 < beta Initial program 68.7%
associate-/l/66.1%
associate-/r*66.1%
+-commutative66.1%
associate-+l+66.1%
associate-+r+66.1%
*-commutative66.1%
distribute-rgt1-in66.1%
+-commutative66.1%
*-commutative66.1%
distribute-rgt1-in66.1%
+-commutative66.1%
times-frac83.9%
Simplified83.9%
associate-*l/83.9%
+-commutative83.9%
associate-+r+83.9%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 87.5%
Taylor expanded in alpha around inf 87.5%
Final simplification69.4%
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.7)
(/ (+ 0.16666666666666666 (* beta 0.027777777777777776)) t_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 <= 3.7) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / 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 = alpha + (beta + 2.0d0)
if (beta <= 3.7d0) then
tmp = (0.16666666666666666d0 + (beta * 0.027777777777777776d0)) / 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 = alpha + (beta + 2.0);
double tmp;
if (beta <= 3.7) {
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0;
} else {
tmp = ((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 <= 3.7: tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / t_0 else: tmp = ((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 <= 3.7) tmp = Float64(Float64(0.16666666666666666 + Float64(beta * 0.027777777777777776)) / 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 = alpha + (beta + 2.0);
tmp = 0.0;
if (beta <= 3.7)
tmp = (0.16666666666666666 + (beta * 0.027777777777777776)) / 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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 3.7], N[(N[(0.16666666666666666 + N[(beta * 0.027777777777777776), $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 := \alpha + \left(\beta + 2\right)\\
\mathbf{if}\;\beta \leq 3.7:\\
\;\;\;\;\frac{0.16666666666666666 + \beta \cdot 0.027777777777777776}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 3.7000000000000002Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.9%
*-commutative67.9%
Simplified67.9%
if 3.7000000000000002 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*l/90.2%
+-commutative90.2%
associate-+r+90.2%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.5%
Final simplification72.9%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.4) (/ 0.16666666666666666 (+ alpha (+ beta 2.0))) (/ 1.0 (* beta (+ beta 2.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.4) {
tmp = 0.16666666666666666 / (alpha + (beta + 2.0));
} else {
tmp = 1.0 / (beta * (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 <= 6.4d0) then
tmp = 0.16666666666666666d0 / (alpha + (beta + 2.0d0))
else
tmp = 1.0d0 / (beta * (beta + 2.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.4) {
tmp = 0.16666666666666666 / (alpha + (beta + 2.0));
} else {
tmp = 1.0 / (beta * (beta + 2.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.4: tmp = 0.16666666666666666 / (alpha + (beta + 2.0)) else: tmp = 1.0 / (beta * (beta + 2.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.4) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(beta + 2.0))); else tmp = Float64(1.0 / Float64(beta * 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 <= 6.4)
tmp = 0.16666666666666666 / (alpha + (beta + 2.0));
else
tmp = 1.0 / (beta * (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, 6.4], N[(0.16666666666666666 / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6.4:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 2\right)}\\
\end{array}
\end{array}
if beta < 6.4000000000000004Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.1%
if 6.4000000000000004 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*l/90.2%
+-commutative90.2%
associate-+r+90.2%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.5%
Taylor expanded in alpha around 0 70.1%
Final simplification68.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 6.0) (/ 0.16666666666666666 (+ alpha (+ beta 2.0))) (/ (/ 1.0 beta) (+ beta 2.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.0) {
tmp = 0.16666666666666666 / (alpha + (beta + 2.0));
} else {
tmp = (1.0 / beta) / (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 <= 6.0d0) then
tmp = 0.16666666666666666d0 / (alpha + (beta + 2.0d0))
else
tmp = (1.0d0 / beta) / (beta + 2.0d0)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.0) {
tmp = 0.16666666666666666 / (alpha + (beta + 2.0));
} else {
tmp = (1.0 / beta) / (beta + 2.0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.0: tmp = 0.16666666666666666 / (alpha + (beta + 2.0)) else: tmp = (1.0 / beta) / (beta + 2.0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.0) tmp = Float64(0.16666666666666666 / Float64(alpha + Float64(beta + 2.0))); else tmp = Float64(Float64(1.0 / beta) / 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 <= 6.0)
tmp = 0.16666666666666666 / (alpha + (beta + 2.0));
else
tmp = (1.0 / beta) / (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, 6.0], N[(0.16666666666666666 / N[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6:\\
\;\;\;\;\frac{0.16666666666666666}{\alpha + \left(\beta + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 2}\\
\end{array}
\end{array}
if beta < 6Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.1%
if 6 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*l/90.2%
+-commutative90.2%
associate-+r+90.2%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.5%
Taylor expanded in alpha around 0 70.1%
associate-/r*70.6%
+-commutative70.6%
Simplified70.6%
Final simplification68.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.8) (+ 0.08333333333333333 (* alpha -0.041666666666666664)) (/ 1.0 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.8) {
tmp = 0.08333333333333333 + (alpha * -0.041666666666666664);
} else {
tmp = 1.0 / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.8d0) then
tmp = 0.08333333333333333d0 + (alpha * (-0.041666666666666664d0))
else
tmp = 1.0d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.8) {
tmp = 0.08333333333333333 + (alpha * -0.041666666666666664);
} else {
tmp = 1.0 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.8: tmp = 0.08333333333333333 + (alpha * -0.041666666666666664) else: tmp = 1.0 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.8) tmp = Float64(0.08333333333333333 + Float64(alpha * -0.041666666666666664)); else tmp = Float64(1.0 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.8)
tmp = 0.08333333333333333 + (alpha * -0.041666666666666664);
else
tmp = 1.0 / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.8], N[(0.08333333333333333 + N[(alpha * -0.041666666666666664), $MachinePrecision]), $MachinePrecision], N[(1.0 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.8:\\
\;\;\;\;0.08333333333333333 + \alpha \cdot -0.041666666666666664\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 3.7999999999999998Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.1%
+-commutative67.1%
Simplified67.1%
Taylor expanded in alpha around 0 65.3%
*-commutative65.3%
Simplified65.3%
if 3.7999999999999998 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*l/90.2%
+-commutative90.2%
associate-+r+90.2%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.5%
Taylor expanded in alpha around inf 6.7%
Final simplification45.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ alpha (+ beta 2.0))))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (alpha + (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 / (alpha + (beta + 2.0d0))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (alpha + (beta + 2.0));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (alpha + (beta + 2.0))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(alpha + Float64(beta + 2.0))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (alpha + (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[(alpha + N[(beta + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{\alpha + \left(\beta + 2\right)}
\end{array}
Initial program 94.1%
associate-/l/92.9%
associate-/r*84.0%
+-commutative84.0%
associate-+l+84.0%
associate-+r+84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
times-frac96.3%
Simplified96.3%
associate-*l/96.3%
+-commutative96.3%
associate-+r+96.3%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in alpha around 0 70.2%
Taylor expanded in beta around 0 46.5%
Final simplification46.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 12.0) 0.08333333333333333 (/ 1.0 beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 12.0) {
tmp = 0.08333333333333333;
} else {
tmp = 1.0 / beta;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 12.0d0) then
tmp = 0.08333333333333333d0
else
tmp = 1.0d0 / beta
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 12.0) {
tmp = 0.08333333333333333;
} else {
tmp = 1.0 / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 12.0: tmp = 0.08333333333333333 else: tmp = 1.0 / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 12.0) tmp = 0.08333333333333333; else tmp = Float64(1.0 / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 12.0)
tmp = 0.08333333333333333;
else
tmp = 1.0 / beta;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 12.0], 0.08333333333333333, N[(1.0 / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 12:\\
\;\;\;\;0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 12Initial program 99.8%
associate-/l/99.5%
associate-/r*93.5%
+-commutative93.5%
associate-+l+93.5%
associate-+r+93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
*-commutative93.5%
distribute-rgt1-in93.5%
+-commutative93.5%
times-frac99.4%
Simplified99.4%
associate-*l/99.4%
+-commutative99.4%
associate-+r+99.4%
associate-/r*99.9%
associate-+r+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 68.9%
Taylor expanded in beta around 0 67.1%
+-commutative67.1%
Simplified67.1%
Taylor expanded in alpha around 0 66.1%
if 12 < beta Initial program 83.1%
associate-/l/80.3%
associate-/r*65.7%
+-commutative65.7%
associate-+l+65.7%
associate-+r+65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
*-commutative65.7%
distribute-rgt1-in65.7%
+-commutative65.7%
times-frac90.3%
Simplified90.3%
associate-*l/90.2%
+-commutative90.2%
associate-+r+90.2%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 82.5%
Taylor expanded in alpha around inf 6.7%
Final simplification45.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.16666666666666666 (+ alpha 2.0)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.16666666666666666 / (alpha + 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 / (alpha + 2.0d0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.16666666666666666 / (alpha + 2.0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.16666666666666666 / (alpha + 2.0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.16666666666666666 / Float64(alpha + 2.0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.16666666666666666 / (alpha + 2.0);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.16666666666666666 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.16666666666666666}{\alpha + 2}
\end{array}
Initial program 94.1%
associate-/l/92.9%
associate-/r*84.0%
+-commutative84.0%
associate-+l+84.0%
associate-+r+84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
times-frac96.3%
Simplified96.3%
associate-*l/96.3%
+-commutative96.3%
associate-+r+96.3%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in alpha around 0 70.2%
Taylor expanded in beta around 0 45.8%
+-commutative45.8%
Simplified45.8%
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 94.1%
associate-/l/92.9%
associate-/r*84.0%
+-commutative84.0%
associate-+l+84.0%
associate-+r+84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
*-commutative84.0%
distribute-rgt1-in84.0%
+-commutative84.0%
times-frac96.3%
Simplified96.3%
associate-*l/96.3%
+-commutative96.3%
associate-+r+96.3%
associate-/r*99.8%
associate-+r+99.8%
Applied egg-rr99.8%
Taylor expanded in alpha around 0 70.2%
Taylor expanded in beta around 0 45.8%
+-commutative45.8%
Simplified45.8%
Taylor expanded in alpha around 0 44.7%
Final simplification44.7%
herbie shell --seed 2023320
(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)))