Average Error: 0.2 → 0.2
Time: 17.8s
Precision: 64
${\left(\frac{q}{2}\right)}^{2} + {\left(\frac{p}{3}\right)}^{3}$
${\left(\frac{q}{2}\right)}^{2} + {\left(\frac{p}{3}\right)}^{3}$
{\left(\frac{q}{2}\right)}^{2} + {\left(\frac{p}{3}\right)}^{3}
{\left(\frac{q}{2}\right)}^{2} + {\left(\frac{p}{3}\right)}^{3}
double f(double q, double p) {
double r2550402 = q;
double r2550403 = 2.0;
double r2550404 = r2550402 / r2550403;
double r2550405 = pow(r2550404, r2550403);
double r2550406 = p;
double r2550407 = 3.0;
double r2550408 = r2550406 / r2550407;
double r2550409 = pow(r2550408, r2550407);
double r2550410 = r2550405 + r2550409;
return r2550410;
}


double f(double q, double p) {
double r2550411 = q;
double r2550412 = 2.0;
double r2550413 = r2550411 / r2550412;
double r2550414 = pow(r2550413, r2550412);
double r2550415 = p;
double r2550416 = 3.0;
double r2550417 = r2550415 / r2550416;
double r2550418 = pow(r2550417, r2550416);
double r2550419 = r2550414 + r2550418;
return r2550419;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.2

${\left(\frac{q}{2}\right)}^{2} + {\left(\frac{p}{3}\right)}^{3}$
2. Final simplification0.2

$\leadsto {\left(\frac{q}{2}\right)}^{2} + {\left(\frac{p}{3}\right)}^{3}$

# Reproduce

herbie shell --seed 1
(FPCore (q p)
:name "(q/2)^2+(p/3)^3"
:precision binary64
(+ (pow (/ q 2) 2) (pow (/ p 3) 3)))