
(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 20 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 (+ 2.0 beta)))) (* (/ (/ (+ 1.0 alpha) t_0) t_0) (/ (+ 1.0 beta) (+ 3.0 (+ alpha beta))))))
assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)));
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: t_0
t_0 = alpha + (2.0d0 + beta)
code = (((1.0d0 + alpha) / t_0) / t_0) * ((1.0d0 + beta) / (3.0d0 + (alpha + beta)))
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)));
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) return (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)))
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) return Float64(Float64(Float64(Float64(1.0 + alpha) / t_0) / t_0) * Float64(Float64(1.0 + beta) / Float64(3.0 + Float64(alpha + beta)))) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
t_0 = alpha + (2.0 + beta);
tmp = (((1.0 + alpha) / t_0) / t_0) * ((1.0 + beta) / (3.0 + (alpha + beta)));
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\frac{\frac{1 + \alpha}{t_0}}{t_0} \cdot \frac{1 + \beta}{3 + \left(\alpha + \beta\right)}
\end{array}
\end{array}
Initial program 95.6%
associate-/l/92.8%
associate-/r*86.7%
+-commutative86.7%
associate-+r+86.7%
+-commutative86.7%
associate-+r+86.7%
associate-+r+86.7%
distribute-rgt1-in86.7%
+-commutative86.7%
*-commutative86.7%
distribute-rgt1-in86.7%
+-commutative86.7%
times-frac96.7%
Simplified96.7%
expm1-log1p-u96.7%
expm1-udef69.3%
*-commutative69.3%
+-commutative69.3%
Applied egg-rr69.3%
expm1-def96.7%
expm1-log1p96.7%
*-commutative96.7%
associate-*r/96.8%
times-frac99.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 (+ 2.0 beta))))
(if (<= beta 5.4e+18)
(* (/ (+ 1.0 alpha) t_0) (/ (+ 1.0 beta) (* t_0 (+ beta (+ alpha 3.0)))))
(*
(/ (+ 1.0 beta) (+ 3.0 (+ alpha beta)))
(/ (/ (+ 1.0 alpha) beta) t_0)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 5.4e+18) {
tmp = ((1.0 + alpha) / t_0) * ((1.0 + beta) / (t_0 * (beta + (alpha + 3.0))));
} else {
tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((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 + (2.0d0 + beta)
if (beta <= 5.4d+18) then
tmp = ((1.0d0 + alpha) / t_0) * ((1.0d0 + beta) / (t_0 * (beta + (alpha + 3.0d0))))
else
tmp = ((1.0d0 + beta) / (3.0d0 + (alpha + beta))) * (((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 + (2.0 + beta);
double tmp;
if (beta <= 5.4e+18) {
tmp = ((1.0 + alpha) / t_0) * ((1.0 + beta) / (t_0 * (beta + (alpha + 3.0))));
} else {
tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((1.0 + alpha) / beta) / t_0);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = alpha + (2.0 + beta) tmp = 0 if beta <= 5.4e+18: tmp = ((1.0 + alpha) / t_0) * ((1.0 + beta) / (t_0 * (beta + (alpha + 3.0)))) else: tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((1.0 + alpha) / beta) / t_0) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 5.4e+18) tmp = Float64(Float64(Float64(1.0 + alpha) / t_0) * Float64(Float64(1.0 + beta) / Float64(t_0 * Float64(beta + Float64(alpha + 3.0))))); else tmp = Float64(Float64(Float64(1.0 + beta) / Float64(3.0 + Float64(alpha + beta))) * 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 + (2.0 + beta);
tmp = 0.0;
if (beta <= 5.4e+18)
tmp = ((1.0 + alpha) / t_0) * ((1.0 + beta) / (t_0 * (beta + (alpha + 3.0))));
else
tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((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[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 5.4e+18], N[(N[(N[(1.0 + alpha), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(1.0 + beta), $MachinePrecision] / N[(t$95$0 * N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 5.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{1 + \alpha}{t_0} \cdot \frac{1 + \beta}{t_0 \cdot \left(\beta + \left(\alpha + 3\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \beta}{3 + \left(\alpha + \beta\right)} \cdot \frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 5.4e18Initial program 99.8%
associate-/l/98.6%
associate-/r*94.6%
+-commutative94.6%
associate-+r+94.6%
+-commutative94.6%
associate-+r+94.6%
associate-+r+94.6%
distribute-rgt1-in94.6%
+-commutative94.6%
*-commutative94.6%
distribute-rgt1-in94.6%
+-commutative94.6%
times-frac98.6%
Simplified98.6%
if 5.4e18 < beta Initial program 85.4%
associate-/l/78.8%
associate-/r*67.8%
+-commutative67.8%
associate-+r+67.8%
+-commutative67.8%
associate-+r+67.8%
associate-+r+67.8%
distribute-rgt1-in67.8%
+-commutative67.8%
*-commutative67.8%
distribute-rgt1-in67.8%
+-commutative67.8%
times-frac92.2%
Simplified92.2%
expm1-log1p-u92.2%
expm1-udef55.9%
*-commutative55.9%
+-commutative55.9%
Applied egg-rr55.9%
expm1-def92.2%
expm1-log1p92.2%
*-commutative92.2%
associate-*r/92.2%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in beta around inf 83.6%
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 (/ (+ 1.0 alpha) (+ alpha (+ 2.0 beta)))))
(if (<= beta 8.5)
(* t_0 (/ (/ 1.0 (+ alpha 2.0)) (+ alpha 3.0)))
(* t_0 (- (/ 1.0 beta) (* (/ (+ alpha 2.0) beta) (/ 2.0 beta)))))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = (1.0 + alpha) / (alpha + (2.0 + beta));
double tmp;
if (beta <= 8.5) {
tmp = t_0 * ((1.0 / (alpha + 2.0)) / (alpha + 3.0));
} else {
tmp = t_0 * ((1.0 / beta) - (((alpha + 2.0) / beta) * (2.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) :: t_0
real(8) :: tmp
t_0 = (1.0d0 + alpha) / (alpha + (2.0d0 + beta))
if (beta <= 8.5d0) then
tmp = t_0 * ((1.0d0 / (alpha + 2.0d0)) / (alpha + 3.0d0))
else
tmp = t_0 * ((1.0d0 / beta) - (((alpha + 2.0d0) / beta) * (2.0d0 / beta)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double t_0 = (1.0 + alpha) / (alpha + (2.0 + beta));
double tmp;
if (beta <= 8.5) {
tmp = t_0 * ((1.0 / (alpha + 2.0)) / (alpha + 3.0));
} else {
tmp = t_0 * ((1.0 / beta) - (((alpha + 2.0) / beta) * (2.0 / beta)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = (1.0 + alpha) / (alpha + (2.0 + beta)) tmp = 0 if beta <= 8.5: tmp = t_0 * ((1.0 / (alpha + 2.0)) / (alpha + 3.0)) else: tmp = t_0 * ((1.0 / beta) - (((alpha + 2.0) / beta) * (2.0 / beta))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(Float64(1.0 + alpha) / Float64(alpha + Float64(2.0 + beta))) tmp = 0.0 if (beta <= 8.5) tmp = Float64(t_0 * Float64(Float64(1.0 / Float64(alpha + 2.0)) / Float64(alpha + 3.0))); else tmp = Float64(t_0 * Float64(Float64(1.0 / beta) - Float64(Float64(Float64(alpha + 2.0) / beta) * Float64(2.0 / beta)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
t_0 = (1.0 + alpha) / (alpha + (2.0 + beta));
tmp = 0.0;
if (beta <= 8.5)
tmp = t_0 * ((1.0 / (alpha + 2.0)) / (alpha + 3.0));
else
tmp = t_0 * ((1.0 / beta) - (((alpha + 2.0) / beta) * (2.0 / beta)));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_] := Block[{t$95$0 = N[(N[(1.0 + alpha), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 8.5], N[(t$95$0 * N[(N[(1.0 / N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(1.0 / beta), $MachinePrecision] - N[(N[(N[(alpha + 2.0), $MachinePrecision] / beta), $MachinePrecision] * N[(2.0 / beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \frac{1 + \alpha}{\alpha + \left(2 + \beta\right)}\\
\mathbf{if}\;\beta \leq 8.5:\\
\;\;\;\;t_0 \cdot \frac{\frac{1}{\alpha + 2}}{\alpha + 3}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\frac{1}{\beta} - \frac{\alpha + 2}{\beta} \cdot \frac{2}{\beta}\right)\\
\end{array}
\end{array}
if beta < 8.5Initial program 99.9%
associate-/l/98.6%
associate-/r*94.4%
+-commutative94.4%
associate-+r+94.4%
+-commutative94.4%
associate-+r+94.3%
associate-+r+94.4%
distribute-rgt1-in94.4%
+-commutative94.4%
*-commutative94.4%
distribute-rgt1-in94.3%
+-commutative94.3%
times-frac98.6%
Simplified98.6%
Taylor expanded in beta around 0 97.6%
associate-/r*98.9%
+-commutative98.9%
Simplified98.9%
if 8.5 < beta Initial program 86.6%
associate-/l/80.6%
associate-/r*70.5%
+-commutative70.5%
associate-+r+70.5%
+-commutative70.5%
associate-+r+70.5%
associate-+r+70.5%
distribute-rgt1-in70.5%
+-commutative70.5%
*-commutative70.5%
distribute-rgt1-in70.5%
+-commutative70.5%
times-frac92.8%
Simplified92.8%
Taylor expanded in beta around inf 83.5%
+-commutative83.5%
mul-1-neg83.5%
unsub-neg83.5%
metadata-eval83.5%
distribute-lft-in83.5%
*-commutative83.5%
unpow283.5%
times-frac83.6%
Simplified83.6%
Final simplification94.0%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(let* ((t_0 (+ 3.0 (+ alpha beta))) (t_1 (+ alpha (+ 2.0 beta))))
(if (<= beta 1.12e+32)
(/ (/ (+ 1.0 (+ alpha beta)) t_1) (* t_0 t_1))
(* (/ (+ 1.0 beta) t_0) (/ (/ (+ 1.0 alpha) beta) t_1)))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = 3.0 + (alpha + beta);
double t_1 = alpha + (2.0 + beta);
double tmp;
if (beta <= 1.12e+32) {
tmp = ((1.0 + (alpha + beta)) / t_1) / (t_0 * t_1);
} else {
tmp = ((1.0 + beta) / t_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 = 3.0d0 + (alpha + beta)
t_1 = alpha + (2.0d0 + beta)
if (beta <= 1.12d+32) then
tmp = ((1.0d0 + (alpha + beta)) / t_1) / (t_0 * t_1)
else
tmp = ((1.0d0 + beta) / t_0) * (((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 = 3.0 + (alpha + beta);
double t_1 = alpha + (2.0 + beta);
double tmp;
if (beta <= 1.12e+32) {
tmp = ((1.0 + (alpha + beta)) / t_1) / (t_0 * t_1);
} else {
tmp = ((1.0 + beta) / t_0) * (((1.0 + alpha) / beta) / t_1);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): t_0 = 3.0 + (alpha + beta) t_1 = alpha + (2.0 + beta) tmp = 0 if beta <= 1.12e+32: tmp = ((1.0 + (alpha + beta)) / t_1) / (t_0 * t_1) else: tmp = ((1.0 + beta) / t_0) * (((1.0 + alpha) / beta) / t_1) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) t_0 = Float64(3.0 + Float64(alpha + beta)) t_1 = Float64(alpha + Float64(2.0 + beta)) tmp = 0.0 if (beta <= 1.12e+32) tmp = Float64(Float64(Float64(1.0 + Float64(alpha + beta)) / t_1) / Float64(t_0 * t_1)); else tmp = Float64(Float64(Float64(1.0 + beta) / t_0) * Float64(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 = 3.0 + (alpha + beta);
t_1 = alpha + (2.0 + beta);
tmp = 0.0;
if (beta <= 1.12e+32)
tmp = ((1.0 + (alpha + beta)) / t_1) / (t_0 * t_1);
else
tmp = ((1.0 + beta) / t_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[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 1.12e+32], N[(N[(N[(1.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / N[(t$95$0 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + beta), $MachinePrecision] / t$95$0), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := 3 + \left(\alpha + \beta\right)\\
t_1 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 1.12 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{1 + \left(\alpha + \beta\right)}{t_1}}{t_0 \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \beta}{t_0} \cdot \frac{\frac{1 + \alpha}{\beta}}{t_1}\\
\end{array}
\end{array}
if beta < 1.12000000000000007e32Initial program 99.8%
associate-/l/98.6%
associate-+l+98.6%
+-commutative98.6%
*-commutative98.6%
associate-+l+98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.7%
Taylor expanded in beta around 0 97.4%
if 1.12000000000000007e32 < beta Initial program 84.4%
associate-/l/77.3%
associate-/r*66.8%
+-commutative66.8%
associate-+r+66.8%
+-commutative66.8%
associate-+r+66.8%
associate-+r+66.8%
distribute-rgt1-in66.8%
+-commutative66.8%
*-commutative66.8%
distribute-rgt1-in66.8%
+-commutative66.8%
times-frac91.6%
Simplified91.6%
expm1-log1p-u91.6%
expm1-udef58.2%
*-commutative58.2%
+-commutative58.2%
Applied egg-rr58.2%
expm1-def91.6%
expm1-log1p91.6%
*-commutative91.6%
associate-*r/91.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 86.4%
Final simplification94.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta)
:precision binary64
(if (<= beta 6e+31)
(/ (/ (+ 1.0 beta) (+ 2.0 beta)) (* (+ 2.0 beta) (+ beta 3.0)))
(*
(/ (+ 1.0 beta) (+ 3.0 (+ alpha beta)))
(/ (/ (+ 1.0 alpha) beta) (+ alpha (+ 2.0 beta))))))assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 6e+31) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((1.0 + alpha) / beta) / (alpha + (2.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 <= 6d+31) then
tmp = ((1.0d0 + beta) / (2.0d0 + beta)) / ((2.0d0 + beta) * (beta + 3.0d0))
else
tmp = ((1.0d0 + beta) / (3.0d0 + (alpha + beta))) * (((1.0d0 + alpha) / beta) / (alpha + (2.0d0 + beta)))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 6e+31) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((1.0 + alpha) / beta) / (alpha + (2.0 + beta)));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 6e+31: tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0)) else: tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((1.0 + alpha) / beta) / (alpha + (2.0 + beta))) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 6e+31) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(2.0 + beta)) / Float64(Float64(2.0 + beta) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + beta) / Float64(3.0 + Float64(alpha + beta))) * Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + Float64(2.0 + beta)))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 6e+31)
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0));
else
tmp = ((1.0 + beta) / (3.0 + (alpha + beta))) * (((1.0 + alpha) / beta) / (alpha + (2.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, 6e+31], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(3.0 + N[(alpha + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 6 \cdot 10^{+31}:\\
\;\;\;\;\frac{\frac{1 + \beta}{2 + \beta}}{\left(2 + \beta\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \beta}{3 + \left(\alpha + \beta\right)} \cdot \frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(2 + \beta\right)}\\
\end{array}
\end{array}
if beta < 5.99999999999999978e31Initial program 99.8%
associate-/l/98.6%
associate-+l+98.6%
+-commutative98.6%
*-commutative98.6%
associate-+l+98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.7%
Taylor expanded in alpha around 0 80.4%
Taylor expanded in alpha around 0 60.8%
+-commutative56.4%
Simplified60.8%
if 5.99999999999999978e31 < beta Initial program 84.4%
associate-/l/77.3%
associate-/r*66.8%
+-commutative66.8%
associate-+r+66.8%
+-commutative66.8%
associate-+r+66.8%
associate-+r+66.8%
distribute-rgt1-in66.8%
+-commutative66.8%
*-commutative66.8%
distribute-rgt1-in66.8%
+-commutative66.8%
times-frac91.6%
Simplified91.6%
expm1-log1p-u91.6%
expm1-udef58.2%
*-commutative58.2%
+-commutative58.2%
Applied egg-rr58.2%
expm1-def91.6%
expm1-log1p91.6%
*-commutative91.6%
associate-*r/91.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in beta around inf 86.4%
Final simplification67.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 9e+31) (/ (/ (+ 1.0 beta) (+ 2.0 beta)) (* (+ 2.0 beta) (+ beta 3.0))) (/ (/ (+ 1.0 alpha) beta) (+ alpha (+ 2.0 beta)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 9e+31) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (2.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 <= 9d+31) then
tmp = ((1.0d0 + beta) / (2.0d0 + beta)) / ((2.0d0 + beta) * (beta + 3.0d0))
else
tmp = ((1.0d0 + alpha) / beta) / (alpha + (2.0d0 + beta))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 9e+31) {
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((1.0 + alpha) / beta) / (alpha + (2.0 + beta));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 9e+31: tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0)) else: tmp = ((1.0 + alpha) / beta) / (alpha + (2.0 + beta)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 9e+31) tmp = Float64(Float64(Float64(1.0 + beta) / Float64(2.0 + beta)) / Float64(Float64(2.0 + beta) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(1.0 + alpha) / beta) / Float64(alpha + Float64(2.0 + beta))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 9e+31)
tmp = ((1.0 + beta) / (2.0 + beta)) / ((2.0 + beta) * (beta + 3.0));
else
tmp = ((1.0 + alpha) / beta) / (alpha + (2.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, 9e+31], N[(N[(N[(1.0 + beta), $MachinePrecision] / N[(2.0 + beta), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 9 \cdot 10^{+31}:\\
\;\;\;\;\frac{\frac{1 + \beta}{2 + \beta}}{\left(2 + \beta\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{\alpha + \left(2 + \beta\right)}\\
\end{array}
\end{array}
if beta < 8.9999999999999992e31Initial program 99.8%
associate-/l/98.6%
associate-+l+98.6%
+-commutative98.6%
*-commutative98.6%
associate-+l+98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.7%
Taylor expanded in alpha around 0 80.4%
Taylor expanded in alpha around 0 60.8%
+-commutative56.4%
Simplified60.8%
if 8.9999999999999992e31 < beta Initial program 84.4%
associate-/l/77.3%
associate-/r*66.8%
+-commutative66.8%
associate-+r+66.8%
+-commutative66.8%
associate-+r+66.8%
associate-+r+66.8%
distribute-rgt1-in66.8%
+-commutative66.8%
*-commutative66.8%
distribute-rgt1-in66.8%
+-commutative66.8%
times-frac91.6%
Simplified91.6%
expm1-log1p-u91.6%
expm1-udef58.2%
*-commutative58.2%
+-commutative58.2%
Applied egg-rr58.2%
expm1-def91.6%
expm1-log1p91.6%
*-commutative91.6%
associate-*r/91.7%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 86.0%
Final simplification67.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 10.0) (/ (/ 0.5 (+ alpha 3.0)) (+ alpha (+ 2.0 beta))) (/ (/ (- alpha -1.0) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 10.0) {
tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta));
} else {
tmp = ((alpha - -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 <= 10.0d0) then
tmp = (0.5d0 / (alpha + 3.0d0)) / (alpha + (2.0d0 + beta))
else
tmp = ((alpha - (-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 <= 10.0) {
tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta));
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 10.0: tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta)) else: tmp = ((alpha - -1.0) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 10.0) tmp = Float64(Float64(0.5 / Float64(alpha + 3.0)) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 10.0)
tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta));
else
tmp = ((alpha - -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, 10.0], N[(N[(0.5 / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 10:\\
\;\;\;\;\frac{\frac{0.5}{\alpha + 3}}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 10Initial program 99.9%
associate-/l/98.6%
associate-/r*94.4%
+-commutative94.4%
associate-+r+94.4%
+-commutative94.4%
associate-+r+94.3%
associate-+r+94.4%
distribute-rgt1-in94.4%
+-commutative94.4%
*-commutative94.4%
distribute-rgt1-in94.3%
+-commutative94.3%
times-frac98.6%
Simplified98.6%
expm1-log1p-u98.6%
expm1-udef77.3%
*-commutative77.3%
+-commutative77.3%
Applied egg-rr77.3%
expm1-def98.6%
expm1-log1p98.6%
*-commutative98.6%
associate-*r/98.6%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
associate-*l/99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 80.2%
Taylor expanded in beta around 0 79.6%
+-commutative79.6%
Simplified79.6%
if 10 < beta Initial program 86.6%
Taylor expanded in beta around -inf 81.7%
associate-*r/81.7%
mul-1-neg81.7%
sub-neg81.7%
mul-1-neg81.7%
distribute-neg-in81.7%
+-commutative81.7%
mul-1-neg81.7%
distribute-lft-in81.7%
metadata-eval81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in beta around inf 81.4%
Final simplification80.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))))
(if (<= beta 11.0)
(/ (/ 0.5 (+ alpha 3.0)) t_0)
(/ (/ (+ 1.0 alpha) beta) t_0))))assert(alpha < beta);
double code(double alpha, double beta) {
double t_0 = alpha + (2.0 + beta);
double tmp;
if (beta <= 11.0) {
tmp = (0.5 / (alpha + 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 + (2.0d0 + beta)
if (beta <= 11.0d0) then
tmp = (0.5d0 / (alpha + 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 + (2.0 + beta);
double tmp;
if (beta <= 11.0) {
tmp = (0.5 / (alpha + 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 + (2.0 + beta) tmp = 0 if beta <= 11.0: tmp = (0.5 / (alpha + 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(2.0 + beta)) tmp = 0.0 if (beta <= 11.0) tmp = Float64(Float64(0.5 / Float64(alpha + 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 + (2.0 + beta);
tmp = 0.0;
if (beta <= 11.0)
tmp = (0.5 / (alpha + 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[(2.0 + beta), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 11.0], N[(N[(0.5 / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(1.0 + alpha), $MachinePrecision] / beta), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := \alpha + \left(2 + \beta\right)\\
\mathbf{if}\;\beta \leq 11:\\
\;\;\;\;\frac{\frac{0.5}{\alpha + 3}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1 + \alpha}{\beta}}{t_0}\\
\end{array}
\end{array}
if beta < 11Initial program 99.9%
associate-/l/98.6%
associate-/r*94.4%
+-commutative94.4%
associate-+r+94.4%
+-commutative94.4%
associate-+r+94.3%
associate-+r+94.4%
distribute-rgt1-in94.4%
+-commutative94.4%
*-commutative94.4%
distribute-rgt1-in94.3%
+-commutative94.3%
times-frac98.6%
Simplified98.6%
expm1-log1p-u98.6%
expm1-udef77.3%
*-commutative77.3%
+-commutative77.3%
Applied egg-rr77.3%
expm1-def98.6%
expm1-log1p98.6%
*-commutative98.6%
associate-*r/98.6%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
associate-*l/99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 80.2%
Taylor expanded in beta around 0 79.6%
+-commutative79.6%
Simplified79.6%
if 11 < beta Initial program 86.6%
associate-/l/80.6%
associate-/r*70.5%
+-commutative70.5%
associate-+r+70.5%
+-commutative70.5%
associate-+r+70.5%
associate-+r+70.5%
distribute-rgt1-in70.5%
+-commutative70.5%
*-commutative70.5%
distribute-rgt1-in70.5%
+-commutative70.5%
times-frac92.8%
Simplified92.8%
expm1-log1p-u92.8%
expm1-udef52.3%
*-commutative52.3%
+-commutative52.3%
Applied egg-rr52.3%
expm1-def92.8%
expm1-log1p92.8%
*-commutative92.8%
associate-*r/92.8%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in beta around inf 81.7%
Final simplification80.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 7.6) (/ (/ 0.5 (+ alpha 3.0)) (+ alpha (+ 2.0 beta))) (/ (/ (- alpha -1.0) beta) (+ beta (+ alpha 3.0)))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta));
} else {
tmp = ((alpha - -1.0) / beta) / (beta + (alpha + 3.0));
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (beta <= 7.6d0) then
tmp = (0.5d0 / (alpha + 3.0d0)) / (alpha + (2.0d0 + beta))
else
tmp = ((alpha - (-1.0d0)) / beta) / (beta + (alpha + 3.0d0))
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (beta <= 7.6) {
tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta));
} else {
tmp = ((alpha - -1.0) / beta) / (beta + (alpha + 3.0));
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 7.6: tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta)) else: tmp = ((alpha - -1.0) / beta) / (beta + (alpha + 3.0)) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 7.6) tmp = Float64(Float64(0.5 / Float64(alpha + 3.0)) / Float64(alpha + Float64(2.0 + beta))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / Float64(beta + Float64(alpha + 3.0))); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 7.6)
tmp = (0.5 / (alpha + 3.0)) / (alpha + (2.0 + beta));
else
tmp = ((alpha - -1.0) / beta) / (beta + (alpha + 3.0));
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[beta, 7.6], N[(N[(0.5 / N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision] / N[(alpha + N[(2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / N[(beta + N[(alpha + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 7.6:\\
\;\;\;\;\frac{\frac{0.5}{\alpha + 3}}{\alpha + \left(2 + \beta\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta + \left(\alpha + 3\right)}\\
\end{array}
\end{array}
if beta < 7.5999999999999996Initial program 99.9%
associate-/l/98.6%
associate-/r*94.4%
+-commutative94.4%
associate-+r+94.4%
+-commutative94.4%
associate-+r+94.3%
associate-+r+94.4%
distribute-rgt1-in94.4%
+-commutative94.4%
*-commutative94.4%
distribute-rgt1-in94.3%
+-commutative94.3%
times-frac98.6%
Simplified98.6%
expm1-log1p-u98.6%
expm1-udef77.3%
*-commutative77.3%
+-commutative77.3%
Applied egg-rr77.3%
expm1-def98.6%
expm1-log1p98.6%
*-commutative98.6%
associate-*r/98.6%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
Simplified99.9%
associate-*l/99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in alpha around 0 80.2%
Taylor expanded in beta around 0 79.6%
+-commutative79.6%
Simplified79.6%
if 7.5999999999999996 < beta Initial program 86.6%
Taylor expanded in beta around -inf 81.7%
associate-*r/81.7%
mul-1-neg81.7%
sub-neg81.7%
mul-1-neg81.7%
distribute-neg-in81.7%
+-commutative81.7%
mul-1-neg81.7%
distribute-lft-in81.7%
metadata-eval81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
*-un-lft-identity81.7%
associate-/l/82.4%
metadata-eval82.4%
associate-+l+82.4%
metadata-eval82.4%
associate-+l+82.4%
Applied egg-rr82.4%
associate-*r/82.4%
times-frac81.6%
*-commutative81.6%
associate-*r/81.7%
*-rgt-identity81.7%
+-commutative81.7%
+-commutative81.7%
+-commutative81.7%
associate-+r+81.7%
+-commutative81.7%
Simplified81.7%
Final simplification80.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 11.5) (/ 0.5 (* (+ alpha 3.0) (+ alpha 2.0))) (/ (/ (- alpha -1.0) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 11.5) {
tmp = 0.5 / ((alpha + 3.0) * (alpha + 2.0));
} else {
tmp = ((alpha - -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 <= 11.5d0) then
tmp = 0.5d0 / ((alpha + 3.0d0) * (alpha + 2.0d0))
else
tmp = ((alpha - (-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 <= 11.5) {
tmp = 0.5 / ((alpha + 3.0) * (alpha + 2.0));
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 11.5: tmp = 0.5 / ((alpha + 3.0) * (alpha + 2.0)) else: tmp = ((alpha - -1.0) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 11.5) tmp = Float64(0.5 / Float64(Float64(alpha + 3.0) * Float64(alpha + 2.0))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 11.5)
tmp = 0.5 / ((alpha + 3.0) * (alpha + 2.0));
else
tmp = ((alpha - -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, 11.5], N[(0.5 / N[(N[(alpha + 3.0), $MachinePrecision] * N[(alpha + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 11.5:\\
\;\;\;\;\frac{0.5}{\left(\alpha + 3\right) \cdot \left(\alpha + 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 11.5Initial program 99.9%
associate-/l/98.6%
associate-+l+98.6%
+-commutative98.6%
*-commutative98.6%
associate-+l+98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.6%
Taylor expanded in alpha around 0 80.1%
Taylor expanded in beta around 0 79.6%
+-commutative79.6%
Simplified79.6%
if 11.5 < beta Initial program 86.6%
Taylor expanded in beta around -inf 81.7%
associate-*r/81.7%
mul-1-neg81.7%
sub-neg81.7%
mul-1-neg81.7%
distribute-neg-in81.7%
+-commutative81.7%
mul-1-neg81.7%
distribute-lft-in81.7%
metadata-eval81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in beta around inf 81.4%
Final simplification80.2%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= beta 9.0) (/ 0.5 (* (+ 2.0 beta) (+ beta 3.0))) (/ (/ (- alpha -1.0) beta) beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (beta <= 9.0) {
tmp = 0.5 / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((alpha - -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 <= 9.0d0) then
tmp = 0.5d0 / ((2.0d0 + beta) * (beta + 3.0d0))
else
tmp = ((alpha - (-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 <= 9.0) {
tmp = 0.5 / ((2.0 + beta) * (beta + 3.0));
} else {
tmp = ((alpha - -1.0) / beta) / beta;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if beta <= 9.0: tmp = 0.5 / ((2.0 + beta) * (beta + 3.0)) else: tmp = ((alpha - -1.0) / beta) / beta return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (beta <= 9.0) tmp = Float64(0.5 / Float64(Float64(2.0 + beta) * Float64(beta + 3.0))); else tmp = Float64(Float64(Float64(alpha - -1.0) / beta) / beta); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (beta <= 9.0)
tmp = 0.5 / ((2.0 + beta) * (beta + 3.0));
else
tmp = ((alpha - -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, 9.0], N[(0.5 / N[(N[(2.0 + beta), $MachinePrecision] * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 9:\\
\;\;\;\;\frac{0.5}{\left(2 + \beta\right) \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\alpha - -1}{\beta}}{\beta}\\
\end{array}
\end{array}
if beta < 9Initial program 99.9%
associate-/l/98.6%
associate-+l+98.6%
+-commutative98.6%
*-commutative98.6%
associate-+l+98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Simplified98.6%
Taylor expanded in alpha around 0 80.1%
Taylor expanded in beta around 0 79.6%
Taylor expanded in alpha around 0 59.2%
+-commutative59.2%
Simplified59.2%
if 9 < beta Initial program 86.6%
Taylor expanded in beta around -inf 81.7%
associate-*r/81.7%
mul-1-neg81.7%
sub-neg81.7%
mul-1-neg81.7%
distribute-neg-in81.7%
+-commutative81.7%
mul-1-neg81.7%
distribute-lft-in81.7%
metadata-eval81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in beta around inf 81.4%
Final simplification66.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 1.0) (/ 1.0 (* beta (+ beta 3.0))) (/ alpha (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 1.0) {
tmp = 1.0 / (beta * (beta + 3.0));
} else {
tmp = alpha / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (alpha <= 1.0d0) then
tmp = 1.0d0 / (beta * (beta + 3.0d0))
else
tmp = alpha / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 1.0) {
tmp = 1.0 / (beta * (beta + 3.0));
} else {
tmp = alpha / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 1.0: tmp = 1.0 / (beta * (beta + 3.0)) else: tmp = alpha / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 1.0) tmp = Float64(1.0 / Float64(beta * Float64(beta + 3.0))); else tmp = Float64(alpha / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 1.0)
tmp = 1.0 / (beta * (beta + 3.0));
else
tmp = alpha / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[alpha, 1.0], N[(1.0 / N[(beta * N[(beta + 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 1:\\
\;\;\;\;\frac{1}{\beta \cdot \left(\beta + 3\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if alpha < 1Initial program 99.8%
Taylor expanded in beta around -inf 35.5%
associate-*r/35.5%
mul-1-neg35.5%
sub-neg35.5%
mul-1-neg35.5%
distribute-neg-in35.5%
+-commutative35.5%
mul-1-neg35.5%
distribute-lft-in35.5%
metadata-eval35.5%
mul-1-neg35.5%
unsub-neg35.5%
Simplified35.5%
Taylor expanded in alpha around 0 34.4%
if 1 < alpha Initial program 88.3%
associate-/l/82.1%
associate-/r*72.3%
+-commutative72.3%
associate-+r+72.3%
+-commutative72.3%
associate-+r+72.3%
associate-+r+72.3%
distribute-rgt1-in72.3%
+-commutative72.3%
*-commutative72.3%
distribute-rgt1-in72.3%
+-commutative72.3%
times-frac92.8%
Simplified92.8%
Taylor expanded in beta around inf 13.6%
unpow213.6%
Simplified13.6%
Taylor expanded in alpha around inf 13.6%
unpow213.6%
Simplified13.6%
Final simplification26.7%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 1.4e-18) (/ (/ 1.0 beta) (+ beta 3.0)) (/ (+ 1.0 alpha) (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 1.4e-18) {
tmp = (1.0 / beta) / (beta + 3.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (alpha <= 1.4d-18) then
tmp = (1.0d0 / beta) / (beta + 3.0d0)
else
tmp = (1.0d0 + alpha) / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 1.4e-18) {
tmp = (1.0 / beta) / (beta + 3.0);
} else {
tmp = (1.0 + alpha) / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 1.4e-18: tmp = (1.0 / beta) / (beta + 3.0) else: tmp = (1.0 + alpha) / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 1.4e-18) tmp = Float64(Float64(1.0 / beta) / Float64(beta + 3.0)); 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 (alpha <= 1.4e-18)
tmp = (1.0 / beta) / (beta + 3.0);
else
tmp = (1.0 + alpha) / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[alpha, 1.4e-18], N[(N[(1.0 / beta), $MachinePrecision] / N[(beta + 3.0), $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}\;\alpha \leq 1.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{\frac{1}{\beta}}{\beta + 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if alpha < 1.40000000000000006e-18Initial program 99.9%
Taylor expanded in beta around -inf 35.5%
associate-*r/35.5%
mul-1-neg35.5%
sub-neg35.5%
mul-1-neg35.5%
distribute-neg-in35.5%
+-commutative35.5%
mul-1-neg35.5%
distribute-lft-in35.5%
metadata-eval35.5%
mul-1-neg35.5%
unsub-neg35.5%
Simplified35.5%
Taylor expanded in alpha around 0 34.6%
associate-/r*35.5%
+-commutative35.5%
Simplified35.5%
if 1.40000000000000006e-18 < alpha Initial program 88.9%
associate-/l/83.1%
associate-/r*73.9%
+-commutative73.9%
associate-+r+73.9%
+-commutative73.9%
associate-+r+73.9%
associate-+r+73.9%
distribute-rgt1-in73.9%
+-commutative73.9%
*-commutative73.9%
distribute-rgt1-in73.9%
+-commutative73.9%
times-frac93.2%
Simplified93.2%
Taylor expanded in beta around inf 14.9%
unpow214.9%
Simplified14.9%
Final simplification27.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (if (<= alpha 1.0) (/ 1.0 (* beta beta)) (/ alpha (* beta beta))))
assert(alpha < beta);
double code(double alpha, double beta) {
double tmp;
if (alpha <= 1.0) {
tmp = 1.0 / (beta * beta);
} else {
tmp = alpha / (beta * beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8) :: tmp
if (alpha <= 1.0d0) then
tmp = 1.0d0 / (beta * beta)
else
tmp = alpha / (beta * beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
double tmp;
if (alpha <= 1.0) {
tmp = 1.0 / (beta * beta);
} else {
tmp = alpha / (beta * beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): tmp = 0 if alpha <= 1.0: tmp = 1.0 / (beta * beta) else: tmp = alpha / (beta * beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta) tmp = 0.0 if (alpha <= 1.0) tmp = Float64(1.0 / Float64(beta * beta)); else tmp = Float64(alpha / Float64(beta * beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta)
tmp = 0.0;
if (alpha <= 1.0)
tmp = 1.0 / (beta * beta);
else
tmp = alpha / (beta * beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := If[LessEqual[alpha, 1.0], N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision], N[(alpha / N[(beta * beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\alpha \leq 1:\\
\;\;\;\;\frac{1}{\beta \cdot \beta}\\
\mathbf{else}:\\
\;\;\;\;\frac{\alpha}{\beta \cdot \beta}\\
\end{array}
\end{array}
if alpha < 1Initial program 99.8%
associate-/l/99.0%
associate-/r*95.1%
+-commutative95.1%
associate-+r+95.1%
+-commutative95.1%
associate-+r+95.1%
associate-+r+95.1%
distribute-rgt1-in95.1%
+-commutative95.1%
*-commutative95.1%
distribute-rgt1-in95.1%
+-commutative95.1%
times-frac99.0%
Simplified99.0%
Taylor expanded in beta around inf 35.5%
unpow235.5%
Simplified35.5%
Taylor expanded in alpha around 0 35.2%
unpow235.2%
Simplified35.2%
if 1 < alpha Initial program 88.3%
associate-/l/82.1%
associate-/r*72.3%
+-commutative72.3%
associate-+r+72.3%
+-commutative72.3%
associate-+r+72.3%
associate-+r+72.3%
distribute-rgt1-in72.3%
+-commutative72.3%
*-commutative72.3%
distribute-rgt1-in72.3%
+-commutative72.3%
times-frac92.8%
Simplified92.8%
Taylor expanded in beta around inf 13.6%
unpow213.6%
Simplified13.6%
Taylor expanded in alpha around inf 13.6%
unpow213.6%
Simplified13.6%
Final simplification27.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (+ 1.0 alpha) (* beta beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
return (1.0 + alpha) / (beta * beta);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = (1.0d0 + alpha) / (beta * beta)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return (1.0 + alpha) / (beta * beta);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return (1.0 + alpha) / (beta * beta)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(1.0 + alpha) / Float64(beta * beta)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = (1.0 + alpha) / (beta * beta);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(1.0 + alpha), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1 + \alpha}{\beta \cdot \beta}
\end{array}
Initial program 95.6%
associate-/l/92.8%
associate-/r*86.7%
+-commutative86.7%
associate-+r+86.7%
+-commutative86.7%
associate-+r+86.7%
associate-+r+86.7%
distribute-rgt1-in86.7%
+-commutative86.7%
*-commutative86.7%
distribute-rgt1-in86.7%
+-commutative86.7%
times-frac96.7%
Simplified96.7%
Taylor expanded in beta around inf 27.5%
unpow227.5%
Simplified27.5%
Final simplification27.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ (/ (- alpha -1.0) beta) beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return ((alpha - -1.0) / beta) / beta;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = ((alpha - (-1.0d0)) / beta) / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return ((alpha - -1.0) / beta) / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return ((alpha - -1.0) / beta) / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(Float64(Float64(alpha - -1.0) / beta) / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = ((alpha - -1.0) / beta) / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(N[(N[(alpha - -1.0), $MachinePrecision] / beta), $MachinePrecision] / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{\frac{\alpha - -1}{\beta}}{\beta}
\end{array}
Initial program 95.6%
Taylor expanded in beta around -inf 27.9%
associate-*r/27.9%
mul-1-neg27.9%
sub-neg27.9%
mul-1-neg27.9%
distribute-neg-in27.9%
+-commutative27.9%
mul-1-neg27.9%
distribute-lft-in27.9%
metadata-eval27.9%
mul-1-neg27.9%
unsub-neg27.9%
Simplified27.9%
Taylor expanded in beta around inf 28.3%
Final simplification28.3%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 0.5 (* beta beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 0.5 / (beta * beta);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 0.5d0 / (beta * beta)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 0.5 / (beta * beta);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 0.5 / (beta * beta)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(0.5 / Float64(beta * beta)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 0.5 / (beta * beta);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(0.5 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{0.5}{\beta \cdot \beta}
\end{array}
Initial program 95.6%
associate-/l/92.8%
associate-+l+92.8%
+-commutative92.8%
*-commutative92.8%
associate-+l+92.8%
+-commutative92.8%
+-commutative92.8%
+-commutative92.8%
Simplified92.8%
Taylor expanded in alpha around 0 82.2%
Taylor expanded in beta around 0 72.2%
Taylor expanded in beta around inf 18.4%
unpow218.4%
Simplified18.4%
Final simplification18.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 (* beta beta)))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / (beta * beta);
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 1.0d0 / (beta * beta)
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / (beta * beta);
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / (beta * beta)
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / Float64(beta * beta)) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / (beta * beta);
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / N[(beta * beta), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\beta \cdot \beta}
\end{array}
Initial program 95.6%
associate-/l/92.8%
associate-/r*86.7%
+-commutative86.7%
associate-+r+86.7%
+-commutative86.7%
associate-+r+86.7%
associate-+r+86.7%
distribute-rgt1-in86.7%
+-commutative86.7%
*-commutative86.7%
distribute-rgt1-in86.7%
+-commutative86.7%
times-frac96.7%
Simplified96.7%
Taylor expanded in beta around inf 27.5%
unpow227.5%
Simplified27.5%
Taylor expanded in alpha around 0 27.1%
unpow227.1%
Simplified27.1%
Final simplification27.1%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 alpha))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / alpha;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 1.0d0 / alpha
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / alpha;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / alpha
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / alpha) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / alpha;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / alpha), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\alpha}
\end{array}
Initial program 95.6%
associate-/l/92.8%
associate-+l+92.8%
+-commutative92.8%
*-commutative92.8%
associate-+l+92.8%
+-commutative92.8%
+-commutative92.8%
+-commutative92.8%
Simplified92.8%
Taylor expanded in beta around -inf 48.5%
mul-1-neg48.5%
sub-neg48.5%
mul-1-neg48.5%
distribute-neg-in48.5%
+-commutative48.5%
mul-1-neg48.5%
distribute-lft-in48.5%
metadata-eval48.5%
mul-1-neg48.5%
unsub-neg48.5%
Simplified48.5%
Taylor expanded in alpha around inf 4.5%
Final simplification4.5%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta) :precision binary64 (/ 1.0 beta))
assert(alpha < beta);
double code(double alpha, double beta) {
return 1.0 / beta;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
code = 1.0d0 / beta
end function
assert alpha < beta;
public static double code(double alpha, double beta) {
return 1.0 / beta;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta): return 1.0 / beta
alpha, beta = sort([alpha, beta]) function code(alpha, beta) return Float64(1.0 / beta) end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta)
tmp = 1.0 / beta;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_] := N[(1.0 / beta), $MachinePrecision]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\frac{1}{\beta}
\end{array}
Initial program 95.6%
Taylor expanded in beta around -inf 27.9%
associate-*r/27.9%
mul-1-neg27.9%
sub-neg27.9%
mul-1-neg27.9%
distribute-neg-in27.9%
+-commutative27.9%
mul-1-neg27.9%
distribute-lft-in27.9%
metadata-eval27.9%
mul-1-neg27.9%
unsub-neg27.9%
Simplified27.9%
Taylor expanded in alpha around inf 3.9%
Final simplification3.9%
herbie shell --seed 2023275
(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)))