Average Error: 56.7 → 44.3
Time: 2.4m
Precision: 64
\[\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{6}}{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
\[\begin{array}{l} \mathbf{if}\;3 \cdot ac \le -2.007566665900397945360214295351562907715 \cdot 10^{-86}:\\ \;\;\;\;\left(\frac{2}{3} \cdot \left|\frac{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}{{a}^{\left(\frac{2}{2}\right)}}\right|\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\sqrt{\frac{{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\\ \end{array}\]
\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{6}}{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}
\begin{array}{l}
\mathbf{if}\;3 \cdot ac \le -2.007566665900397945360214295351562907715 \cdot 10^{-86}:\\
\;\;\;\;\left(\frac{2}{3} \cdot \left|\frac{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}{{a}^{\left(\frac{2}{2}\right)}}\right|\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\sqrt{\frac{{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\\

\end{array}
double f(double b, double a, double c, double ac, double d, double abc, double ab) {
        double r2950804 = 2.0;
        double r2950805 = 3.0;
        double r2950806 = r2950804 / r2950805;
        double r2950807 = b;
        double r2950808 = pow(r2950807, r2950804);
        double r2950809 = a;
        double r2950810 = r2950805 * r2950809;
        double r2950811 = c;
        double r2950812 = r2950810 * r2950811;
        double r2950813 = r2950808 - r2950812;
        double r2950814 = pow(r2950809, r2950804);
        double r2950815 = r2950813 / r2950814;
        double r2950816 = sqrt(r2950815);
        double r2950817 = r2950806 * r2950816;
        double r2950818 = 1.0;
        double r2950819 = r2950818 / r2950805;
        double r2950820 = 6.0;
        double r2950821 = pow(r2950809, r2950820);
        double r2950822 = -r2950821;
        double r2950823 = ac;
        double r2950824 = r2950805 * r2950823;
        double r2950825 = r2950824 - r2950808;
        double r2950826 = pow(r2950825, r2950805);
        double r2950827 = r2950822 / r2950826;
        double r2950828 = sqrt(r2950827);
        double r2950829 = 27.0;
        double r2950830 = d;
        double r2950831 = r2950814 * r2950830;
        double r2950832 = r2950829 * r2950831;
        double r2950833 = 9.0;
        double r2950834 = abc;
        double r2950835 = r2950833 * r2950834;
        double r2950836 = r2950832 - r2950835;
        double r2950837 = pow(r2950807, r2950805);
        double r2950838 = r2950804 * r2950837;
        double r2950839 = r2950836 + r2950838;
        double r2950840 = r2950828 * r2950839;
        double r2950841 = pow(r2950809, r2950805);
        double r2950842 = r2950804 * r2950841;
        double r2950843 = r2950840 / r2950842;
        double r2950844 = acos(r2950843);
        double r2950845 = r2950819 * r2950844;
        double r2950846 = cos(r2950845);
        double r2950847 = r2950817 * r2950846;
        double r2950848 = ab;
        double r2950849 = r2950848 / r2950805;
        double r2950850 = r2950847 - r2950849;
        return r2950850;
}

double f(double b, double a, double c, double ac, double d, double abc, double ab) {
        double r2950851 = 3.0;
        double r2950852 = ac;
        double r2950853 = r2950851 * r2950852;
        double r2950854 = -2.007566665900398e-86;
        bool r2950855 = r2950853 <= r2950854;
        double r2950856 = 2.0;
        double r2950857 = r2950856 / r2950851;
        double r2950858 = b;
        double r2950859 = pow(r2950858, r2950856);
        double r2950860 = a;
        double r2950861 = r2950851 * r2950860;
        double r2950862 = c;
        double r2950863 = r2950861 * r2950862;
        double r2950864 = r2950859 - r2950863;
        double r2950865 = sqrt(r2950864);
        double r2950866 = 2.0;
        double r2950867 = r2950856 / r2950866;
        double r2950868 = pow(r2950860, r2950867);
        double r2950869 = r2950865 / r2950868;
        double r2950870 = fabs(r2950869);
        double r2950871 = r2950857 * r2950870;
        double r2950872 = 1.0;
        double r2950873 = r2950872 / r2950851;
        double r2950874 = 1.0;
        double r2950875 = log(r2950851);
        double r2950876 = -1.0;
        double r2950877 = r2950876 / r2950852;
        double r2950878 = log(r2950877);
        double r2950879 = r2950875 - r2950878;
        double r2950880 = r2950851 * r2950879;
        double r2950881 = exp(r2950880);
        double r2950882 = pow(r2950881, r2950872);
        double r2950883 = pow(r2950876, r2950851);
        double r2950884 = r2950882 * r2950883;
        double r2950885 = r2950874 / r2950884;
        double r2950886 = pow(r2950885, r2950872);
        double r2950887 = -r2950886;
        double r2950888 = sqrt(r2950887);
        double r2950889 = 3.0;
        double r2950890 = pow(r2950858, r2950889);
        double r2950891 = r2950888 * r2950890;
        double r2950892 = r2950872 * r2950891;
        double r2950893 = 6.0;
        double r2950894 = pow(r2950876, r2950893);
        double r2950895 = r2950874 / r2950894;
        double r2950896 = pow(r2950895, r2950872);
        double r2950897 = r2950892 * r2950896;
        double r2950898 = r2950874 / r2950883;
        double r2950899 = pow(r2950898, r2950872);
        double r2950900 = abc;
        double r2950901 = r2950888 * r2950900;
        double r2950902 = r2950899 * r2950901;
        double r2950903 = 4.5;
        double r2950904 = r2950902 * r2950903;
        double r2950905 = r2950897 + r2950904;
        double r2950906 = pow(r2950860, r2950866);
        double r2950907 = d;
        double r2950908 = r2950907 * r2950888;
        double r2950909 = pow(r2950876, r2950856);
        double r2950910 = r2950874 / r2950909;
        double r2950911 = pow(r2950910, r2950872);
        double r2950912 = r2950908 * r2950911;
        double r2950913 = r2950906 * r2950912;
        double r2950914 = 13.5;
        double r2950915 = r2950913 * r2950914;
        double r2950916 = r2950905 + r2950915;
        double r2950917 = -r2950916;
        double r2950918 = acos(r2950917);
        double r2950919 = r2950873 * r2950918;
        double r2950920 = cos(r2950919);
        double r2950921 = r2950871 * r2950920;
        double r2950922 = ab;
        double r2950923 = r2950922 / r2950851;
        double r2950924 = r2950921 - r2950923;
        double r2950925 = pow(r2950860, r2950856);
        double r2950926 = r2950864 / r2950925;
        double r2950927 = sqrt(r2950926);
        double r2950928 = r2950857 * r2950927;
        double r2950929 = r2950893 / r2950866;
        double r2950930 = pow(r2950860, r2950929);
        double r2950931 = -r2950930;
        double r2950932 = r2950853 - r2950859;
        double r2950933 = pow(r2950932, r2950851);
        double r2950934 = cbrt(r2950933);
        double r2950935 = r2950934 * r2950934;
        double r2950936 = r2950931 / r2950935;
        double r2950937 = sqrt(r2950936);
        double r2950938 = r2950930 / r2950934;
        double r2950939 = sqrt(r2950938);
        double r2950940 = 27.0;
        double r2950941 = r2950925 * r2950907;
        double r2950942 = r2950940 * r2950941;
        double r2950943 = 9.0;
        double r2950944 = r2950943 * r2950900;
        double r2950945 = r2950942 - r2950944;
        double r2950946 = pow(r2950858, r2950851);
        double r2950947 = r2950856 * r2950946;
        double r2950948 = r2950945 + r2950947;
        double r2950949 = r2950939 * r2950948;
        double r2950950 = r2950937 * r2950949;
        double r2950951 = pow(r2950860, r2950851);
        double r2950952 = r2950856 * r2950951;
        double r2950953 = r2950950 / r2950952;
        double r2950954 = acos(r2950953);
        double r2950955 = r2950873 * r2950954;
        double r2950956 = cos(r2950955);
        double r2950957 = r2950928 * r2950956;
        double r2950958 = r2950957 - r2950923;
        double r2950959 = r2950855 ? r2950924 : r2950958;
        return r2950959;
}

Error

Bits error versus b

Bits error versus a

Bits error versus c

Bits error versus ac

Bits error versus d

Bits error versus abc

Bits error versus ab

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (* 3.0 ac) < -2.007566665900398e-86

    1. Initial program 54.3

      \[\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{6}}{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    2. Taylor expanded around -inf 48.8

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \color{blue}{\left(-\left(1 \cdot \left(\left(\sqrt{-1 \cdot {\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1}\right) + \left(4.5 \cdot \left(\left(\sqrt{-1 \cdot {\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right) \cdot {\left(\frac{1}{{-1}^{3}}\right)}^{1}\right) + 13.5 \cdot \left(\left({a}^{2} \cdot \left(\sqrt{-1 \cdot {\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot d\right)\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right)\right)\right)}\right) - \frac{ab}{3}\]
    3. Simplified48.8

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \color{blue}{\left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)}\right) - \frac{ab}{3}\]
    4. Using strategy rm
    5. Applied sqr-pow48.8

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{\color{blue}{{a}^{\left(\frac{2}{2}\right)} \cdot {a}^{\left(\frac{2}{2}\right)}}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\]
    6. Applied add-sqr-sqrt48.8

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{\color{blue}{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}}{{a}^{\left(\frac{2}{2}\right)} \cdot {a}^{\left(\frac{2}{2}\right)}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\]
    7. Applied times-frac45.1

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\color{blue}{\frac{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}{{a}^{\left(\frac{2}{2}\right)}} \cdot \frac{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}{{a}^{\left(\frac{2}{2}\right)}}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\]
    8. Applied rem-sqrt-square35.2

      \[\leadsto \left(\frac{2}{3} \cdot \color{blue}{\left|\frac{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}{{a}^{\left(\frac{2}{2}\right)}}\right|}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\]

    if -2.007566665900398e-86 < (* 3.0 ac)

    1. Initial program 61.2

      \[\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{6}}{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt61.2

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{6}}{\color{blue}{\left(\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}\right) \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    4. Applied sqr-pow61.1

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-\color{blue}{{a}^{\left(\frac{6}{2}\right)} \cdot {a}^{\left(\frac{6}{2}\right)}}}{\left(\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}\right) \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    5. Applied distribute-lft-neg-in61.1

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{\color{blue}{\left(-{a}^{\left(\frac{6}{2}\right)}\right) \cdot {a}^{\left(\frac{6}{2}\right)}}}{\left(\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}\right) \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    6. Applied times-frac60.5

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\color{blue}{\frac{-{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}} \cdot \frac{{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    7. Applied sqrt-prod61.2

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\color{blue}{\left(\sqrt{\frac{-{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \sqrt{\frac{{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}}\right)} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
    8. Applied associate-*l*61.2

      \[\leadsto \left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\color{blue}{\sqrt{\frac{-{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\sqrt{\frac{{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)\right)}}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.3

    \[\leadsto \begin{array}{l} \mathbf{if}\;3 \cdot ac \le -2.007566665900397945360214295351562907715 \cdot 10^{-86}:\\ \;\;\;\;\left(\frac{2}{3} \cdot \left|\frac{\sqrt{{b}^{2} - \left(3 \cdot a\right) \cdot c}}{{a}^{\left(\frac{2}{2}\right)}}\right|\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(-\left(\left(\left(1 \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot {b}^{3}\right)\right) \cdot {\left(\frac{1}{{-1}^{6}}\right)}^{1} + \left({\left(\frac{1}{{-1}^{3}}\right)}^{1} \cdot \left(\sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}} \cdot abc\right)\right) \cdot 4.5\right) + \left({a}^{2} \cdot \left(\left(d \cdot \sqrt{-{\left(\frac{1}{{\left(e^{3 \cdot \left(\log 3 - \log \left(\frac{-1}{ac}\right)\right)}\right)}^{1} \cdot {-1}^{3}}\right)}^{1}}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) \cdot 13.5\right)\right)\right) - \frac{ab}{3}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{2}{3} \cdot \sqrt{\frac{{b}^{2} - \left(3 \cdot a\right) \cdot c}{{a}^{2}}}\right) \cdot \cos \left(\frac{1}{3} \cdot \cos^{-1} \left(\frac{\sqrt{\frac{-{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}} \cdot \sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\sqrt{\frac{{a}^{\left(\frac{6}{2}\right)}}{\sqrt[3]{{\left(3 \cdot ac - {b}^{2}\right)}^{3}}}} \cdot \left(\left(27 \cdot \left({a}^{2} \cdot d\right) - 9 \cdot abc\right) + 2 \cdot {b}^{3}\right)\right)}{2 \cdot {a}^{3}}\right)\right) - \frac{ab}{3}\\ \end{array}\]

Reproduce

herbie shell --seed 1 
(FPCore (b a c ac d abc ab)
  :name "2/3*sqrt((b^2-3*a*c)/(a^2))*cos(1/3 acos((sqrt(-a^6/(3ac-b^2)^3)(27a^2d-9abc+2b^3))/(2a^3)))-ab/3"
  :precision binary64
  (- (* (* (/ 2 3) (sqrt (/ (- (pow b 2) (* (* 3 a) c)) (pow a 2)))) (cos (* (/ 1 3) (acos (/ (* (sqrt (/ (- (pow a 6)) (pow (- (* 3 ac) (pow b 2)) 3))) (+ (- (* 27 (* (pow a 2) d)) (* 9 abc)) (* 2 (pow b 3)))) (* 2 (pow a 3))))))) (/ ab 3)))