Average Error: 21.7 → 1.5
Time: 14.9s
Precision: 64
\[\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}\]
\[1 \cdot \left({\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot d\right) - 0.3333333432674407958984375 \cdot \left({\left(\frac{1}{{a}^{3}}\right)}^{1} \cdot abc\right)\]
\frac{\left(2 \cdot {b}^{3} - 9 \cdot abc\right) + 27 \cdot \left({a}^{2} \cdot d\right)}{27 \cdot {a}^{3}}
1 \cdot \left({\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot d\right) - 0.3333333432674407958984375 \cdot \left({\left(\frac{1}{{a}^{3}}\right)}^{1} \cdot abc\right)
double f(double b, double abc, double a, double d) {
        double r2986704 = 2.0;
        double r2986705 = b;
        double r2986706 = 3.0;
        double r2986707 = pow(r2986705, r2986706);
        double r2986708 = r2986704 * r2986707;
        double r2986709 = 9.0;
        double r2986710 = abc;
        double r2986711 = r2986709 * r2986710;
        double r2986712 = r2986708 - r2986711;
        double r2986713 = 27.0;
        double r2986714 = a;
        double r2986715 = pow(r2986714, r2986704);
        double r2986716 = d;
        double r2986717 = r2986715 * r2986716;
        double r2986718 = r2986713 * r2986717;
        double r2986719 = r2986712 + r2986718;
        double r2986720 = pow(r2986714, r2986706);
        double r2986721 = r2986713 * r2986720;
        double r2986722 = r2986719 / r2986721;
        return r2986722;
}

double f(double __attribute__((unused)) b, double abc, double a, double d) {
        double r2986723 = 1.0;
        double r2986724 = 1.0;
        double r2986725 = a;
        double r2986726 = pow(r2986725, r2986723);
        double r2986727 = r2986724 / r2986726;
        double r2986728 = pow(r2986727, r2986723);
        double r2986729 = d;
        double r2986730 = r2986728 * r2986729;
        double r2986731 = r2986723 * r2986730;
        double r2986732 = 0.3333333432674408;
        double r2986733 = 3.0;
        double r2986734 = pow(r2986725, r2986733);
        double r2986735 = r2986724 / r2986734;
        double r2986736 = pow(r2986735, r2986723);
        double r2986737 = abc;
        double r2986738 = r2986736 * r2986737;
        double r2986739 = r2986732 * r2986738;
        double r2986740 = r2986731 - r2986739;
        return r2986740;
}

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. Initial program 21.7

    \[\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 0 1.5

    \[\leadsto \color{blue}{1 \cdot \left({\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot d\right) - 0.3333333432674407958984375 \cdot \left({\left(\frac{1}{{a}^{3}}\right)}^{1} \cdot abc\right)}\]
  3. Final simplification1.5

    \[\leadsto 1 \cdot \left({\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot d\right) - 0.3333333432674407958984375 \cdot \left({\left(\frac{1}{{a}^{3}}\right)}^{1} \cdot abc\right)\]

Reproduce

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