Average Error: 23.9 → 11.9
Time: 8.0s
Precision: binary64
\[\alpha \gt -1 \land \beta \gt -1 \land i \gt 0.0\]
\[\frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\]
\[\begin{array}{l} \mathbf{if}\;\alpha \le 31747722167290936:\\ \;\;\;\;\frac{\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\\ \mathbf{elif}\;\alpha \le 3.1984053869970406 \cdot 10^{56}:\\ \;\;\;\;\frac{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}{2}\\ \mathbf{elif}\;\alpha \le 1.16679327807712728 \cdot 10^{160}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\frac{1}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}{2}\\ \end{array}\]
\frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}
\begin{array}{l}
\mathbf{if}\;\alpha \le 31747722167290936:\\
\;\;\;\;\frac{\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\\

\mathbf{elif}\;\alpha \le 3.1984053869970406 \cdot 10^{56}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}{2}\\

\mathbf{elif}\;\alpha \le 1.16679327807712728 \cdot 10^{160}:\\
\;\;\;\;\frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\frac{1}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}{2}\\

\end{array}
double code(double alpha, double beta, double i) {
	return ((double) (((double) (((double) (((double) (((double) (((double) (alpha + beta)) * ((double) (beta - alpha)))) / ((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))) / ((double) (((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))) + 2.0)))) + 1.0)) / 2.0));
}
double code(double alpha, double beta, double i) {
	double VAR;
	if ((alpha <= 31747722167290936.0)) {
		VAR = ((double) (((double) (((double) (((double) (alpha + beta)) * ((double) (((double) (((double) (beta - alpha)) / ((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))) / ((double) (((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))) + 2.0)))))) + 1.0)) / 2.0));
	} else {
		double VAR_1;
		if ((alpha <= 3.1984053869970406e+56)) {
			VAR_1 = ((double) (((double) (((double) (((double) (2.0 * ((double) (1.0 / alpha)))) + ((double) (8.0 * ((double) (1.0 / ((double) pow(alpha, 3.0)))))))) - ((double) (4.0 * ((double) (1.0 / ((double) pow(alpha, 2.0)))))))) / 2.0));
		} else {
			double VAR_2;
			if ((alpha <= 1.1667932780771273e+160)) {
				VAR_2 = ((double) (((double) cbrt(((double) pow(((double) (((double) (((double) (alpha + beta)) * ((double) (((double) (((double) (((double) cbrt(((double) (((double) (beta - alpha)) / ((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))))) * ((double) cbrt(((double) (((double) (beta - alpha)) / ((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))))))) / ((double) sqrt(((double) (((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))) + 2.0)))))) * ((double) (((double) (((double) cbrt(((double) (1.0 / ((double) (((double) cbrt(((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))) * ((double) cbrt(((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))))))))) * ((double) cbrt(((double) (((double) (beta - alpha)) / ((double) cbrt(((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))))))))))) / ((double) sqrt(((double) (((double) (((double) (alpha + beta)) + ((double) (2.0 * i)))) + 2.0)))))))))) + 1.0)), 3.0)))) / 2.0));
			} else {
				VAR_2 = ((double) (((double) (((double) (((double) (2.0 * ((double) (1.0 / alpha)))) + ((double) (8.0 * ((double) (1.0 / ((double) pow(alpha, 3.0)))))))) - ((double) (4.0 * ((double) (1.0 / ((double) pow(alpha, 2.0)))))))) / 2.0));
			}
			VAR_1 = VAR_2;
		}
		VAR = VAR_1;
	}
	return VAR;
}

Error

Bits error versus alpha

Bits error versus beta

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if alpha < 31747722167290936

    1. Initial program 10.6

      \[\frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity10.6

      \[\leadsto \frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\color{blue}{1 \cdot \left(\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2\right)}} + 1}{2}\]
    4. Applied *-un-lft-identity10.6

      \[\leadsto \frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\color{blue}{1 \cdot \left(\left(\alpha + \beta\right) + 2 \cdot i\right)}}}{1 \cdot \left(\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2\right)} + 1}{2}\]
    5. Applied times-frac0.3

      \[\leadsto \frac{\frac{\color{blue}{\frac{\alpha + \beta}{1} \cdot \frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{1 \cdot \left(\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2\right)} + 1}{2}\]
    6. Applied times-frac0.3

      \[\leadsto \frac{\color{blue}{\frac{\frac{\alpha + \beta}{1}}{1} \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} + 1}{2}\]
    7. Simplified0.3

      \[\leadsto \frac{\color{blue}{\left(\alpha + \beta\right)} \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\]

    if 31747722167290936 < alpha < 3.1984053869970406e56 or 1.16679327807712728e160 < alpha

    1. Initial program 57.8

      \[\frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\]
    2. Taylor expanded around inf 40.6

      \[\leadsto \frac{\color{blue}{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}}{2}\]

    if 3.1984053869970406e56 < alpha < 1.16679327807712728e160

    1. Initial program 43.3

      \[\frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\]
    2. Using strategy rm
    3. Applied *-un-lft-identity43.3

      \[\leadsto \frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\left(\alpha + \beta\right) + 2 \cdot i}}{\color{blue}{1 \cdot \left(\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2\right)}} + 1}{2}\]
    4. Applied *-un-lft-identity43.3

      \[\leadsto \frac{\frac{\frac{\left(\alpha + \beta\right) \cdot \left(\beta - \alpha\right)}{\color{blue}{1 \cdot \left(\left(\alpha + \beta\right) + 2 \cdot i\right)}}}{1 \cdot \left(\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2\right)} + 1}{2}\]
    5. Applied times-frac31.0

      \[\leadsto \frac{\frac{\color{blue}{\frac{\alpha + \beta}{1} \cdot \frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{1 \cdot \left(\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2\right)} + 1}{2}\]
    6. Applied times-frac30.8

      \[\leadsto \frac{\color{blue}{\frac{\frac{\alpha + \beta}{1}}{1} \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} + 1}{2}\]
    7. Simplified30.8

      \[\leadsto \frac{\color{blue}{\left(\alpha + \beta\right)} \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\]
    8. Using strategy rm
    9. Applied add-cbrt-cube30.9

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1\right) \cdot \left(\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1\right)\right) \cdot \left(\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1\right)}}}{2}\]
    10. Simplified30.9

      \[\leadsto \frac{\sqrt[3]{\color{blue}{{\left(\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1\right)}^{3}}}}{2}\]
    11. Using strategy rm
    12. Applied add-sqr-sqrt30.8

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\color{blue}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} \cdot \sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}} + 1\right)}^{3}}}{2}\]
    13. Applied add-cube-cbrt30.8

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \frac{\color{blue}{\left(\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}\right) \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} \cdot \sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} + 1\right)}^{3}}}{2}\]
    14. Applied times-frac30.8

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \color{blue}{\left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right)} + 1\right)}^{3}}}{2}\]
    15. Using strategy rm
    16. Applied add-cube-cbrt30.9

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\frac{\beta - \alpha}{\color{blue}{\left(\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}\right) \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\]
    17. Applied *-un-lft-identity30.9

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\frac{\color{blue}{1 \cdot \left(\beta - \alpha\right)}}{\left(\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}\right) \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\]
    18. Applied times-frac30.9

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\color{blue}{\frac{1}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \frac{\beta - \alpha}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\]
    19. Applied cbrt-prod30.7

      \[\leadsto \frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\color{blue}{\sqrt[3]{\frac{1}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification11.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;\alpha \le 31747722167290936:\\ \;\;\;\;\frac{\left(\alpha + \beta\right) \cdot \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2} + 1}{2}\\ \mathbf{elif}\;\alpha \le 3.1984053869970406 \cdot 10^{56}:\\ \;\;\;\;\frac{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}{2}\\ \mathbf{elif}\;\alpha \le 1.16679327807712728 \cdot 10^{160}:\\ \;\;\;\;\frac{\sqrt[3]{{\left(\left(\alpha + \beta\right) \cdot \left(\frac{\sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2 \cdot i}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}} \cdot \frac{\sqrt[3]{\frac{1}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i} \cdot \sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}} \cdot \sqrt[3]{\frac{\beta - \alpha}{\sqrt[3]{\left(\alpha + \beta\right) + 2 \cdot i}}}}{\sqrt{\left(\left(\alpha + \beta\right) + 2 \cdot i\right) + 2}}\right) + 1\right)}^{3}}}{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(2 \cdot \frac{1}{\alpha} + 8 \cdot \frac{1}{{\alpha}^{3}}\right) - 4 \cdot \frac{1}{{\alpha}^{2}}}{2}\\ \end{array}\]

Reproduce

herbie shell --seed 2020174 
(FPCore (alpha beta i)
  :name "Octave 3.8, jcobi/2"
  :precision binary64
  :pre (and (> alpha -1.0) (> beta -1.0) (> i 0.0))
  (/ (+ (/ (/ (* (+ alpha beta) (- beta alpha)) (+ (+ alpha beta) (* 2.0 i))) (+ (+ (+ alpha beta) (* 2.0 i)) 2.0)) 1.0) 2.0))