
(FPCore (alpha beta i)
:precision binary64
(let* ((t_0 (* i (+ (+ alpha beta) i)))
(t_1 (+ (+ alpha beta) (* 2.0 i)))
(t_2 (* t_1 t_1)))
(/ (/ (* t_0 (+ (* beta alpha) t_0)) t_2) (- t_2 1.0))))
double code(double alpha, double beta, double i) {
double t_0 = i * ((alpha + beta) + i);
double t_1 = (alpha + beta) + (2.0 * i);
double t_2 = t_1 * t_1;
return ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0);
}
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = i * ((alpha + beta) + i)
t_1 = (alpha + beta) + (2.0d0 * i)
t_2 = t_1 * t_1
code = ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0d0)
end function
public static double code(double alpha, double beta, double i) {
double t_0 = i * ((alpha + beta) + i);
double t_1 = (alpha + beta) + (2.0 * i);
double t_2 = t_1 * t_1;
return ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0);
}
def code(alpha, beta, i): t_0 = i * ((alpha + beta) + i) t_1 = (alpha + beta) + (2.0 * i) t_2 = t_1 * t_1 return ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0)
function code(alpha, beta, i) t_0 = Float64(i * Float64(Float64(alpha + beta) + i)) t_1 = Float64(Float64(alpha + beta) + Float64(2.0 * i)) t_2 = Float64(t_1 * t_1) return Float64(Float64(Float64(t_0 * Float64(Float64(beta * alpha) + t_0)) / t_2) / Float64(t_2 - 1.0)) end
function tmp = code(alpha, beta, i) t_0 = i * ((alpha + beta) + i); t_1 = (alpha + beta) + (2.0 * i); t_2 = t_1 * t_1; tmp = ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0); end
code[alpha_, beta_, i_] := Block[{t$95$0 = N[(i * N[(N[(alpha + beta), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(alpha + beta), $MachinePrecision] + N[(2.0 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * t$95$1), $MachinePrecision]}, N[(N[(N[(t$95$0 * N[(N[(beta * alpha), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / N[(t$95$2 - 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := i \cdot \left(\left(\alpha + \beta\right) + i\right)\\
t_1 := \left(\alpha + \beta\right) + 2 \cdot i\\
t_2 := t_1 \cdot t_1\\
\frac{\frac{t_0 \cdot \left(\beta \cdot \alpha + t_0\right)}{t_2}}{t_2 - 1}
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (alpha beta i)
:precision binary64
(let* ((t_0 (* i (+ (+ alpha beta) i)))
(t_1 (+ (+ alpha beta) (* 2.0 i)))
(t_2 (* t_1 t_1)))
(/ (/ (* t_0 (+ (* beta alpha) t_0)) t_2) (- t_2 1.0))))
double code(double alpha, double beta, double i) {
double t_0 = i * ((alpha + beta) + i);
double t_1 = (alpha + beta) + (2.0 * i);
double t_2 = t_1 * t_1;
return ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0);
}
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
t_0 = i * ((alpha + beta) + i)
t_1 = (alpha + beta) + (2.0d0 * i)
t_2 = t_1 * t_1
code = ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0d0)
end function
public static double code(double alpha, double beta, double i) {
double t_0 = i * ((alpha + beta) + i);
double t_1 = (alpha + beta) + (2.0 * i);
double t_2 = t_1 * t_1;
return ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0);
}
def code(alpha, beta, i): t_0 = i * ((alpha + beta) + i) t_1 = (alpha + beta) + (2.0 * i) t_2 = t_1 * t_1 return ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0)
function code(alpha, beta, i) t_0 = Float64(i * Float64(Float64(alpha + beta) + i)) t_1 = Float64(Float64(alpha + beta) + Float64(2.0 * i)) t_2 = Float64(t_1 * t_1) return Float64(Float64(Float64(t_0 * Float64(Float64(beta * alpha) + t_0)) / t_2) / Float64(t_2 - 1.0)) end
function tmp = code(alpha, beta, i) t_0 = i * ((alpha + beta) + i); t_1 = (alpha + beta) + (2.0 * i); t_2 = t_1 * t_1; tmp = ((t_0 * ((beta * alpha) + t_0)) / t_2) / (t_2 - 1.0); end
code[alpha_, beta_, i_] := Block[{t$95$0 = N[(i * N[(N[(alpha + beta), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(alpha + beta), $MachinePrecision] + N[(2.0 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * t$95$1), $MachinePrecision]}, N[(N[(N[(t$95$0 * N[(N[(beta * alpha), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / N[(t$95$2 - 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := i \cdot \left(\left(\alpha + \beta\right) + i\right)\\
t_1 := \left(\alpha + \beta\right) + 2 \cdot i\\
t_2 := t_1 \cdot t_1\\
\frac{\frac{t_0 \cdot \left(\beta \cdot \alpha + t_0\right)}{t_2}}{t_2 - 1}
\end{array}
\end{array}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(let* ((t_0 (+ (* i 2.0) (+ beta alpha))))
(if (<= beta 4.7e+101)
0.0625
(if (<= beta 9.2e+153)
(/
(-
(+
(fma i (+ i alpha) (/ (+ i alpha) (/ beta (* i i))))
(/ (pow (+ i alpha) 2.0) (/ beta i)))
(/ i (/ beta (* (+ i alpha) (fma 4.0 i (* alpha 2.0))))))
(+ (* t_0 t_0) -1.0))
(if (<= beta 1.5e+200)
(+
(+ 0.0625 (* 0.0625 (/ beta i)))
(*
0.00390625
(/
(-
(*
2.0
(-
(* 4.0 (- (- alpha (* beta -2.0)) beta))
(* 8.0 (+ beta alpha))))
(* beta 8.0))
i)))
(/ (/ (+ i alpha) beta) (/ beta i)))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double t_0 = (i * 2.0) + (beta + alpha);
double tmp;
if (beta <= 4.7e+101) {
tmp = 0.0625;
} else if (beta <= 9.2e+153) {
tmp = ((fma(i, (i + alpha), ((i + alpha) / (beta / (i * i)))) + (pow((i + alpha), 2.0) / (beta / i))) - (i / (beta / ((i + alpha) * fma(4.0, i, (alpha * 2.0)))))) / ((t_0 * t_0) + -1.0);
} else if (beta <= 1.5e+200) {
tmp = (0.0625 + (0.0625 * (beta / i))) + (0.00390625 * (((2.0 * ((4.0 * ((alpha - (beta * -2.0)) - beta)) - (8.0 * (beta + alpha)))) - (beta * 8.0)) / i));
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) t_0 = Float64(Float64(i * 2.0) + Float64(beta + alpha)) tmp = 0.0 if (beta <= 4.7e+101) tmp = 0.0625; elseif (beta <= 9.2e+153) tmp = Float64(Float64(Float64(fma(i, Float64(i + alpha), Float64(Float64(i + alpha) / Float64(beta / Float64(i * i)))) + Float64((Float64(i + alpha) ^ 2.0) / Float64(beta / i))) - Float64(i / Float64(beta / Float64(Float64(i + alpha) * fma(4.0, i, Float64(alpha * 2.0)))))) / Float64(Float64(t_0 * t_0) + -1.0)); elseif (beta <= 1.5e+200) tmp = Float64(Float64(0.0625 + Float64(0.0625 * Float64(beta / i))) + Float64(0.00390625 * Float64(Float64(Float64(2.0 * Float64(Float64(4.0 * Float64(Float64(alpha - Float64(beta * -2.0)) - beta)) - Float64(8.0 * Float64(beta + alpha)))) - Float64(beta * 8.0)) / i))); else tmp = Float64(Float64(Float64(i + alpha) / beta) / Float64(beta / i)); end return tmp end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_, i_] := Block[{t$95$0 = N[(N[(i * 2.0), $MachinePrecision] + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 4.7e+101], 0.0625, If[LessEqual[beta, 9.2e+153], N[(N[(N[(N[(i * N[(i + alpha), $MachinePrecision] + N[(N[(i + alpha), $MachinePrecision] / N[(beta / N[(i * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(i + alpha), $MachinePrecision], 2.0], $MachinePrecision] / N[(beta / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(i / N[(beta / N[(N[(i + alpha), $MachinePrecision] * N[(4.0 * i + N[(alpha * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$0 * t$95$0), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 1.5e+200], N[(N[(0.0625 + N[(0.0625 * N[(beta / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.00390625 * N[(N[(N[(2.0 * N[(N[(4.0 * N[(N[(alpha - N[(beta * -2.0), $MachinePrecision]), $MachinePrecision] - beta), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(beta * 8.0), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta / i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := i \cdot 2 + \left(\beta + \alpha\right)\\
\mathbf{if}\;\beta \leq 4.7 \cdot 10^{+101}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 9.2 \cdot 10^{+153}:\\
\;\;\;\;\frac{\left(\mathsf{fma}\left(i, i + \alpha, \frac{i + \alpha}{\frac{\beta}{i \cdot i}}\right) + \frac{{\left(i + \alpha\right)}^{2}}{\frac{\beta}{i}}\right) - \frac{i}{\frac{\beta}{\left(i + \alpha\right) \cdot \mathsf{fma}\left(4, i, \alpha \cdot 2\right)}}}{t_0 \cdot t_0 + -1}\\
\mathbf{elif}\;\beta \leq 1.5 \cdot 10^{+200}:\\
\;\;\;\;\left(0.0625 + 0.0625 \cdot \frac{\beta}{i}\right) + 0.00390625 \cdot \frac{2 \cdot \left(4 \cdot \left(\left(\alpha - \beta \cdot -2\right) - \beta\right) - 8 \cdot \left(\beta + \alpha\right)\right) - \beta \cdot 8}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{i + \alpha}{\beta}}{\frac{\beta}{i}}\\
\end{array}
\end{array}
if beta < 4.69999999999999971e101Initial program 24.4%
associate-/l/22.4%
associate-*l*22.3%
times-frac28.3%
Simplified46.1%
Taylor expanded in i around inf 79.2%
if 4.69999999999999971e101 < beta < 9.2000000000000005e153Initial program 18.8%
Taylor expanded in beta around inf 36.2%
+-commutative36.2%
fma-def36.2%
+-commutative36.2%
associate-/l*36.2%
+-commutative36.2%
unpow236.2%
associate-/l*36.4%
+-commutative36.4%
associate-/l*54.3%
+-commutative54.3%
fma-def54.3%
*-commutative54.3%
Simplified54.3%
if 9.2000000000000005e153 < beta < 1.49999999999999995e200Initial program 0.0%
times-frac11.2%
+-commutative11.2%
+-commutative11.2%
*-commutative11.2%
fma-def11.2%
+-commutative11.2%
+-commutative11.2%
*-commutative11.2%
fma-udef11.2%
+-commutative11.2%
*-commutative11.2%
fma-def11.2%
Applied egg-rr11.2%
*-commutative11.2%
+-commutative11.2%
+-commutative11.2%
*-commutative11.2%
+-commutative11.2%
associate-/l*11.2%
+-commutative11.2%
+-commutative11.2%
+-commutative11.2%
Simplified11.2%
Taylor expanded in alpha around 0 11.2%
Taylor expanded in alpha around 0 11.2%
Taylor expanded in i around inf 67.0%
if 1.49999999999999995e200 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified18.5%
Taylor expanded in beta around inf 35.0%
*-commutative35.0%
associate-/l*36.7%
+-commutative36.7%
unpow236.7%
Simplified36.7%
*-un-lft-identity36.7%
associate-/l*51.1%
Applied egg-rr51.1%
*-lft-identity51.1%
associate-/r/51.2%
Simplified51.2%
associate-/r/51.1%
add-cube-cbrt51.0%
add-exp-log50.3%
add-cube-cbrt50.3%
associate-/r/50.3%
+-commutative50.3%
*-commutative50.3%
Applied egg-rr50.3%
add-exp-log51.2%
associate-/r*82.1%
Applied egg-rr82.1%
Final simplification77.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(let* ((t_0 (+ i (+ beta alpha))) (t_1 (+ (* i 2.0) (+ beta alpha))))
(if (<= beta 4.5e+101)
0.0625
(if (<= beta 3e+153)
(/
(*
(/ (fma i t_0 (* beta alpha)) (fma i 2.0 (+ beta alpha)))
(* (/ i (+ alpha (fma i 2.0 beta))) t_0))
(+ (* t_1 t_1) -1.0))
(if (<= beta 1.32e+200)
(+
(+ 0.0625 (* 0.0625 (/ beta i)))
(*
0.00390625
(/
(-
(*
2.0
(-
(* 4.0 (- (- alpha (* beta -2.0)) beta))
(* 8.0 (+ beta alpha))))
(* beta 8.0))
i)))
(/ (/ (+ i alpha) beta) (/ beta i)))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double t_0 = i + (beta + alpha);
double t_1 = (i * 2.0) + (beta + alpha);
double tmp;
if (beta <= 4.5e+101) {
tmp = 0.0625;
} else if (beta <= 3e+153) {
tmp = ((fma(i, t_0, (beta * alpha)) / fma(i, 2.0, (beta + alpha))) * ((i / (alpha + fma(i, 2.0, beta))) * t_0)) / ((t_1 * t_1) + -1.0);
} else if (beta <= 1.32e+200) {
tmp = (0.0625 + (0.0625 * (beta / i))) + (0.00390625 * (((2.0 * ((4.0 * ((alpha - (beta * -2.0)) - beta)) - (8.0 * (beta + alpha)))) - (beta * 8.0)) / i));
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) t_0 = Float64(i + Float64(beta + alpha)) t_1 = Float64(Float64(i * 2.0) + Float64(beta + alpha)) tmp = 0.0 if (beta <= 4.5e+101) tmp = 0.0625; elseif (beta <= 3e+153) tmp = Float64(Float64(Float64(fma(i, t_0, Float64(beta * alpha)) / fma(i, 2.0, Float64(beta + alpha))) * Float64(Float64(i / Float64(alpha + fma(i, 2.0, beta))) * t_0)) / Float64(Float64(t_1 * t_1) + -1.0)); elseif (beta <= 1.32e+200) tmp = Float64(Float64(0.0625 + Float64(0.0625 * Float64(beta / i))) + Float64(0.00390625 * Float64(Float64(Float64(2.0 * Float64(Float64(4.0 * Float64(Float64(alpha - Float64(beta * -2.0)) - beta)) - Float64(8.0 * Float64(beta + alpha)))) - Float64(beta * 8.0)) / i))); else tmp = Float64(Float64(Float64(i + alpha) / beta) / Float64(beta / i)); end return tmp end
NOTE: alpha and beta should be sorted in increasing order before calling this function.
code[alpha_, beta_, i_] := Block[{t$95$0 = N[(i + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(i * 2.0), $MachinePrecision] + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[beta, 4.5e+101], 0.0625, If[LessEqual[beta, 3e+153], N[(N[(N[(N[(i * t$95$0 + N[(beta * alpha), $MachinePrecision]), $MachinePrecision] / N[(i * 2.0 + N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(i / N[(alpha + N[(i * 2.0 + beta), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$1 * t$95$1), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 1.32e+200], N[(N[(0.0625 + N[(0.0625 * N[(beta / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.00390625 * N[(N[(N[(2.0 * N[(N[(4.0 * N[(N[(alpha - N[(beta * -2.0), $MachinePrecision]), $MachinePrecision] - beta), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(beta * 8.0), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta / i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
t_0 := i + \left(\beta + \alpha\right)\\
t_1 := i \cdot 2 + \left(\beta + \alpha\right)\\
\mathbf{if}\;\beta \leq 4.5 \cdot 10^{+101}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 3 \cdot 10^{+153}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(i, t_0, \beta \cdot \alpha\right)}{\mathsf{fma}\left(i, 2, \beta + \alpha\right)} \cdot \left(\frac{i}{\alpha + \mathsf{fma}\left(i, 2, \beta\right)} \cdot t_0\right)}{t_1 \cdot t_1 + -1}\\
\mathbf{elif}\;\beta \leq 1.32 \cdot 10^{+200}:\\
\;\;\;\;\left(0.0625 + 0.0625 \cdot \frac{\beta}{i}\right) + 0.00390625 \cdot \frac{2 \cdot \left(4 \cdot \left(\left(\alpha - \beta \cdot -2\right) - \beta\right) - 8 \cdot \left(\beta + \alpha\right)\right) - \beta \cdot 8}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{i + \alpha}{\beta}}{\frac{\beta}{i}}\\
\end{array}
\end{array}
if beta < 4.5000000000000002e101Initial program 24.4%
associate-/l/22.4%
associate-*l*22.3%
times-frac28.3%
Simplified46.1%
Taylor expanded in i around inf 79.2%
if 4.5000000000000002e101 < beta < 3.00000000000000019e153Initial program 20.7%
times-frac59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-udef59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
Applied egg-rr59.4%
*-commutative59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
+-commutative59.4%
associate-/l*59.4%
+-commutative59.4%
+-commutative59.4%
+-commutative59.4%
Simplified59.4%
associate-/r/59.5%
fma-udef59.5%
*-commutative59.5%
+-commutative59.5%
+-commutative59.5%
associate-+l+59.5%
*-commutative59.5%
+-commutative59.5%
fma-udef59.5%
+-commutative59.5%
+-commutative59.5%
+-commutative59.5%
Applied egg-rr59.5%
if 3.00000000000000019e153 < beta < 1.3199999999999999e200Initial program 0.0%
times-frac10.7%
+-commutative10.7%
+-commutative10.7%
*-commutative10.7%
fma-def10.7%
+-commutative10.7%
+-commutative10.7%
*-commutative10.7%
fma-udef10.7%
+-commutative10.7%
*-commutative10.7%
fma-def10.7%
Applied egg-rr10.7%
*-commutative10.7%
+-commutative10.7%
+-commutative10.7%
*-commutative10.7%
+-commutative10.7%
associate-/l*10.7%
+-commutative10.7%
+-commutative10.7%
+-commutative10.7%
Simplified10.7%
Taylor expanded in alpha around 0 10.7%
Taylor expanded in alpha around 0 10.7%
Taylor expanded in i around inf 63.9%
if 1.3199999999999999e200 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified18.5%
Taylor expanded in beta around inf 35.0%
*-commutative35.0%
associate-/l*36.7%
+-commutative36.7%
unpow236.7%
Simplified36.7%
*-un-lft-identity36.7%
associate-/l*51.1%
Applied egg-rr51.1%
*-lft-identity51.1%
associate-/r/51.2%
Simplified51.2%
associate-/r/51.1%
add-cube-cbrt51.0%
add-exp-log50.3%
add-cube-cbrt50.3%
associate-/r/50.3%
+-commutative50.3%
*-commutative50.3%
Applied egg-rr50.3%
add-exp-log51.2%
associate-/r*82.1%
Applied egg-rr82.1%
Final simplification77.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 1.8e+103)
0.0625
(if (<= beta 2.45e+154)
(/ 1.0 (/ (* beta (/ beta i)) (+ i alpha)))
(if (<= beta 1.5e+201)
(+
(+ 0.0625 (* 0.0625 (/ beta i)))
(*
0.00390625
(/
(-
(*
2.0
(-
(* 4.0 (- (- alpha (* beta -2.0)) beta))
(* 8.0 (+ beta alpha))))
(* beta 8.0))
i)))
(/ (/ (+ i alpha) beta) (/ beta i))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 1.8e+103) {
tmp = 0.0625;
} else if (beta <= 2.45e+154) {
tmp = 1.0 / ((beta * (beta / i)) / (i + alpha));
} else if (beta <= 1.5e+201) {
tmp = (0.0625 + (0.0625 * (beta / i))) + (0.00390625 * (((2.0 * ((4.0 * ((alpha - (beta * -2.0)) - beta)) - (8.0 * (beta + alpha)))) - (beta * 8.0)) / i));
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 1.8d+103) then
tmp = 0.0625d0
else if (beta <= 2.45d+154) then
tmp = 1.0d0 / ((beta * (beta / i)) / (i + alpha))
else if (beta <= 1.5d+201) then
tmp = (0.0625d0 + (0.0625d0 * (beta / i))) + (0.00390625d0 * (((2.0d0 * ((4.0d0 * ((alpha - (beta * (-2.0d0))) - beta)) - (8.0d0 * (beta + alpha)))) - (beta * 8.0d0)) / i))
else
tmp = ((i + alpha) / beta) / (beta / i)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 1.8e+103) {
tmp = 0.0625;
} else if (beta <= 2.45e+154) {
tmp = 1.0 / ((beta * (beta / i)) / (i + alpha));
} else if (beta <= 1.5e+201) {
tmp = (0.0625 + (0.0625 * (beta / i))) + (0.00390625 * (((2.0 * ((4.0 * ((alpha - (beta * -2.0)) - beta)) - (8.0 * (beta + alpha)))) - (beta * 8.0)) / i));
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 1.8e+103: tmp = 0.0625 elif beta <= 2.45e+154: tmp = 1.0 / ((beta * (beta / i)) / (i + alpha)) elif beta <= 1.5e+201: tmp = (0.0625 + (0.0625 * (beta / i))) + (0.00390625 * (((2.0 * ((4.0 * ((alpha - (beta * -2.0)) - beta)) - (8.0 * (beta + alpha)))) - (beta * 8.0)) / i)) else: tmp = ((i + alpha) / beta) / (beta / i) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 1.8e+103) tmp = 0.0625; elseif (beta <= 2.45e+154) tmp = Float64(1.0 / Float64(Float64(beta * Float64(beta / i)) / Float64(i + alpha))); elseif (beta <= 1.5e+201) tmp = Float64(Float64(0.0625 + Float64(0.0625 * Float64(beta / i))) + Float64(0.00390625 * Float64(Float64(Float64(2.0 * Float64(Float64(4.0 * Float64(Float64(alpha - Float64(beta * -2.0)) - beta)) - Float64(8.0 * Float64(beta + alpha)))) - Float64(beta * 8.0)) / i))); else tmp = Float64(Float64(Float64(i + alpha) / beta) / Float64(beta / i)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 1.8e+103)
tmp = 0.0625;
elseif (beta <= 2.45e+154)
tmp = 1.0 / ((beta * (beta / i)) / (i + alpha));
elseif (beta <= 1.5e+201)
tmp = (0.0625 + (0.0625 * (beta / i))) + (0.00390625 * (((2.0 * ((4.0 * ((alpha - (beta * -2.0)) - beta)) - (8.0 * (beta + alpha)))) - (beta * 8.0)) / i));
else
tmp = ((i + alpha) / beta) / (beta / i);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 1.8e+103], 0.0625, If[LessEqual[beta, 2.45e+154], N[(1.0 / N[(N[(beta * N[(beta / i), $MachinePrecision]), $MachinePrecision] / N[(i + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 1.5e+201], N[(N[(0.0625 + N[(0.0625 * N[(beta / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.00390625 * N[(N[(N[(2.0 * N[(N[(4.0 * N[(N[(alpha - N[(beta * -2.0), $MachinePrecision]), $MachinePrecision] - beta), $MachinePrecision]), $MachinePrecision] - N[(8.0 * N[(beta + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(beta * 8.0), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta / i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 1.8 \cdot 10^{+103}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 2.45 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\frac{\beta \cdot \frac{\beta}{i}}{i + \alpha}}\\
\mathbf{elif}\;\beta \leq 1.5 \cdot 10^{+201}:\\
\;\;\;\;\left(0.0625 + 0.0625 \cdot \frac{\beta}{i}\right) + 0.00390625 \cdot \frac{2 \cdot \left(4 \cdot \left(\left(\alpha - \beta \cdot -2\right) - \beta\right) - 8 \cdot \left(\beta + \alpha\right)\right) - \beta \cdot 8}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{i + \alpha}{\beta}}{\frac{\beta}{i}}\\
\end{array}
\end{array}
if beta < 1.80000000000000008e103Initial program 24.4%
associate-/l/22.4%
associate-*l*22.3%
times-frac28.3%
Simplified46.1%
Taylor expanded in i around inf 79.2%
if 1.80000000000000008e103 < beta < 2.4500000000000001e154Initial program 18.8%
associate-/l/1.0%
associate-*l*1.0%
times-frac18.9%
Simplified54.3%
Taylor expanded in beta around inf 53.3%
*-commutative53.3%
associate-/l*53.6%
+-commutative53.6%
unpow253.6%
Simplified53.6%
*-un-lft-identity53.6%
associate-/l*53.6%
Applied egg-rr53.6%
*-lft-identity53.6%
associate-/r/53.7%
Simplified53.7%
associate-/r/53.6%
add-cube-cbrt52.9%
add-exp-log49.6%
add-cube-cbrt49.6%
associate-/r/49.6%
+-commutative49.6%
*-commutative49.6%
Applied egg-rr49.6%
add-exp-log53.7%
clear-num53.8%
Applied egg-rr53.8%
if 2.4500000000000001e154 < beta < 1.50000000000000012e201Initial program 0.0%
times-frac11.2%
+-commutative11.2%
+-commutative11.2%
*-commutative11.2%
fma-def11.2%
+-commutative11.2%
+-commutative11.2%
*-commutative11.2%
fma-udef11.2%
+-commutative11.2%
*-commutative11.2%
fma-def11.2%
Applied egg-rr11.2%
*-commutative11.2%
+-commutative11.2%
+-commutative11.2%
*-commutative11.2%
+-commutative11.2%
associate-/l*11.2%
+-commutative11.2%
+-commutative11.2%
+-commutative11.2%
Simplified11.2%
Taylor expanded in alpha around 0 11.2%
Taylor expanded in alpha around 0 11.2%
Taylor expanded in i around inf 67.0%
if 1.50000000000000012e201 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified18.5%
Taylor expanded in beta around inf 35.0%
*-commutative35.0%
associate-/l*36.7%
+-commutative36.7%
unpow236.7%
Simplified36.7%
*-un-lft-identity36.7%
associate-/l*51.1%
Applied egg-rr51.1%
*-lft-identity51.1%
associate-/r/51.2%
Simplified51.2%
associate-/r/51.1%
add-cube-cbrt51.0%
add-exp-log50.3%
add-cube-cbrt50.3%
associate-/r/50.3%
+-commutative50.3%
*-commutative50.3%
Applied egg-rr50.3%
add-exp-log51.2%
associate-/r*82.1%
Applied egg-rr82.1%
Final simplification77.6%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 8.8e+102)
0.0625
(if (<= beta 4.6e+153)
(* (+ i alpha) (/ (/ i beta) beta))
(if (<= beta 6e+190) 0.0625 (* (/ (+ i alpha) beta) (/ i beta))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 8.8e+102) {
tmp = 0.0625;
} else if (beta <= 4.6e+153) {
tmp = (i + alpha) * ((i / beta) / beta);
} else if (beta <= 6e+190) {
tmp = 0.0625;
} else {
tmp = ((i + alpha) / beta) * (i / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 8.8d+102) then
tmp = 0.0625d0
else if (beta <= 4.6d+153) then
tmp = (i + alpha) * ((i / beta) / beta)
else if (beta <= 6d+190) then
tmp = 0.0625d0
else
tmp = ((i + alpha) / beta) * (i / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 8.8e+102) {
tmp = 0.0625;
} else if (beta <= 4.6e+153) {
tmp = (i + alpha) * ((i / beta) / beta);
} else if (beta <= 6e+190) {
tmp = 0.0625;
} else {
tmp = ((i + alpha) / beta) * (i / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 8.8e+102: tmp = 0.0625 elif beta <= 4.6e+153: tmp = (i + alpha) * ((i / beta) / beta) elif beta <= 6e+190: tmp = 0.0625 else: tmp = ((i + alpha) / beta) * (i / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 8.8e+102) tmp = 0.0625; elseif (beta <= 4.6e+153) tmp = Float64(Float64(i + alpha) * Float64(Float64(i / beta) / beta)); elseif (beta <= 6e+190) tmp = 0.0625; else tmp = Float64(Float64(Float64(i + alpha) / beta) * Float64(i / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 8.8e+102)
tmp = 0.0625;
elseif (beta <= 4.6e+153)
tmp = (i + alpha) * ((i / beta) / beta);
elseif (beta <= 6e+190)
tmp = 0.0625;
else
tmp = ((i + alpha) / beta) * (i / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 8.8e+102], 0.0625, If[LessEqual[beta, 4.6e+153], N[(N[(i + alpha), $MachinePrecision] * N[(N[(i / beta), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 6e+190], 0.0625, N[(N[(N[(i + alpha), $MachinePrecision] / beta), $MachinePrecision] * N[(i / beta), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8.8 \cdot 10^{+102}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 4.6 \cdot 10^{+153}:\\
\;\;\;\;\left(i + \alpha\right) \cdot \frac{\frac{i}{\beta}}{\beta}\\
\mathbf{elif}\;\beta \leq 6 \cdot 10^{+190}:\\
\;\;\;\;0.0625\\
\mathbf{else}:\\
\;\;\;\;\frac{i + \alpha}{\beta} \cdot \frac{i}{\beta}\\
\end{array}
\end{array}
if beta < 8.8000000000000003e102 or 4.6000000000000003e153 < beta < 5.99999999999999964e190Initial program 22.9%
associate-/l/21.0%
associate-*l*20.9%
times-frac26.5%
Simplified43.3%
Taylor expanded in i around inf 77.8%
if 8.8000000000000003e102 < beta < 4.6000000000000003e153Initial program 20.7%
times-frac59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-udef59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
Applied egg-rr59.4%
*-commutative59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
+-commutative59.4%
associate-/l*59.4%
+-commutative59.4%
+-commutative59.4%
+-commutative59.4%
Simplified59.4%
Taylor expanded in beta around inf 58.4%
*-commutative58.4%
associate-*r/58.6%
unpow258.6%
associate-/r*58.8%
Simplified58.8%
if 5.99999999999999964e190 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified19.9%
Taylor expanded in beta around inf 33.3%
*-commutative33.3%
associate-/l*34.9%
+-commutative34.9%
unpow234.9%
Simplified34.9%
*-un-lft-identity34.9%
associate-/l*49.1%
Applied egg-rr49.1%
*-lft-identity49.1%
associate-/r/49.2%
Simplified49.2%
Taylor expanded in beta around 0 33.3%
unpow233.3%
times-frac76.4%
Simplified76.4%
Final simplification76.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 8.8e+102)
0.0625
(if (<= beta 9.5e+152)
(* (+ i alpha) (/ (/ i beta) beta))
(if (<= beta 3.8e+189) 0.0625 (/ (/ (+ i alpha) beta) (/ beta i))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 8.8e+102) {
tmp = 0.0625;
} else if (beta <= 9.5e+152) {
tmp = (i + alpha) * ((i / beta) / beta);
} else if (beta <= 3.8e+189) {
tmp = 0.0625;
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 8.8d+102) then
tmp = 0.0625d0
else if (beta <= 9.5d+152) then
tmp = (i + alpha) * ((i / beta) / beta)
else if (beta <= 3.8d+189) then
tmp = 0.0625d0
else
tmp = ((i + alpha) / beta) / (beta / i)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 8.8e+102) {
tmp = 0.0625;
} else if (beta <= 9.5e+152) {
tmp = (i + alpha) * ((i / beta) / beta);
} else if (beta <= 3.8e+189) {
tmp = 0.0625;
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 8.8e+102: tmp = 0.0625 elif beta <= 9.5e+152: tmp = (i + alpha) * ((i / beta) / beta) elif beta <= 3.8e+189: tmp = 0.0625 else: tmp = ((i + alpha) / beta) / (beta / i) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 8.8e+102) tmp = 0.0625; elseif (beta <= 9.5e+152) tmp = Float64(Float64(i + alpha) * Float64(Float64(i / beta) / beta)); elseif (beta <= 3.8e+189) tmp = 0.0625; else tmp = Float64(Float64(Float64(i + alpha) / beta) / Float64(beta / i)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 8.8e+102)
tmp = 0.0625;
elseif (beta <= 9.5e+152)
tmp = (i + alpha) * ((i / beta) / beta);
elseif (beta <= 3.8e+189)
tmp = 0.0625;
else
tmp = ((i + alpha) / beta) / (beta / i);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 8.8e+102], 0.0625, If[LessEqual[beta, 9.5e+152], N[(N[(i + alpha), $MachinePrecision] * N[(N[(i / beta), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 3.8e+189], 0.0625, N[(N[(N[(i + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta / i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8.8 \cdot 10^{+102}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 9.5 \cdot 10^{+152}:\\
\;\;\;\;\left(i + \alpha\right) \cdot \frac{\frac{i}{\beta}}{\beta}\\
\mathbf{elif}\;\beta \leq 3.8 \cdot 10^{+189}:\\
\;\;\;\;0.0625\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{i + \alpha}{\beta}}{\frac{\beta}{i}}\\
\end{array}
\end{array}
if beta < 8.8000000000000003e102 or 9.49999999999999916e152 < beta < 3.7999999999999998e189Initial program 22.9%
associate-/l/21.0%
associate-*l*20.9%
times-frac26.5%
Simplified43.3%
Taylor expanded in i around inf 77.8%
if 8.8000000000000003e102 < beta < 9.49999999999999916e152Initial program 20.7%
times-frac59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-udef59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
Applied egg-rr59.4%
*-commutative59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
+-commutative59.4%
associate-/l*59.4%
+-commutative59.4%
+-commutative59.4%
+-commutative59.4%
Simplified59.4%
Taylor expanded in beta around inf 58.4%
*-commutative58.4%
associate-*r/58.6%
unpow258.6%
associate-/r*58.8%
Simplified58.8%
if 3.7999999999999998e189 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified19.9%
Taylor expanded in beta around inf 33.3%
*-commutative33.3%
associate-/l*34.9%
+-commutative34.9%
unpow234.9%
Simplified34.9%
*-un-lft-identity34.9%
associate-/l*49.1%
Applied egg-rr49.1%
*-lft-identity49.1%
associate-/r/49.2%
Simplified49.2%
associate-/r/49.1%
add-cube-cbrt49.1%
add-exp-log48.3%
add-cube-cbrt48.3%
associate-/r/48.3%
+-commutative48.3%
*-commutative48.3%
Applied egg-rr48.3%
add-exp-log49.2%
associate-/r*76.3%
Applied egg-rr76.3%
Final simplification76.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 2.5e+103)
0.0625
(if (<= beta 2.6e+153)
(/ 1.0 (/ (* beta (/ beta i)) (+ i alpha)))
(if (<= beta 8e+189) 0.0625 (/ (/ (+ i alpha) beta) (/ beta i))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 2.5e+103) {
tmp = 0.0625;
} else if (beta <= 2.6e+153) {
tmp = 1.0 / ((beta * (beta / i)) / (i + alpha));
} else if (beta <= 8e+189) {
tmp = 0.0625;
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 2.5d+103) then
tmp = 0.0625d0
else if (beta <= 2.6d+153) then
tmp = 1.0d0 / ((beta * (beta / i)) / (i + alpha))
else if (beta <= 8d+189) then
tmp = 0.0625d0
else
tmp = ((i + alpha) / beta) / (beta / i)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 2.5e+103) {
tmp = 0.0625;
} else if (beta <= 2.6e+153) {
tmp = 1.0 / ((beta * (beta / i)) / (i + alpha));
} else if (beta <= 8e+189) {
tmp = 0.0625;
} else {
tmp = ((i + alpha) / beta) / (beta / i);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 2.5e+103: tmp = 0.0625 elif beta <= 2.6e+153: tmp = 1.0 / ((beta * (beta / i)) / (i + alpha)) elif beta <= 8e+189: tmp = 0.0625 else: tmp = ((i + alpha) / beta) / (beta / i) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 2.5e+103) tmp = 0.0625; elseif (beta <= 2.6e+153) tmp = Float64(1.0 / Float64(Float64(beta * Float64(beta / i)) / Float64(i + alpha))); elseif (beta <= 8e+189) tmp = 0.0625; else tmp = Float64(Float64(Float64(i + alpha) / beta) / Float64(beta / i)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 2.5e+103)
tmp = 0.0625;
elseif (beta <= 2.6e+153)
tmp = 1.0 / ((beta * (beta / i)) / (i + alpha));
elseif (beta <= 8e+189)
tmp = 0.0625;
else
tmp = ((i + alpha) / beta) / (beta / i);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 2.5e+103], 0.0625, If[LessEqual[beta, 2.6e+153], N[(1.0 / N[(N[(beta * N[(beta / i), $MachinePrecision]), $MachinePrecision] / N[(i + alpha), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 8e+189], 0.0625, N[(N[(N[(i + alpha), $MachinePrecision] / beta), $MachinePrecision] / N[(beta / i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.5 \cdot 10^{+103}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 2.6 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{\frac{\beta \cdot \frac{\beta}{i}}{i + \alpha}}\\
\mathbf{elif}\;\beta \leq 8 \cdot 10^{+189}:\\
\;\;\;\;0.0625\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{i + \alpha}{\beta}}{\frac{\beta}{i}}\\
\end{array}
\end{array}
if beta < 2.5e103 or 2.5999999999999999e153 < beta < 8.0000000000000002e189Initial program 22.9%
associate-/l/21.0%
associate-*l*20.9%
times-frac26.5%
Simplified43.3%
Taylor expanded in i around inf 77.8%
if 2.5e103 < beta < 2.5999999999999999e153Initial program 20.7%
associate-/l/1.1%
associate-*l*1.1%
times-frac20.8%
Simplified59.7%
Taylor expanded in beta around inf 58.4%
*-commutative58.4%
associate-/l*58.6%
+-commutative58.6%
unpow258.6%
Simplified58.6%
*-un-lft-identity58.6%
associate-/l*58.6%
Applied egg-rr58.6%
*-lft-identity58.6%
associate-/r/58.8%
Simplified58.8%
associate-/r/58.6%
add-cube-cbrt57.9%
add-exp-log54.3%
add-cube-cbrt54.3%
associate-/r/54.3%
+-commutative54.3%
*-commutative54.3%
Applied egg-rr54.3%
add-exp-log58.8%
clear-num59.0%
Applied egg-rr59.0%
if 8.0000000000000002e189 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified19.9%
Taylor expanded in beta around inf 33.3%
*-commutative33.3%
associate-/l*34.9%
+-commutative34.9%
unpow234.9%
Simplified34.9%
*-un-lft-identity34.9%
associate-/l*49.1%
Applied egg-rr49.1%
*-lft-identity49.1%
associate-/r/49.2%
Simplified49.2%
associate-/r/49.1%
add-cube-cbrt49.1%
add-exp-log48.3%
add-cube-cbrt48.3%
associate-/r/48.3%
+-commutative48.3%
*-commutative48.3%
Applied egg-rr48.3%
add-exp-log49.2%
associate-/r*76.3%
Applied egg-rr76.3%
Final simplification76.8%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 2.4e+103)
0.0625
(if (or (<= beta 3e+154) (not (<= beta 6.5e+190)))
(* (/ i beta) (/ i beta))
0.0625)))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 2.4e+103) {
tmp = 0.0625;
} else if ((beta <= 3e+154) || !(beta <= 6.5e+190)) {
tmp = (i / beta) * (i / beta);
} else {
tmp = 0.0625;
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 2.4d+103) then
tmp = 0.0625d0
else if ((beta <= 3d+154) .or. (.not. (beta <= 6.5d+190))) then
tmp = (i / beta) * (i / beta)
else
tmp = 0.0625d0
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 2.4e+103) {
tmp = 0.0625;
} else if ((beta <= 3e+154) || !(beta <= 6.5e+190)) {
tmp = (i / beta) * (i / beta);
} else {
tmp = 0.0625;
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 2.4e+103: tmp = 0.0625 elif (beta <= 3e+154) or not (beta <= 6.5e+190): tmp = (i / beta) * (i / beta) else: tmp = 0.0625 return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 2.4e+103) tmp = 0.0625; elseif ((beta <= 3e+154) || !(beta <= 6.5e+190)) tmp = Float64(Float64(i / beta) * Float64(i / beta)); else tmp = 0.0625; end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 2.4e+103)
tmp = 0.0625;
elseif ((beta <= 3e+154) || ~((beta <= 6.5e+190)))
tmp = (i / beta) * (i / beta);
else
tmp = 0.0625;
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 2.4e+103], 0.0625, If[Or[LessEqual[beta, 3e+154], N[Not[LessEqual[beta, 6.5e+190]], $MachinePrecision]], N[(N[(i / beta), $MachinePrecision] * N[(i / beta), $MachinePrecision]), $MachinePrecision], 0.0625]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.4 \cdot 10^{+103}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 3 \cdot 10^{+154} \lor \neg \left(\beta \leq 6.5 \cdot 10^{+190}\right):\\
\;\;\;\;\frac{i}{\beta} \cdot \frac{i}{\beta}\\
\mathbf{else}:\\
\;\;\;\;0.0625\\
\end{array}
\end{array}
if beta < 2.3999999999999998e103 or 3.00000000000000026e154 < beta < 6.5000000000000001e190Initial program 23.0%
associate-/l/21.1%
associate-*l*21.0%
times-frac26.7%
Simplified43.5%
Taylor expanded in i around inf 78.2%
if 2.3999999999999998e103 < beta < 3.00000000000000026e154 or 6.5000000000000001e190 < beta Initial program 4.0%
times-frac27.1%
+-commutative27.1%
+-commutative27.1%
*-commutative27.1%
fma-def27.1%
+-commutative27.1%
+-commutative27.1%
*-commutative27.1%
fma-udef27.1%
+-commutative27.1%
*-commutative27.1%
fma-def27.1%
Applied egg-rr27.1%
*-commutative27.1%
+-commutative27.1%
+-commutative27.1%
*-commutative27.1%
+-commutative27.1%
associate-/l*27.1%
+-commutative27.1%
+-commutative27.1%
+-commutative27.1%
Simplified27.1%
Taylor expanded in alpha around 0 29.2%
Taylor expanded in beta around inf 37.6%
unpow237.6%
unpow237.6%
times-frac69.5%
Simplified69.5%
Final simplification76.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 8.8e+102)
0.0625
(if (<= beta 6.4e+153)
(/ (* i i) (* beta beta))
(if (<= beta 3.1e+191) 0.0625 (* (/ i beta) (/ i beta))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 8.8e+102) {
tmp = 0.0625;
} else if (beta <= 6.4e+153) {
tmp = (i * i) / (beta * beta);
} else if (beta <= 3.1e+191) {
tmp = 0.0625;
} else {
tmp = (i / beta) * (i / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 8.8d+102) then
tmp = 0.0625d0
else if (beta <= 6.4d+153) then
tmp = (i * i) / (beta * beta)
else if (beta <= 3.1d+191) then
tmp = 0.0625d0
else
tmp = (i / beta) * (i / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 8.8e+102) {
tmp = 0.0625;
} else if (beta <= 6.4e+153) {
tmp = (i * i) / (beta * beta);
} else if (beta <= 3.1e+191) {
tmp = 0.0625;
} else {
tmp = (i / beta) * (i / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 8.8e+102: tmp = 0.0625 elif beta <= 6.4e+153: tmp = (i * i) / (beta * beta) elif beta <= 3.1e+191: tmp = 0.0625 else: tmp = (i / beta) * (i / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 8.8e+102) tmp = 0.0625; elseif (beta <= 6.4e+153) tmp = Float64(Float64(i * i) / Float64(beta * beta)); elseif (beta <= 3.1e+191) tmp = 0.0625; else tmp = Float64(Float64(i / beta) * Float64(i / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 8.8e+102)
tmp = 0.0625;
elseif (beta <= 6.4e+153)
tmp = (i * i) / (beta * beta);
elseif (beta <= 3.1e+191)
tmp = 0.0625;
else
tmp = (i / beta) * (i / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 8.8e+102], 0.0625, If[LessEqual[beta, 6.4e+153], N[(N[(i * i), $MachinePrecision] / N[(beta * beta), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 3.1e+191], 0.0625, N[(N[(i / beta), $MachinePrecision] * N[(i / beta), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 8.8 \cdot 10^{+102}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 6.4 \cdot 10^{+153}:\\
\;\;\;\;\frac{i \cdot i}{\beta \cdot \beta}\\
\mathbf{elif}\;\beta \leq 3.1 \cdot 10^{+191}:\\
\;\;\;\;0.0625\\
\mathbf{else}:\\
\;\;\;\;\frac{i}{\beta} \cdot \frac{i}{\beta}\\
\end{array}
\end{array}
if beta < 8.8000000000000003e102 or 6.4000000000000003e153 < beta < 3.09999999999999999e191Initial program 23.0%
associate-/l/21.1%
associate-*l*21.0%
times-frac26.7%
Simplified43.5%
Taylor expanded in i around inf 78.2%
if 8.8000000000000003e102 < beta < 6.4000000000000003e153Initial program 18.8%
associate-/l/1.0%
associate-*l*1.0%
times-frac18.9%
Simplified54.3%
Taylor expanded in beta around inf 53.3%
*-commutative53.3%
associate-/l*53.6%
+-commutative53.6%
unpow253.6%
Simplified53.6%
Taylor expanded in alpha around 0 53.5%
unpow253.5%
unpow253.5%
Simplified53.5%
if 3.09999999999999999e191 < beta Initial program 0.0%
times-frac19.9%
+-commutative19.9%
+-commutative19.9%
*-commutative19.9%
fma-def19.9%
+-commutative19.9%
+-commutative19.9%
*-commutative19.9%
fma-udef19.9%
+-commutative19.9%
*-commutative19.9%
fma-def19.9%
Applied egg-rr19.9%
*-commutative19.9%
+-commutative19.9%
+-commutative19.9%
*-commutative19.9%
+-commutative19.9%
associate-/l*19.9%
+-commutative19.9%
+-commutative19.9%
+-commutative19.9%
Simplified19.9%
Taylor expanded in alpha around 0 22.4%
Taylor expanded in beta around inf 33.3%
unpow233.3%
unpow233.3%
times-frac73.8%
Simplified73.8%
Final simplification76.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function.
(FPCore (alpha beta i)
:precision binary64
(if (<= beta 2.5e+103)
0.0625
(if (<= beta 2.8e+153)
(* (+ i alpha) (/ (/ i beta) beta))
(if (<= beta 1.6e+193) 0.0625 (* (/ i beta) (/ i beta))))))assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 2.5e+103) {
tmp = 0.0625;
} else if (beta <= 2.8e+153) {
tmp = (i + alpha) * ((i / beta) / beta);
} else if (beta <= 1.6e+193) {
tmp = 0.0625;
} else {
tmp = (i / beta) * (i / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 2.5d+103) then
tmp = 0.0625d0
else if (beta <= 2.8d+153) then
tmp = (i + alpha) * ((i / beta) / beta)
else if (beta <= 1.6d+193) then
tmp = 0.0625d0
else
tmp = (i / beta) * (i / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 2.5e+103) {
tmp = 0.0625;
} else if (beta <= 2.8e+153) {
tmp = (i + alpha) * ((i / beta) / beta);
} else if (beta <= 1.6e+193) {
tmp = 0.0625;
} else {
tmp = (i / beta) * (i / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 2.5e+103: tmp = 0.0625 elif beta <= 2.8e+153: tmp = (i + alpha) * ((i / beta) / beta) elif beta <= 1.6e+193: tmp = 0.0625 else: tmp = (i / beta) * (i / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 2.5e+103) tmp = 0.0625; elseif (beta <= 2.8e+153) tmp = Float64(Float64(i + alpha) * Float64(Float64(i / beta) / beta)); elseif (beta <= 1.6e+193) tmp = 0.0625; else tmp = Float64(Float64(i / beta) * Float64(i / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 2.5e+103)
tmp = 0.0625;
elseif (beta <= 2.8e+153)
tmp = (i + alpha) * ((i / beta) / beta);
elseif (beta <= 1.6e+193)
tmp = 0.0625;
else
tmp = (i / beta) * (i / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 2.5e+103], 0.0625, If[LessEqual[beta, 2.8e+153], N[(N[(i + alpha), $MachinePrecision] * N[(N[(i / beta), $MachinePrecision] / beta), $MachinePrecision]), $MachinePrecision], If[LessEqual[beta, 1.6e+193], 0.0625, N[(N[(i / beta), $MachinePrecision] * N[(i / beta), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 2.5 \cdot 10^{+103}:\\
\;\;\;\;0.0625\\
\mathbf{elif}\;\beta \leq 2.8 \cdot 10^{+153}:\\
\;\;\;\;\left(i + \alpha\right) \cdot \frac{\frac{i}{\beta}}{\beta}\\
\mathbf{elif}\;\beta \leq 1.6 \cdot 10^{+193}:\\
\;\;\;\;0.0625\\
\mathbf{else}:\\
\;\;\;\;\frac{i}{\beta} \cdot \frac{i}{\beta}\\
\end{array}
\end{array}
if beta < 2.5e103 or 2.79999999999999985e153 < beta < 1.60000000000000007e193Initial program 22.9%
associate-/l/21.0%
associate-*l*20.9%
times-frac26.5%
Simplified43.3%
Taylor expanded in i around inf 77.8%
if 2.5e103 < beta < 2.79999999999999985e153Initial program 20.7%
times-frac59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
fma-udef59.4%
+-commutative59.4%
*-commutative59.4%
fma-def59.4%
Applied egg-rr59.4%
*-commutative59.4%
+-commutative59.4%
+-commutative59.4%
*-commutative59.4%
+-commutative59.4%
associate-/l*59.4%
+-commutative59.4%
+-commutative59.4%
+-commutative59.4%
Simplified59.4%
Taylor expanded in beta around inf 58.4%
*-commutative58.4%
associate-*r/58.6%
unpow258.6%
associate-/r*58.8%
Simplified58.8%
if 1.60000000000000007e193 < beta Initial program 0.0%
times-frac19.9%
+-commutative19.9%
+-commutative19.9%
*-commutative19.9%
fma-def19.9%
+-commutative19.9%
+-commutative19.9%
*-commutative19.9%
fma-udef19.9%
+-commutative19.9%
*-commutative19.9%
fma-def19.9%
Applied egg-rr19.9%
*-commutative19.9%
+-commutative19.9%
+-commutative19.9%
*-commutative19.9%
+-commutative19.9%
associate-/l*19.9%
+-commutative19.9%
+-commutative19.9%
+-commutative19.9%
Simplified19.9%
Taylor expanded in alpha around 0 22.4%
Taylor expanded in beta around inf 33.3%
unpow233.3%
unpow233.3%
times-frac73.8%
Simplified73.8%
Final simplification76.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta i) :precision binary64 (if (<= beta 9.4e+204) 0.0625 (* (/ i beta) (/ alpha beta))))
assert(alpha < beta);
double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 9.4e+204) {
tmp = 0.0625;
} else {
tmp = (i / beta) * (alpha / beta);
}
return tmp;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
real(8) :: tmp
if (beta <= 9.4d+204) then
tmp = 0.0625d0
else
tmp = (i / beta) * (alpha / beta)
end if
code = tmp
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
double tmp;
if (beta <= 9.4e+204) {
tmp = 0.0625;
} else {
tmp = (i / beta) * (alpha / beta);
}
return tmp;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): tmp = 0 if beta <= 9.4e+204: tmp = 0.0625 else: tmp = (i / beta) * (alpha / beta) return tmp
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) tmp = 0.0 if (beta <= 9.4e+204) tmp = 0.0625; else tmp = Float64(Float64(i / beta) * Float64(alpha / beta)); end return tmp end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp_2 = code(alpha, beta, i)
tmp = 0.0;
if (beta <= 9.4e+204)
tmp = 0.0625;
else
tmp = (i / beta) * (alpha / beta);
end
tmp_2 = tmp;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := If[LessEqual[beta, 9.4e+204], 0.0625, N[(N[(i / beta), $MachinePrecision] * N[(alpha / beta), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
\begin{array}{l}
\mathbf{if}\;\beta \leq 9.4 \cdot 10^{+204}:\\
\;\;\;\;0.0625\\
\mathbf{else}:\\
\;\;\;\;\frac{i}{\beta} \cdot \frac{\alpha}{\beta}\\
\end{array}
\end{array}
if beta < 9.4000000000000003e204Initial program 21.9%
associate-/l/19.3%
associate-*l*19.2%
times-frac25.2%
Simplified43.2%
Taylor expanded in i around inf 74.7%
if 9.4000000000000003e204 < beta Initial program 0.0%
associate-/l/0.0%
associate-*l*0.0%
times-frac0.0%
Simplified19.1%
Taylor expanded in beta around inf 36.1%
*-commutative36.1%
associate-/l*37.7%
+-commutative37.7%
unpow237.7%
Simplified37.7%
Taylor expanded in alpha around inf 37.6%
associate-/l*37.7%
unpow237.7%
Simplified37.7%
Taylor expanded in i around 0 37.6%
*-commutative37.6%
unpow237.6%
times-frac40.9%
Simplified40.9%
Final simplification70.4%
NOTE: alpha and beta should be sorted in increasing order before calling this function. (FPCore (alpha beta i) :precision binary64 0.0625)
assert(alpha < beta);
double code(double alpha, double beta, double i) {
return 0.0625;
}
NOTE: alpha and beta should be sorted in increasing order before calling this function.
real(8) function code(alpha, beta, i)
real(8), intent (in) :: alpha
real(8), intent (in) :: beta
real(8), intent (in) :: i
code = 0.0625d0
end function
assert alpha < beta;
public static double code(double alpha, double beta, double i) {
return 0.0625;
}
[alpha, beta] = sort([alpha, beta]) def code(alpha, beta, i): return 0.0625
alpha, beta = sort([alpha, beta]) function code(alpha, beta, i) return 0.0625 end
alpha, beta = num2cell(sort([alpha, beta])){:}
function tmp = code(alpha, beta, i)
tmp = 0.0625;
end
NOTE: alpha and beta should be sorted in increasing order before calling this function. code[alpha_, beta_, i_] := 0.0625
\begin{array}{l}
[alpha, beta] = \mathsf{sort}([alpha, beta])\\
\\
0.0625
\end{array}
Initial program 19.1%
associate-/l/16.9%
associate-*l*16.8%
times-frac22.1%
Simplified40.2%
Taylor expanded in i around inf 67.2%
Final simplification67.2%
herbie shell --seed 2023199
(FPCore (alpha beta i)
:name "Octave 3.8, jcobi/4"
:precision binary64
:pre (and (and (> alpha -1.0) (> beta -1.0)) (> i 1.0))
(/ (/ (* (* i (+ (+ alpha beta) i)) (+ (* beta alpha) (* i (+ (+ alpha beta) i)))) (* (+ (+ alpha beta) (* 2.0 i)) (+ (+ alpha beta) (* 2.0 i)))) (- (* (+ (+ alpha beta) (* 2.0 i)) (+ (+ alpha beta) (* 2.0 i))) 1.0)))