Average Error: 0.3 → 0.1
Time: 25.6s
Precision: 64
\[\frac{d}{a} - 0.3333333432674407958984375 \cdot \left(\frac{1}{a} \cdot \left(\frac{1}{a} \cdot bc\right)\right)\]
\[\frac{d}{a} - \frac{0.3333333432674407958984375 \cdot \frac{bc}{a}}{a}\]
\frac{d}{a} - 0.3333333432674407958984375 \cdot \left(\frac{1}{a} \cdot \left(\frac{1}{a} \cdot bc\right)\right)
\frac{d}{a} - \frac{0.3333333432674407958984375 \cdot \frac{bc}{a}}{a}
double f(double d, double a, double bc) {
        double r3082986 = d;
        double r3082987 = a;
        double r3082988 = r3082986 / r3082987;
        double r3082989 = 0.3333333432674408;
        double r3082990 = 1.0;
        double r3082991 = r3082990 / r3082987;
        double r3082992 = bc;
        double r3082993 = r3082991 * r3082992;
        double r3082994 = r3082991 * r3082993;
        double r3082995 = r3082989 * r3082994;
        double r3082996 = r3082988 - r3082995;
        return r3082996;
}

double f(double d, double a, double bc) {
        double r3082997 = d;
        double r3082998 = a;
        double r3082999 = r3082997 / r3082998;
        double r3083000 = 0.3333333432674408;
        double r3083001 = bc;
        double r3083002 = r3083001 / r3082998;
        double r3083003 = r3083000 * r3083002;
        double r3083004 = r3083003 / r3082998;
        double r3083005 = r3082999 - r3083004;
        return r3083005;
}

Error

Bits error versus d

Bits error versus a

Bits error versus bc

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\frac{d}{a} - 0.3333333432674407958984375 \cdot \left(\frac{1}{a} \cdot \left(\frac{1}{a} \cdot bc\right)\right)\]
  2. Using strategy rm
  3. Applied associate-*l/0.2

    \[\leadsto \frac{d}{a} - 0.3333333432674407958984375 \cdot \left(\frac{1}{a} \cdot \color{blue}{\frac{1 \cdot bc}{a}}\right)\]
  4. Applied associate-*r/0.2

    \[\leadsto \frac{d}{a} - 0.3333333432674407958984375 \cdot \color{blue}{\frac{\frac{1}{a} \cdot \left(1 \cdot bc\right)}{a}}\]
  5. Applied associate-*r/0.2

    \[\leadsto \frac{d}{a} - \color{blue}{\frac{0.3333333432674407958984375 \cdot \left(\frac{1}{a} \cdot \left(1 \cdot bc\right)\right)}{a}}\]
  6. Taylor expanded around 0 0.1

    \[\leadsto \frac{d}{a} - \frac{\color{blue}{0.3333333432674407958984375 \cdot \frac{bc}{a}}}{a}\]
  7. Final simplification0.1

    \[\leadsto \frac{d}{a} - \frac{0.3333333432674407958984375 \cdot \frac{bc}{a}}{a}\]

Reproduce

herbie shell --seed 1 
(FPCore (d a bc)
  :name "(d/a)-0.3333333432674407958984375*(1/a*(1/a*bc))"
  :precision binary64
  (- (/ d a) (* 0.333333343 (* (/ 1 a) (* (/ 1 a) bc)))))