Average Error: 0.1 → 0.2
Time: 10.1s
Precision: 64
$\frac{d}{a} - \frac{0.3333333432674407958984375 \cdot \frac{bc}{a}}{a}$
$\frac{d}{a} - \frac{\frac{bc}{a}}{a} \cdot 0.3333333432674407958984375$
\frac{d}{a} - \frac{0.3333333432674407958984375 \cdot \frac{bc}{a}}{a}
\frac{d}{a} - \frac{\frac{bc}{a}}{a} \cdot 0.3333333432674407958984375
double f(double d, double a, double bc) {
double r3087250 = d;
double r3087251 = a;
double r3087252 = r3087250 / r3087251;
double r3087253 = 0.3333333432674408;
double r3087254 = bc;
double r3087255 = r3087254 / r3087251;
double r3087256 = r3087253 * r3087255;
double r3087257 = r3087256 / r3087251;
double r3087258 = r3087252 - r3087257;
return r3087258;
}


double f(double d, double a, double bc) {
double r3087259 = d;
double r3087260 = a;
double r3087261 = r3087259 / r3087260;
double r3087262 = bc;
double r3087263 = r3087262 / r3087260;
double r3087264 = r3087263 / r3087260;
double r3087265 = 0.3333333432674408;
double r3087266 = r3087264 * r3087265;
double r3087267 = r3087261 - r3087266;
return r3087267;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.1

$\frac{d}{a} - \frac{0.3333333432674407958984375 \cdot \frac{bc}{a}}{a}$
2. Using strategy rm
3. Applied div-inv0.2

$\leadsto \frac{d}{a} - \color{blue}{\left(0.3333333432674407958984375 \cdot \frac{bc}{a}\right) \cdot \frac{1}{a}}$
4. Using strategy rm
5. Applied pow10.2

$\leadsto \frac{d}{a} - \left(0.3333333432674407958984375 \cdot \frac{bc}{a}\right) \cdot \color{blue}{{\left(\frac{1}{a}\right)}^{1}}$
6. Applied pow10.2

$\leadsto \frac{d}{a} - \left(0.3333333432674407958984375 \cdot \color{blue}{{\left(\frac{bc}{a}\right)}^{1}}\right) \cdot {\left(\frac{1}{a}\right)}^{1}$
7. Applied pow10.2

$\leadsto \frac{d}{a} - \left(\color{blue}{{0.3333333432674407958984375}^{1}} \cdot {\left(\frac{bc}{a}\right)}^{1}\right) \cdot {\left(\frac{1}{a}\right)}^{1}$
8. Applied pow-prod-down0.2

$\leadsto \frac{d}{a} - \color{blue}{{\left(0.3333333432674407958984375 \cdot \frac{bc}{a}\right)}^{1}} \cdot {\left(\frac{1}{a}\right)}^{1}$
9. Applied pow-prod-down0.2

$\leadsto \frac{d}{a} - \color{blue}{{\left(\left(0.3333333432674407958984375 \cdot \frac{bc}{a}\right) \cdot \frac{1}{a}\right)}^{1}}$
10. Simplified0.2

$\leadsto \frac{d}{a} - {\color{blue}{\left(\frac{\frac{bc}{a}}{a} \cdot 0.3333333432674407958984375\right)}}^{1}$
11. Final simplification0.2

$\leadsto \frac{d}{a} - \frac{\frac{bc}{a}}{a} \cdot 0.3333333432674407958984375$

# Reproduce

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