
(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 18 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 (+ 2.0 (+ alpha beta)))) (* (/ (/ (+ 1.0 alpha) t_0) (+ alpha (+ beta 3.0))) (/ (+ 1.0 beta) t_0))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
return (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * ((1.0 + beta) / 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 = 2.0d0 + (alpha + beta)
code = (((1.0d0 + alpha) / t_0) / (alpha + (beta + 3.0d0))) * ((1.0d0 + beta) / t_0)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
return (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * ((1.0 + beta) / t_0);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (alpha + beta) return (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * ((1.0 + beta) / t_0)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(alpha + beta)) return Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / Float64(alpha + Float64(beta + 3.0))) * Float64(Float64(1.0 + beta) / t_0)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = 2.0 + (alpha + beta);
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * ((1.0 + beta) / 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[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\alpha + \beta\right)\\
\frac{\frac{1 + \alpha}{t_0}}{\alpha + \left(\beta + 3\right)} \cdot \frac{1 + \beta}{t_0}
\end{array}
\end{array}
Initial program 94.1%
associate-/l/92.7%
associate-+l+92.7%
+-commutative92.7%
associate-+r+92.7%
associate-+l+92.7%
distribute-rgt1-in92.7%
*-rgt-identity92.7%
distribute-lft-out92.7%
+-commutative92.7%
associate-*r/94.6%
associate-*r/90.3%
Simplified90.3%
distribute-lft-in90.3%
associate-+r+90.3%
+-commutative90.3%
associate-+r+90.3%
+-commutative90.3%
Applied egg-rr90.3%
expm1-log1p-u90.3%
expm1-udef69.8%
Applied egg-rr69.8%
expm1-def87.1%
expm1-log1p87.1%
associate-*r/85.1%
*-commutative85.1%
times-frac94.6%
Simplified99.8%
Final simplification99.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ beta 3.0))) (t_1 (+ 2.0 (+ alpha beta))))
(if (<= beta 5e+15)
(* (+ 1.0 alpha) (/ (+ 1.0 beta) (* t_1 (* t_0 t_1))))
(/ (* (/ (+ 1.0 alpha) t_1) (+ 1.0 (/ (- -1.0 alpha) beta))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double t_1 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 5e+15) {
tmp = (1.0 + alpha) * ((1.0 + beta) / (t_1 * (t_0 * t_1)));
} else {
tmp = (((1.0 + alpha) / t_1) * (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) :: t_1
real(8) :: tmp
t_0 = alpha + (beta + 3.0d0)
t_1 = 2.0d0 + (alpha + beta)
if (beta <= 5d+15) then
tmp = (1.0d0 + alpha) * ((1.0d0 + beta) / (t_1 * (t_0 * t_1)))
else
tmp = (((1.0d0 + alpha) / t_1) * (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 + 3.0);
double t_1 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 5e+15) {
tmp = (1.0 + alpha) * ((1.0 + beta) / (t_1 * (t_0 * t_1)));
} else {
tmp = (((1.0 + alpha) / t_1) * (1.0 + ((-1.0 - alpha) / beta))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 3.0) t_1 = 2.0 + (alpha + beta) tmp = 0 if beta <= 5e+15: tmp = (1.0 + alpha) * ((1.0 + beta) / (t_1 * (t_0 * t_1))) else: tmp = (((1.0 + alpha) / t_1) * (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 + 3.0)) t_1 = Float64(2.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 5e+15) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(1.0 + beta) / Float64(t_1 * Float64(t_0 * t_1)))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_1) * 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 + 3.0);
t_1 = 2.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 5e+15)
tmp = (1.0 + alpha) * ((1.0 + beta) / (t_1 * (t_0 * t_1)));
else
tmp = (((1.0 + alpha) / t_1) * (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 + 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 5e+15], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(t$95$1 * N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(1.0 + N[(N[(-1.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 + 3\right)\\
t_1 := 2 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 5 \cdot 10^{+15}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{1 + \beta}{t_1 \cdot \left(t_0 \cdot t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_1} \cdot \left(1 + \frac{-1 - \alpha}{\beta}\right)}{t_0}\\
\end{array}
\end{array}
if beta < 5e15Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*l/99.6%
*-commutative99.6%
associate-*r/97.0%
Simplified97.0%
expm1-log1p-u97.0%
expm1-udef80.6%
associate-/l/80.6%
+-commutative80.6%
associate-+r+80.6%
+-commutative80.6%
associate-+r+80.6%
+-commutative80.6%
Applied egg-rr80.6%
expm1-def96.5%
expm1-log1p96.5%
+-commutative96.5%
*-commutative96.5%
+-commutative96.5%
+-commutative96.5%
+-commutative96.5%
Simplified96.5%
if 5e15 < beta Initial program 81.2%
associate-/l/77.0%
associate-+l+77.0%
+-commutative77.0%
associate-+r+77.0%
associate-+l+77.0%
distribute-rgt1-in77.0%
*-rgt-identity77.0%
distribute-lft-out77.0%
+-commutative77.0%
associate-*r/83.3%
associate-*r/69.5%
Simplified69.5%
distribute-lft-in69.5%
associate-+r+69.5%
+-commutative69.5%
associate-+r+69.5%
+-commutative69.5%
Applied egg-rr69.5%
expm1-log1p-u69.5%
expm1-udef45.4%
Applied egg-rr45.4%
expm1-def65.9%
expm1-log1p65.9%
associate-*r/59.6%
*-commutative59.6%
times-frac83.3%
Simplified99.7%
Taylor expanded in beta around inf 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
associate-*l/80.1%
Applied egg-rr80.1%
Final simplification91.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 3.0))) (t_1 (+ alpha (+ 2.0 beta))))
(if (<= beta 6.4e+150)
(* (+ 1.0 alpha) (/ (/ (+ 1.0 beta) t_1) (* t_0 t_1)))
(/
(*
(/ (+ 1.0 alpha) (+ 2.0 (+ alpha beta)))
(+ 1.0 (/ (- -1.0 alpha) beta)))
t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (beta + 3.0);
double t_1 = alpha + (2.0 + beta);
double tmp;
if (beta <= 6.4e+150) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_0 * t_1));
} else {
tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (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) :: t_1
real(8) :: tmp
t_0 = alpha + (beta + 3.0d0)
t_1 = alpha + (2.0d0 + beta)
if (beta <= 6.4d+150) then
tmp = (1.0d0 + alpha) * (((1.0d0 + beta) / t_1) / (t_0 * t_1))
else
tmp = (((1.0d0 + alpha) / (2.0d0 + (alpha + beta))) * (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 + 3.0);
double t_1 = alpha + (2.0 + beta);
double tmp;
if (beta <= 6.4e+150) {
tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_0 * t_1));
} else {
tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (1.0 + ((-1.0 - alpha) / beta))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (beta + 3.0) t_1 = alpha + (2.0 + beta) tmp = 0 if beta <= 6.4e+150: tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_0 * t_1)) else: tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (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 + 3.0)) t_1 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 6.4e+150) tmp = Float64(Float64(1.0 + alpha) * Float64(Float64(Float64(1.0 + beta) / t_1) / Float64(t_0 * t_1))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(2.0 + Float64(alpha + beta))) * 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 + 3.0);
t_1 = alpha + (2.0 + beta);
tmp = 0.0;
if (beta <= 6.4e+150)
tmp = (1.0 + alpha) * (((1.0 + beta) / t_1) / (t_0 * t_1));
else
tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (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 + 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 6.4e+150], N[(N[(1.0 + alpha), $MachinePrecision] * N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$1), $MachinePrecision] / N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(-1.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 + 3\right)\\
t_1 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 6.4 \cdot 10^{+150}:\\
\;\;\;\;\left(1 + \alpha\right) \cdot \frac{\frac{1 + \beta}{t_1}}{t_0 \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{2 + \left(\alpha + \beta\right)} \cdot \left(1 + \frac{-1 - \alpha}{\beta}\right)}{t_0}\\
\end{array}
\end{array}
if beta < 6.40000000000000031e150Initial program 98.9%
associate-/l/98.0%
associate-+l+98.0%
+-commutative98.0%
associate-+r+98.0%
associate-+l+98.0%
distribute-rgt1-in98.0%
*-rgt-identity98.0%
distribute-lft-out98.0%
+-commutative98.0%
associate-*l/98.5%
*-commutative98.5%
associate-*r/95.8%
Simplified95.8%
if 6.40000000000000031e150 < beta Initial program 71.6%
associate-/l/67.8%
associate-+l+67.8%
+-commutative67.8%
associate-+r+67.8%
associate-+l+67.8%
distribute-rgt1-in67.8%
*-rgt-identity67.8%
distribute-lft-out67.8%
+-commutative67.8%
associate-*r/76.5%
associate-*r/70.9%
Simplified70.9%
distribute-lft-in70.9%
associate-+r+70.9%
+-commutative70.9%
associate-+r+70.9%
+-commutative70.9%
Applied egg-rr70.9%
expm1-log1p-u70.9%
expm1-udef70.9%
Applied egg-rr70.9%
expm1-def70.9%
expm1-log1p70.9%
associate-*r/62.1%
*-commutative62.1%
times-frac76.5%
Simplified99.8%
Taylor expanded in beta around inf 86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
associate-*l/86.8%
Applied egg-rr86.8%
Final simplification94.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ alpha (+ 2.0 beta))) (t_1 (+ alpha (+ beta 3.0))))
(if (<= beta 6.5e+150)
(* (/ (+ 1.0 beta) t_1) (/ (+ 1.0 alpha) (* t_0 t_0)))
(/
(*
(/ (+ 1.0 alpha) (+ 2.0 (+ alpha beta)))
(+ 1.0 (/ (- -1.0 alpha) beta)))
t_1))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double t_1 = alpha + (beta + 3.0);
double tmp;
if (beta <= 6.5e+150) {
tmp = ((1.0 + beta) / t_1) * ((1.0 + alpha) / (t_0 * t_0));
} else {
tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (1.0 + ((-1.0 - alpha) / beta))) / t_1;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = alpha + (2.0d0 + beta)
t_1 = alpha + (beta + 3.0d0)
if (beta <= 6.5d+150) then
tmp = ((1.0d0 + beta) / t_1) * ((1.0d0 + alpha) / (t_0 * t_0))
else
tmp = (((1.0d0 + alpha) / (2.0d0 + (alpha + beta))) * (1.0d0 + (((-1.0d0) - alpha) / beta))) / t_1
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double t_1 = alpha + (beta + 3.0);
double tmp;
if (beta <= 6.5e+150) {
tmp = ((1.0 + beta) / t_1) * ((1.0 + alpha) / (t_0 * t_0));
} else {
tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (1.0 + ((-1.0 - alpha) / beta))) / t_1;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) t_1 = alpha + (beta + 3.0) tmp = 0 if beta <= 6.5e+150: tmp = ((1.0 + beta) / t_1) * ((1.0 + alpha) / (t_0 * t_0)) else: tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (1.0 + ((-1.0 - alpha) / beta))) / t_1 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) t_1 = Float64(alpha + Float64(beta + 3.0)) tmp = 0.0 if (beta <= 6.5e+150) tmp = Float64(Float64(Float64(1.0 + beta) / t_1) * Float64(Float64(1.0 + alpha) / Float64(t_0 * t_0))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / Float64(2.0 + Float64(alpha + beta))) * Float64(1.0 + Float64(Float64(-1.0 - alpha) / beta))) / t_1); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
t_1 = alpha + (beta + 3.0);
tmp = 0.0;
if (beta <= 6.5e+150)
tmp = ((1.0 + beta) / t_1) * ((1.0 + alpha) / (t_0 * t_0));
else
tmp = (((1.0 + alpha) / (2.0 + (alpha + beta))) * (1.0 + ((-1.0 - alpha) / beta))) / t_1;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 6.5e+150], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(N[(1.0 + alpha), $MachinePrecision] / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
t_1 := \alpha + \left(\beta + 3\right)\\
\mathbf{if}\;\beta \leq 6.5 \cdot 10^{+150}:\\
\;\;\;\;\frac{1 + \beta}{t_1} \cdot \frac{1 + \alpha}{t_0 \cdot t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{2 + \left(\alpha + \beta\right)} \cdot \left(1 + \frac{-1 - \alpha}{\beta}\right)}{t_1}\\
\end{array}
\end{array}
if beta < 6.50000000000000033e150Initial program 98.9%
associate-/l/97.9%
associate-/l/90.0%
associate-+l+90.0%
+-commutative90.0%
associate-+r+90.0%
associate-+l+90.0%
distribute-rgt1-in90.0%
*-rgt-identity90.0%
distribute-lft-out90.0%
+-commutative90.0%
times-frac98.4%
Simplified98.4%
if 6.50000000000000033e150 < beta Initial program 71.6%
associate-/l/67.8%
associate-+l+67.8%
+-commutative67.8%
associate-+r+67.8%
associate-+l+67.8%
distribute-rgt1-in67.8%
*-rgt-identity67.8%
distribute-lft-out67.8%
+-commutative67.8%
associate-*r/76.5%
associate-*r/70.9%
Simplified70.9%
distribute-lft-in70.9%
associate-+r+70.9%
+-commutative70.9%
associate-+r+70.9%
+-commutative70.9%
Applied egg-rr70.9%
expm1-log1p-u70.9%
expm1-udef70.9%
Applied egg-rr70.9%
expm1-def70.9%
expm1-log1p70.9%
associate-*r/62.1%
*-commutative62.1%
times-frac76.5%
Simplified99.8%
Taylor expanded in beta around inf 86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
associate-*l/86.8%
Applied egg-rr86.8%
Final simplification96.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ alpha beta))))
(if (<= beta 240000000.0)
(* (/ (+ 1.0 beta) t_0) (/ (/ 1.0 (+ 2.0 beta)) (+ beta 3.0)))
(*
(/ (/ (+ 1.0 alpha) t_0) (+ alpha (+ beta 3.0)))
(+ 1.0 (/ (- -1.0 alpha) beta))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 240000000.0) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 + ((-1.0 - alpha) / beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (alpha + beta)
if (beta <= 240000000.0d0) then
tmp = ((1.0d0 + beta) / t_0) * ((1.0d0 / (2.0d0 + beta)) / (beta + 3.0d0))
else
tmp = (((1.0d0 + alpha) / t_0) / (alpha + (beta + 3.0d0))) * (1.0d0 + (((-1.0d0) - alpha) / beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 240000000.0) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 + ((-1.0 - alpha) / beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (alpha + beta) tmp = 0 if beta <= 240000000.0: tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0)) else: tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 + ((-1.0 - alpha) / beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 240000000.0) tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(1.0 / Float64(2.0 + beta)) / Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / Float64(alpha + Float64(beta + 3.0))) * Float64(1.0 + Float64(Float64(-1.0 - alpha) / beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 2.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 240000000.0)
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
else
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 + ((-1.0 - alpha) / beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 240000000.0], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 240000000:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \frac{\frac{1}{2 + \beta}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0}}{\alpha + \left(\beta + 3\right)} \cdot \left(1 + \frac{-1 - \alpha}{\beta}\right)\\
\end{array}
\end{array}
if beta < 2.4e8Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
expm1-log1p-u99.6%
expm1-udef80.6%
Applied egg-rr80.6%
expm1-def96.5%
expm1-log1p96.5%
associate-*r/96.5%
*-commutative96.5%
times-frac99.6%
Simplified99.8%
Taylor expanded in alpha around 0 63.3%
*-commutative63.3%
+-commutative63.3%
associate-/r*63.3%
+-commutative63.3%
Simplified63.3%
if 2.4e8 < beta Initial program 81.2%
associate-/l/77.0%
associate-+l+77.0%
+-commutative77.0%
associate-+r+77.0%
associate-+l+77.0%
distribute-rgt1-in77.0%
*-rgt-identity77.0%
distribute-lft-out77.0%
+-commutative77.0%
associate-*r/83.3%
associate-*r/69.5%
Simplified69.5%
distribute-lft-in69.5%
associate-+r+69.5%
+-commutative69.5%
associate-+r+69.5%
+-commutative69.5%
Applied egg-rr69.5%
expm1-log1p-u69.5%
expm1-udef45.4%
Applied egg-rr45.4%
expm1-def65.9%
expm1-log1p65.9%
associate-*r/59.6%
*-commutative59.6%
times-frac83.3%
Simplified99.7%
Taylor expanded in beta around inf 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
Final simplification68.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ alpha beta))))
(if (<= beta 70000000.0)
(* (/ (+ 1.0 beta) t_0) (/ (/ 1.0 (+ 2.0 beta)) (+ beta 3.0)))
(/
(* (/ (+ 1.0 alpha) t_0) (+ 1.0 (/ (- -1.0 alpha) beta)))
(+ alpha (+ beta 3.0))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 70000000.0) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-1.0 - alpha) / beta))) / (alpha + (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) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (alpha + beta)
if (beta <= 70000000.0d0) then
tmp = ((1.0d0 + beta) / t_0) * ((1.0d0 / (2.0d0 + beta)) / (beta + 3.0d0))
else
tmp = (((1.0d0 + alpha) / t_0) * (1.0d0 + (((-1.0d0) - alpha) / beta))) / (alpha + (beta + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 70000000.0) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-1.0 - alpha) / beta))) / (alpha + (beta + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (alpha + beta) tmp = 0 if beta <= 70000000.0: tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0)) else: tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-1.0 - alpha) / beta))) / (alpha + (beta + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 70000000.0) tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(1.0 / Float64(2.0 + beta)) / Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(1.0 + Float64(Float64(-1.0 - alpha) / beta))) / Float64(alpha + Float64(beta + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 2.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 70000000.0)
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
else
tmp = (((1.0 + alpha) / t_0) * (1.0 + ((-1.0 - alpha) / beta))) / (alpha + (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_] := Block[{t$95$0 = N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 70000000.0], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 70000000:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \frac{\frac{1}{2 + \beta}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0} \cdot \left(1 + \frac{-1 - \alpha}{\beta}\right)}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 7e7Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
expm1-log1p-u99.6%
expm1-udef80.6%
Applied egg-rr80.6%
expm1-def96.5%
expm1-log1p96.5%
associate-*r/96.5%
*-commutative96.5%
times-frac99.6%
Simplified99.8%
Taylor expanded in alpha around 0 63.3%
*-commutative63.3%
+-commutative63.3%
associate-/r*63.3%
+-commutative63.3%
Simplified63.3%
if 7e7 < beta Initial program 81.2%
associate-/l/77.0%
associate-+l+77.0%
+-commutative77.0%
associate-+r+77.0%
associate-+l+77.0%
distribute-rgt1-in77.0%
*-rgt-identity77.0%
distribute-lft-out77.0%
+-commutative77.0%
associate-*r/83.3%
associate-*r/69.5%
Simplified69.5%
distribute-lft-in69.5%
associate-+r+69.5%
+-commutative69.5%
associate-+r+69.5%
+-commutative69.5%
Applied egg-rr69.5%
expm1-log1p-u69.5%
expm1-udef45.4%
Applied egg-rr45.4%
expm1-def65.9%
expm1-log1p65.9%
associate-*r/59.6%
*-commutative59.6%
times-frac83.3%
Simplified99.7%
Taylor expanded in beta around inf 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
associate-*l/80.1%
Applied egg-rr80.1%
Final simplification68.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ alpha beta))))
(if (<= beta 2.6e+15)
(* (/ (+ 1.0 beta) t_0) (/ (/ 1.0 (+ 2.0 beta)) (+ beta 3.0)))
(*
(/ (/ (+ 1.0 alpha) t_0) (+ alpha (+ beta 3.0)))
(- 1.0 (/ alpha beta))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 2.6e+15) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 - (alpha / beta));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (alpha + beta)
if (beta <= 2.6d+15) then
tmp = ((1.0d0 + beta) / t_0) * ((1.0d0 / (2.0d0 + beta)) / (beta + 3.0d0))
else
tmp = (((1.0d0 + alpha) / t_0) / (alpha + (beta + 3.0d0))) * (1.0d0 - (alpha / beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 2.6e+15) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 - (alpha / beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (alpha + beta) tmp = 0 if beta <= 2.6e+15: tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0)) else: tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 - (alpha / beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 2.6e+15) tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(1.0 / Float64(2.0 + beta)) / Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / Float64(alpha + Float64(beta + 3.0))) * Float64(1.0 - Float64(alpha / beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 2.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 2.6e+15)
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
else
tmp = (((1.0 + alpha) / t_0) / (alpha + (beta + 3.0))) * (1.0 - (alpha / beta));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 2.6e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(alpha / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 2.6 \cdot 10^{+15}:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \frac{\frac{1}{2 + \beta}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{t_0}}{\alpha + \left(\beta + 3\right)} \cdot \left(1 - \frac{\alpha}{\beta}\right)\\
\end{array}
\end{array}
if beta < 2.6e15Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
expm1-log1p-u99.6%
expm1-udef80.6%
Applied egg-rr80.6%
expm1-def96.5%
expm1-log1p96.5%
associate-*r/96.5%
*-commutative96.5%
times-frac99.6%
Simplified99.8%
Taylor expanded in alpha around 0 63.3%
*-commutative63.3%
+-commutative63.3%
associate-/r*63.3%
+-commutative63.3%
Simplified63.3%
if 2.6e15 < beta Initial program 81.2%
associate-/l/77.0%
associate-+l+77.0%
+-commutative77.0%
associate-+r+77.0%
associate-+l+77.0%
distribute-rgt1-in77.0%
*-rgt-identity77.0%
distribute-lft-out77.0%
+-commutative77.0%
associate-*r/83.3%
associate-*r/69.5%
Simplified69.5%
distribute-lft-in69.5%
associate-+r+69.5%
+-commutative69.5%
associate-+r+69.5%
+-commutative69.5%
Applied egg-rr69.5%
expm1-log1p-u69.5%
expm1-udef45.4%
Applied egg-rr45.4%
expm1-def65.9%
expm1-log1p65.9%
associate-*r/59.6%
*-commutative59.6%
times-frac83.3%
Simplified99.7%
Taylor expanded in beta around inf 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
Taylor expanded in alpha around inf 80.1%
Final simplification68.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 2.0 (+ alpha beta))))
(if (<= beta 1.55e+15)
(* (/ (+ 1.0 beta) t_0) (/ (/ 1.0 (+ 2.0 beta)) (+ beta 3.0)))
(/ (/ (+ 1.0 alpha) (+ alpha (+ beta 3.0))) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 1.55e+15) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.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 = 2.0d0 + (alpha + beta)
if (beta <= 1.55d+15) then
tmp = ((1.0d0 + beta) / t_0) * ((1.0d0 / (2.0d0 + beta)) / (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 3.0d0))) / t_0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = 2.0 + (alpha + beta);
double tmp;
if (beta <= 1.55e+15) {
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / t_0;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 2.0 + (alpha + beta) tmp = 0 if beta <= 1.55e+15: tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0)) else: tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / t_0 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(2.0 + Float64(alpha + beta)) tmp = 0.0 if (beta <= 1.55e+15) tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(Float64(1.0 / Float64(2.0 + beta)) / Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 3.0))) / t_0); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = 2.0 + (alpha + beta);
tmp = 0.0;
if (beta <= 1.55e+15)
tmp = ((1.0 + beta) / t_0) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
else
tmp = ((1.0 + alpha) / (alpha + (beta + 3.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[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.55e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 2 + \left(\alpha + \beta\right)\\
\mathbf{if}\;\beta \leq 1.55 \cdot 10^{+15}:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \frac{\frac{1}{2 + \beta}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + \left(\beta + 3\right)}}{t_0}\\
\end{array}
\end{array}
if beta < 1.55e15Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
expm1-log1p-u99.6%
expm1-udef80.6%
Applied egg-rr80.6%
expm1-def96.5%
expm1-log1p96.5%
associate-*r/96.5%
*-commutative96.5%
times-frac99.6%
Simplified99.8%
Taylor expanded in alpha around 0 63.3%
*-commutative63.3%
+-commutative63.3%
associate-/r*63.3%
+-commutative63.3%
Simplified63.3%
if 1.55e15 < beta Initial program 81.2%
Taylor expanded in beta around inf 80.3%
expm1-log1p-u80.3%
expm1-udef45.4%
Applied egg-rr45.4%
expm1-def77.6%
expm1-log1p77.6%
associate-/r*80.3%
+-commutative80.3%
associate-+r+80.3%
associate-+l+80.3%
Simplified80.3%
Final simplification68.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 2.9e+15)
(*
(/ (+ 1.0 beta) (+ 2.0 (+ alpha beta)))
(/ (/ 1.0 (+ 2.0 beta)) (+ beta 3.0)))
(*
(+ 1.0 (/ (- -1.0 alpha) beta))
(/ (/ (+ 1.0 alpha) beta) (+ alpha (+ beta 3.0))))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.9e+15) {
tmp = ((1.0 + beta) / (2.0 + (alpha + beta))) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (1.0 + ((-1.0 - alpha) / beta)) * (((1.0 + alpha) / beta) / (alpha + (beta + 3.0)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.9d+15) then
tmp = ((1.0d0 + beta) / (2.0d0 + (alpha + beta))) * ((1.0d0 / (2.0d0 + beta)) / (beta + 3.0d0))
else
tmp = (1.0d0 + (((-1.0d0) - alpha) / beta)) * (((1.0d0 + alpha) / beta) / (alpha + (beta + 3.0d0)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.9e+15) {
tmp = ((1.0 + beta) / (2.0 + (alpha + beta))) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
} else {
tmp = (1.0 + ((-1.0 - alpha) / beta)) * (((1.0 + alpha) / beta) / (alpha + (beta + 3.0)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.9e+15: tmp = ((1.0 + beta) / (2.0 + (alpha + beta))) * ((1.0 / (2.0 + beta)) / (beta + 3.0)) else: tmp = (1.0 + ((-1.0 - alpha) / beta)) * (((1.0 + alpha) / beta) / (alpha + (beta + 3.0))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.9e+15) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(2.0 + Float64(alpha + beta))) * Float64(Float64(1.0 / Float64(2.0 + beta)) / Float64(beta + 3.0))); else tmp = Float64(Float64(1.0 + Float64(Float64(-1.0 - alpha) / beta)) * Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + Float64(beta + 3.0)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.9e+15)
tmp = ((1.0 + beta) / (2.0 + (alpha + beta))) * ((1.0 / (2.0 + beta)) / (beta + 3.0));
else
tmp = (1.0 + ((-1.0 - alpha) / beta)) * (((1.0 + alpha) / beta) / (alpha + (beta + 3.0)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.9e+15], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(N[(-1.0 - alpha), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{1 + \beta}{2 + \left(\alpha + \beta\right)} \cdot \frac{\frac{1}{2 + \beta}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + \frac{-1 - \alpha}{\beta}\right) \cdot \frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(\beta + 3\right)}\\
\end{array}
\end{array}
if beta < 2.9e15Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
expm1-log1p-u99.6%
expm1-udef80.6%
Applied egg-rr80.6%
expm1-def96.5%
expm1-log1p96.5%
associate-*r/96.5%
*-commutative96.5%
times-frac99.6%
Simplified99.8%
Taylor expanded in alpha around 0 63.3%
*-commutative63.3%
+-commutative63.3%
associate-/r*63.3%
+-commutative63.3%
Simplified63.3%
if 2.9e15 < beta Initial program 81.2%
associate-/l/77.0%
associate-+l+77.0%
+-commutative77.0%
associate-+r+77.0%
associate-+l+77.0%
distribute-rgt1-in77.0%
*-rgt-identity77.0%
distribute-lft-out77.0%
+-commutative77.0%
associate-*r/83.3%
associate-*r/69.5%
Simplified69.5%
distribute-lft-in69.5%
associate-+r+69.5%
+-commutative69.5%
associate-+r+69.5%
+-commutative69.5%
Applied egg-rr69.5%
expm1-log1p-u69.5%
expm1-udef45.4%
Applied egg-rr45.4%
expm1-def65.9%
expm1-log1p65.9%
associate-*r/59.6%
*-commutative59.6%
times-frac83.3%
Simplified99.7%
Taylor expanded in beta around inf 80.1%
mul-1-neg80.1%
unsub-neg80.1%
Simplified80.1%
Taylor expanded in beta around inf 79.4%
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.5) (/ (+ 1.0 alpha) (* (+ 6.0 (* alpha (+ alpha 5.0))) (+ alpha 2.0))) (* (/ (+ 1.0 alpha) (+ beta (+ alpha 2.0))) (/ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6.5) {
tmp = (1.0 + alpha) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 6.5d0) then
tmp = (1.0d0 + alpha) / ((6.0d0 + (alpha * (alpha + 5.0d0))) * (alpha + 2.0d0))
else
tmp = ((1.0d0 + alpha) / (beta + (alpha + 2.0d0))) * (1.0d0 / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6.5) {
tmp = (1.0 + alpha) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0));
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6.5: tmp = (1.0 + alpha) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0)) else: tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6.5) tmp = Float64(Float64(1.0 + alpha) / Float64(Float64(6.0 + Float64(alpha * Float64(alpha + 5.0))) * Float64(alpha + 2.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(beta + Float64(alpha + 2.0))) * Float64(1.0 / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 6.5)
tmp = (1.0 + alpha) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0));
else
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 6.5], N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(6.0 + N[(alpha * N[(alpha + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6.5:\\
\;\;\;\;\frac{1 + \alpha}{\left(6 + \alpha \cdot \left(\alpha + 5\right)\right) \cdot \left(\alpha + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta + \left(\alpha + 2\right)} \cdot \frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 6.5Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 95.5%
Taylor expanded in alpha around 0 95.5%
+-commutative95.5%
unpow295.5%
distribute-rgt-out95.5%
Simplified95.5%
if 6.5 < beta Initial program 82.1%
Taylor expanded in beta around inf 77.7%
div-inv77.6%
metadata-eval77.6%
+-commutative77.6%
associate-+r+77.6%
metadata-eval77.6%
associate-+l+77.6%
+-commutative77.6%
metadata-eval77.6%
Applied egg-rr77.6%
Taylor expanded in beta around inf 77.1%
Final simplification89.5%
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) (* (+ 6.0 (* alpha (+ alpha 5.0))) (+ alpha 2.0))) (/ (/ (+ 1.0 alpha) (+ alpha (+ beta 3.0))) (+ 2.0 (+ alpha beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 5.5) {
tmp = (1.0 + alpha) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.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) :: tmp
if (beta <= 5.5d0) then
tmp = (1.0d0 + alpha) / ((6.0d0 + (alpha * (alpha + 5.0d0))) * (alpha + 2.0d0))
else
tmp = ((1.0d0 + alpha) / (alpha + (beta + 3.0d0))) / (2.0d0 + (alpha + beta))
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) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0));
} else {
tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / (2.0 + (alpha + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 5.5: tmp = (1.0 + alpha) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0)) else: tmp = ((1.0 + alpha) / (alpha + (beta + 3.0))) / (2.0 + (alpha + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 5.5) tmp = Float64(Float64(1.0 + alpha) / Float64(Float64(6.0 + Float64(alpha * Float64(alpha + 5.0))) * Float64(alpha + 2.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(beta + 3.0))) / Float64(2.0 + Float64(alpha + beta))); 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) / ((6.0 + (alpha * (alpha + 5.0))) * (alpha + 2.0));
else
tmp = ((1.0 + alpha) / (alpha + (beta + 3.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_] := If[LessEqual[beta, 5.5], N[(N[(1.0 + alpha), $MachinePrecision] / N[(N[(6.0 + N[(alpha * N[(alpha + 5.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 5.5:\\
\;\;\;\;\frac{1 + \alpha}{\left(6 + \alpha \cdot \left(\alpha + 5\right)\right) \cdot \left(\alpha + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\alpha + \left(\beta + 3\right)}}{2 + \left(\alpha + \beta\right)}\\
\end{array}
\end{array}
if beta < 5.5Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 95.5%
Taylor expanded in alpha around 0 95.5%
+-commutative95.5%
unpow295.5%
distribute-rgt-out95.5%
Simplified95.5%
if 5.5 < beta Initial program 82.1%
Taylor expanded in beta around inf 77.7%
expm1-log1p-u77.7%
expm1-udef45.5%
Applied egg-rr45.5%
expm1-def76.3%
expm1-log1p76.3%
associate-/r*77.7%
+-commutative77.7%
associate-+r+77.7%
associate-+l+77.7%
Simplified77.7%
Final simplification89.8%
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 (* alpha -0.027777777777777776)) (* (/ (+ 1.0 alpha) (+ beta (+ alpha 2.0))) (/ 1.0 beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 2.0) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 2.0d0) then
tmp = 0.08333333333333333d0 + (alpha * (-0.027777777777777776d0))
else
tmp = ((1.0d0 + alpha) / (beta + (alpha + 2.0d0))) * (1.0d0 / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 2.0) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 2.0: tmp = 0.08333333333333333 + (alpha * -0.027777777777777776) else: tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 2.0) tmp = Float64(0.08333333333333333 + Float64(alpha * -0.027777777777777776)); else tmp = Float64(Float64(Float64(1.0 + alpha) / Float64(beta + Float64(alpha + 2.0))) * Float64(1.0 / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 2.0)
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
else
tmp = ((1.0 + alpha) / (beta + (alpha + 2.0))) * (1.0 / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 2.0], N[(0.08333333333333333 + N[(alpha * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta + N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2:\\
\;\;\;\;0.08333333333333333 + \alpha \cdot -0.027777777777777776\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta + \left(\alpha + 2\right)} \cdot \frac{1}{\beta}\\
\end{array}
\end{array}
if beta < 2Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 95.5%
Taylor expanded in alpha around 0 60.7%
*-commutative60.7%
Simplified60.7%
if 2 < beta Initial program 82.1%
Taylor expanded in beta around inf 77.7%
div-inv77.6%
metadata-eval77.6%
+-commutative77.6%
associate-+r+77.6%
metadata-eval77.6%
associate-+l+77.6%
+-commutative77.6%
metadata-eval77.6%
Applied egg-rr77.6%
Taylor expanded in beta around inf 77.1%
Final simplification66.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.4) (+ 0.08333333333333333 (* alpha -0.027777777777777776)) (/ 1.0 (* beta (/ beta (+ 1.0 alpha))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.4) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = 1.0 / (beta * (beta / (1.0 + alpha)));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.4d0) then
tmp = 0.08333333333333333d0 + (alpha * (-0.027777777777777776d0))
else
tmp = 1.0d0 / (beta * (beta / (1.0d0 + alpha)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.4) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = 1.0 / (beta * (beta / (1.0 + alpha)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.4: tmp = 0.08333333333333333 + (alpha * -0.027777777777777776) else: tmp = 1.0 / (beta * (beta / (1.0 + alpha))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.4) tmp = Float64(0.08333333333333333 + Float64(alpha * -0.027777777777777776)); else tmp = Float64(1.0 / Float64(beta * Float64(beta / Float64(1.0 + alpha)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.4)
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
else
tmp = 1.0 / (beta * (beta / (1.0 + alpha)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.4], N[(0.08333333333333333 + N[(alpha * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * N[(beta / N[(1.0 + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.4:\\
\;\;\;\;0.08333333333333333 + \alpha \cdot -0.027777777777777776\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \frac{\beta}{1 + \alpha}}\\
\end{array}
\end{array}
if beta < 3.39999999999999991Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 95.5%
Taylor expanded in alpha around 0 60.7%
*-commutative60.7%
Simplified60.7%
if 3.39999999999999991 < beta Initial program 82.1%
associate-/l/78.1%
associate-+l+78.1%
+-commutative78.1%
associate-+r+78.1%
associate-+l+78.1%
distribute-rgt1-in78.1%
*-rgt-identity78.1%
distribute-lft-out78.1%
+-commutative78.1%
associate-*l/84.1%
*-commutative84.1%
associate-*r/83.0%
Simplified83.0%
Taylor expanded in beta around inf 72.0%
unpow272.0%
Simplified72.0%
clear-num72.0%
inv-pow72.0%
Applied egg-rr72.0%
unpow-172.0%
Simplified72.0%
expm1-log1p-u68.9%
expm1-udef68.9%
associate-/l*72.9%
Applied egg-rr72.9%
expm1-def72.9%
expm1-log1p76.2%
associate-/r/76.3%
Simplified76.3%
Final simplification65.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.5) (+ 0.08333333333333333 (* alpha -0.027777777777777776)) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.5d0) then
tmp = 0.08333333333333333d0 + (alpha * (-0.027777777777777776d0))
else
tmp = (1.0d0 + alpha) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.5) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.5: tmp = 0.08333333333333333 + (alpha * -0.027777777777777776) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.5) tmp = Float64(0.08333333333333333 + Float64(alpha * -0.027777777777777776)); else tmp = Float64(Float64(1.0 + alpha) / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.5)
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
else
tmp = (1.0 + alpha) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.5], N[(0.08333333333333333 + N[(alpha * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.5:\\
\;\;\;\;0.08333333333333333 + \alpha \cdot -0.027777777777777776\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.5Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 95.5%
Taylor expanded in alpha around 0 60.7%
*-commutative60.7%
Simplified60.7%
if 3.5 < beta Initial program 82.1%
associate-/l/78.1%
associate-+l+78.1%
+-commutative78.1%
associate-+r+78.1%
associate-+l+78.1%
distribute-rgt1-in78.1%
*-rgt-identity78.1%
distribute-lft-out78.1%
+-commutative78.1%
associate-*l/84.1%
*-commutative84.1%
associate-*r/83.0%
Simplified83.0%
Taylor expanded in beta around inf 72.0%
unpow272.0%
Simplified72.0%
Final simplification64.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 2.7) (+ 0.08333333333333333 (* alpha -0.027777777777777776)) (/ 1.0 (* alpha alpha))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 2.7) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = 1.0 / (alpha * alpha);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (alpha <= 2.7d0) then
tmp = 0.08333333333333333d0 + (alpha * (-0.027777777777777776d0))
else
tmp = 1.0d0 / (alpha * alpha)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 2.7) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = 1.0 / (alpha * alpha);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 2.7: tmp = 0.08333333333333333 + (alpha * -0.027777777777777776) else: tmp = 1.0 / (alpha * alpha) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 2.7) tmp = Float64(0.08333333333333333 + Float64(alpha * -0.027777777777777776)); else tmp = Float64(1.0 / Float64(alpha * alpha)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 2.7)
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
else
tmp = 1.0 / (alpha * alpha);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[alpha, 2.7], N[(0.08333333333333333 + N[(alpha * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(alpha * alpha), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 2.7:\\
\;\;\;\;0.08333333333333333 + \alpha \cdot -0.027777777777777776\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\alpha \cdot \alpha}\\
\end{array}
\end{array}
if alpha < 2.7000000000000002Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.5%
associate-*r/92.8%
Simplified92.8%
distribute-lft-in92.8%
associate-+r+92.8%
+-commutative92.8%
associate-+r+92.8%
+-commutative92.8%
Applied egg-rr92.8%
Taylor expanded in beta around 0 65.9%
Taylor expanded in alpha around 0 65.6%
*-commutative65.6%
Simplified65.6%
if 2.7000000000000002 < alpha Initial program 84.1%
associate-/l/80.8%
associate-+l+80.8%
+-commutative80.8%
associate-+r+80.8%
associate-+l+80.8%
distribute-rgt1-in80.8%
*-rgt-identity80.8%
distribute-lft-out80.8%
+-commutative80.8%
associate-*r/86.1%
associate-*r/86.1%
Simplified86.1%
distribute-lft-in86.1%
associate-+r+86.1%
+-commutative86.1%
associate-+r+86.1%
+-commutative86.1%
Applied egg-rr86.1%
Taylor expanded in beta around 0 73.1%
Taylor expanded in alpha around inf 77.4%
unpow277.4%
Simplified77.4%
Final simplification70.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 3.1) (+ 0.08333333333333333 (* alpha -0.027777777777777776)) (/ 1.0 (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 3.1) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 3.1d0) then
tmp = 0.08333333333333333d0 + (alpha * (-0.027777777777777776d0))
else
tmp = 1.0d0 / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 3.1) {
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
} else {
tmp = 1.0 / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 3.1: tmp = 0.08333333333333333 + (alpha * -0.027777777777777776) else: tmp = 1.0 / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 3.1) tmp = Float64(0.08333333333333333 + Float64(alpha * -0.027777777777777776)); else tmp = Float64(1.0 / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 3.1)
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
else
tmp = 1.0 / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 3.1], N[(0.08333333333333333 + N[(alpha * -0.027777777777777776), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 3.1:\\
\;\;\;\;0.08333333333333333 + \alpha \cdot -0.027777777777777776\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\end{array}
\end{array}
if beta < 3.10000000000000009Initial program 99.9%
associate-/l/99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
associate-+l+99.6%
distribute-rgt1-in99.6%
*-rgt-identity99.6%
distribute-lft-out99.6%
+-commutative99.6%
associate-*r/99.6%
associate-*r/99.7%
Simplified99.7%
distribute-lft-in99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in beta around 0 95.5%
Taylor expanded in alpha around 0 60.7%
*-commutative60.7%
Simplified60.7%
if 3.10000000000000009 < beta Initial program 82.1%
associate-/l/78.1%
associate-+l+78.1%
+-commutative78.1%
associate-+r+78.1%
associate-+l+78.1%
distribute-rgt1-in78.1%
*-rgt-identity78.1%
distribute-lft-out78.1%
+-commutative78.1%
associate-*l/84.1%
*-commutative84.1%
associate-*r/83.0%
Simplified83.0%
Taylor expanded in beta around inf 72.0%
unpow272.0%
Simplified72.0%
Taylor expanded in alpha around 0 72.3%
unpow272.3%
Simplified72.3%
Final simplification64.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (+ 0.08333333333333333 (* alpha -0.027777777777777776)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.08333333333333333 + (alpha * -0.027777777777777776);
}
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 + (alpha * (-0.027777777777777776d0))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.08333333333333333 + (alpha * -0.027777777777777776);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.08333333333333333 + (alpha * -0.027777777777777776)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.08333333333333333 + Float64(alpha * -0.027777777777777776)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.08333333333333333 + (alpha * -0.027777777777777776);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.08333333333333333 + N[(alpha * -0.027777777777777776), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.08333333333333333 + \alpha \cdot -0.027777777777777776
\end{array}
Initial program 94.1%
associate-/l/92.7%
associate-+l+92.7%
+-commutative92.7%
associate-+r+92.7%
associate-+l+92.7%
distribute-rgt1-in92.7%
*-rgt-identity92.7%
distribute-lft-out92.7%
+-commutative92.7%
associate-*r/94.6%
associate-*r/90.3%
Simplified90.3%
distribute-lft-in90.3%
associate-+r+90.3%
+-commutative90.3%
associate-+r+90.3%
+-commutative90.3%
Applied egg-rr90.3%
Taylor expanded in beta around 0 68.6%
Taylor expanded in alpha around 0 42.2%
*-commutative42.2%
Simplified42.2%
Final simplification42.2%
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.7%
associate-+l+92.7%
+-commutative92.7%
associate-+r+92.7%
associate-+l+92.7%
distribute-rgt1-in92.7%
*-rgt-identity92.7%
distribute-lft-out92.7%
+-commutative92.7%
associate-*r/94.6%
associate-*r/90.3%
Simplified90.3%
distribute-lft-in90.3%
associate-+r+90.3%
+-commutative90.3%
associate-+r+90.3%
+-commutative90.3%
Applied egg-rr90.3%
Taylor expanded in beta around 0 68.6%
Taylor expanded in alpha around 0 42.5%
Final simplification42.5%
herbie shell --seed 2023215
(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)))