Average Error: 44.1 → 12.2
Time: 19.7s
Precision: 64
\[\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}\]
\[\begin{array}{l} \mathbf{if}\;a \le -158565196626146819745295736082792448:\\ \;\;\;\;1 \cdot \frac{d}{a} - \left({\left(\frac{1}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right) \cdot 0.3333333333333333148296162562473909929395\\ \mathbf{elif}\;a \le -3.921378626449643117794503392869464589061 \cdot 10^{-104}:\\ \;\;\;\;\frac{1}{\frac{27 \cdot {a}^{3}}{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}}\\ \mathbf{elif}\;a \le 1.321981232923319674055470132867333051175 \cdot 10^{-92}:\\ \;\;\;\;1 \cdot \frac{d}{a} - \left({\left(\frac{1}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right) \cdot 0.3333333333333333148296162562473909929395\\ \mathbf{elif}\;a \le 2.531428896061023214487565540485503608657 \cdot 10^{61}:\\ \;\;\;\;\frac{\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27}}{{a}^{3}}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot abc\right)\right)\\ \end{array}\]
\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}
\begin{array}{l}
\mathbf{if}\;a \le -158565196626146819745295736082792448:\\
\;\;\;\;1 \cdot \frac{d}{a} - \left({\left(\frac{1}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right) \cdot 0.3333333333333333148296162562473909929395\\

\mathbf{elif}\;a \le -3.921378626449643117794503392869464589061 \cdot 10^{-104}:\\
\;\;\;\;\frac{1}{\frac{27 \cdot {a}^{3}}{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}}\\

\mathbf{elif}\;a \le 1.321981232923319674055470132867333051175 \cdot 10^{-92}:\\
\;\;\;\;1 \cdot \frac{d}{a} - \left({\left(\frac{1}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right) \cdot 0.3333333333333333148296162562473909929395\\

\mathbf{elif}\;a \le 2.531428896061023214487565540485503608657 \cdot 10^{61}:\\
\;\;\;\;\frac{\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27}}{{a}^{3}}\\

\mathbf{else}:\\
\;\;\;\;1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot abc\right)\right)\\

\end{array}
double f(double b, double abc, double a, double d) {
        double r2977651 = 2.0;
        double r2977652 = b;
        double r2977653 = 3.0;
        double r2977654 = pow(r2977652, r2977653);
        double r2977655 = r2977651 * r2977654;
        double r2977656 = 9.0;
        double r2977657 = abc;
        double r2977658 = r2977656 * r2977657;
        double r2977659 = r2977655 - r2977658;
        double r2977660 = 27.0;
        double r2977661 = a;
        double r2977662 = pow(r2977661, r2977651);
        double r2977663 = d;
        double r2977664 = r2977662 * r2977663;
        double r2977665 = r2977660 * r2977664;
        double r2977666 = r2977659 + r2977665;
        double r2977667 = pow(r2977661, r2977653);
        double r2977668 = r2977660 * r2977667;
        double r2977669 = r2977666 / r2977668;
        return r2977669;
}

double f(double b, double abc, double a, double d) {
        double r2977670 = a;
        double r2977671 = -1.5856519662614682e+35;
        bool r2977672 = r2977670 <= r2977671;
        double r2977673 = 1.0;
        double r2977674 = d;
        double r2977675 = r2977674 / r2977670;
        double r2977676 = r2977673 * r2977675;
        double r2977677 = 1.0;
        double r2977678 = cbrt(r2977670);
        double r2977679 = r2977678 * r2977678;
        double r2977680 = 3.0;
        double r2977681 = pow(r2977679, r2977680);
        double r2977682 = r2977677 / r2977681;
        double r2977683 = pow(r2977682, r2977673);
        double r2977684 = pow(r2977678, r2977680);
        double r2977685 = r2977677 / r2977684;
        double r2977686 = pow(r2977685, r2977673);
        double r2977687 = abc;
        double r2977688 = r2977686 * r2977687;
        double r2977689 = r2977683 * r2977688;
        double r2977690 = 0.3333333333333333;
        double r2977691 = r2977689 * r2977690;
        double r2977692 = r2977676 - r2977691;
        double r2977693 = -3.921378626449643e-104;
        bool r2977694 = r2977670 <= r2977693;
        double r2977695 = 27.0;
        double r2977696 = pow(r2977670, r2977680);
        double r2977697 = r2977695 * r2977696;
        double r2977698 = 2.0;
        double r2977699 = b;
        double r2977700 = pow(r2977699, r2977680);
        double r2977701 = r2977698 * r2977700;
        double r2977702 = 9.0;
        double r2977703 = r2977702 * r2977687;
        double r2977704 = r2977701 - r2977703;
        double r2977705 = pow(r2977670, r2977698);
        double r2977706 = r2977705 * r2977674;
        double r2977707 = r2977695 * r2977706;
        double r2977708 = r2977704 + r2977707;
        double r2977709 = r2977697 / r2977708;
        double r2977710 = r2977677 / r2977709;
        double r2977711 = 1.3219812329233197e-92;
        bool r2977712 = r2977670 <= r2977711;
        double r2977713 = 2.5314288960610232e+61;
        bool r2977714 = r2977670 <= r2977713;
        double r2977715 = r2977708 / r2977695;
        double r2977716 = r2977715 / r2977696;
        double r2977717 = 2.0;
        double r2977718 = r2977680 / r2977717;
        double r2977719 = pow(r2977670, r2977718);
        double r2977720 = r2977677 / r2977719;
        double r2977721 = pow(r2977720, r2977673);
        double r2977722 = r2977721 * r2977687;
        double r2977723 = r2977721 * r2977722;
        double r2977724 = r2977690 * r2977723;
        double r2977725 = r2977676 - r2977724;
        double r2977726 = r2977714 ? r2977716 : r2977725;
        double r2977727 = r2977712 ? r2977692 : r2977726;
        double r2977728 = r2977694 ? r2977710 : r2977727;
        double r2977729 = r2977672 ? r2977692 : r2977728;
        return r2977729;
}

Error

Bits error versus b

Bits error versus abc

Bits error versus a

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if a < -1.5856519662614682e+35 or -3.921378626449643e-104 < a < 1.3219812329233197e-92

    1. Initial program 54.1

      \[\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}\]
    2. Taylor expanded around inf 18.9

      \[\leadsto \color{blue}{1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{{a}^{3}}\right)}^{1} \cdot abc\right)}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt19.0

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{{\color{blue}{\left(\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}\right)}}^{3}}\right)}^{1} \cdot abc\right)\]
    5. Applied unpow-prod-down19.0

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{\color{blue}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3} \cdot {\left(\sqrt[3]{a}\right)}^{3}}}\right)}^{1} \cdot abc\right)\]
    6. Applied add-cube-cbrt19.0

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3} \cdot {\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\]
    7. Applied times-frac18.9

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\color{blue}{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}} \cdot \frac{\sqrt[3]{1}}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}}^{1} \cdot abc\right)\]
    8. Applied unpow-prod-down18.9

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left(\color{blue}{\left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot {\left(\frac{\sqrt[3]{1}}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1}\right)} \cdot abc\right)\]
    9. Applied associate-*l*14.9

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \color{blue}{\left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{\sqrt[3]{1}}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right)}\]
    10. Simplified14.9

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \color{blue}{\left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)}\right)\]

    if -1.5856519662614682e+35 < a < -3.921378626449643e-104

    1. Initial program 2.7

      \[\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}\]
    2. Using strategy rm
    3. Applied clear-num2.7

      \[\leadsto \color{blue}{\frac{1}{\frac{27 \cdot {a}^{3}}{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}}}\]

    if 1.3219812329233197e-92 < a < 2.5314288960610232e+61

    1. Initial program 6.2

      \[\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}\]
    2. Using strategy rm
    3. Applied associate-/r*6.2

      \[\leadsto \color{blue}{\frac{\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27}}{{a}^{3}}}\]

    if 2.5314288960610232e+61 < a

    1. Initial program 57.8

      \[\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}\]
    2. Taylor expanded around inf 15.8

      \[\leadsto \color{blue}{1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{{a}^{3}}\right)}^{1} \cdot abc\right)}\]
    3. Using strategy rm
    4. Applied sqr-pow15.8

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{\color{blue}{{a}^{\left(\frac{3}{2}\right)} \cdot {a}^{\left(\frac{3}{2}\right)}}}\right)}^{1} \cdot abc\right)\]
    5. Applied add-cube-cbrt15.8

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{{a}^{\left(\frac{3}{2}\right)} \cdot {a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot abc\right)\]
    6. Applied times-frac15.7

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\color{blue}{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}} \cdot \frac{\sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}}\right)}}^{1} \cdot abc\right)\]
    7. Applied unpow-prod-down15.7

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left(\color{blue}{\left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot {\left(\frac{\sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1}\right)} \cdot abc\right)\]
    8. Applied associate-*l*14.0

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \color{blue}{\left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{\sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot abc\right)\right)}\]
    9. Simplified14.0

      \[\leadsto 1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot \color{blue}{\left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot abc\right)}\right)\]
  3. Recombined 4 regimes into one program.
  4. Final simplification12.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \le -158565196626146819745295736082792448:\\ \;\;\;\;1 \cdot \frac{d}{a} - \left({\left(\frac{1}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right) \cdot 0.3333333333333333148296162562473909929395\\ \mathbf{elif}\;a \le -3.921378626449643117794503392869464589061 \cdot 10^{-104}:\\ \;\;\;\;\frac{1}{\frac{27 \cdot {a}^{3}}{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}}\\ \mathbf{elif}\;a \le 1.321981232923319674055470132867333051175 \cdot 10^{-92}:\\ \;\;\;\;1 \cdot \frac{d}{a} - \left({\left(\frac{1}{{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot \left({\left(\frac{1}{{\left(\sqrt[3]{a}\right)}^{3}}\right)}^{1} \cdot abc\right)\right) \cdot 0.3333333333333333148296162562473909929395\\ \mathbf{elif}\;a \le 2.531428896061023214487565540485503608657 \cdot 10^{61}:\\ \;\;\;\;\frac{\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27}}{{a}^{3}}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \frac{d}{a} - 0.3333333333333333148296162562473909929395 \cdot \left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot \left({\left(\frac{1}{{a}^{\left(\frac{3}{2}\right)}}\right)}^{1} \cdot abc\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 1 
(FPCore (b abc a d)
  :name "(2b^3-9abc+27a^2d)/(27a^3)"
  :precision binary64
  (/ (+ (- (* 2 (pow b 3)) (* 9 abc)) (* 27 (* (pow a 2) d))) (* 27 (pow a 3))))