Average Error: 0.1 → 0.1
Time: 11.8s
Precision: 64
$\left(k \cdot R\right) \cdot R - D \cdot D$
$\left(R \cdot k\right) \cdot R - D \cdot D$
\left(k \cdot R\right) \cdot R - D \cdot D
\left(R \cdot k\right) \cdot R - D \cdot D
double f(double k, double R, double D) {
double r7868517 = k;
double r7868518 = R;
double r7868519 = r7868517 * r7868518;
double r7868520 = r7868519 * r7868518;
double r7868521 = D;
double r7868522 = r7868521 * r7868521;
double r7868523 = r7868520 - r7868522;
return r7868523;
}


double f(double k, double R, double D) {
double r7868524 = R;
double r7868525 = k;
double r7868526 = r7868524 * r7868525;
double r7868527 = r7868526 * r7868524;
double r7868528 = D;
double r7868529 = r7868528 * r7868528;
double r7868530 = r7868527 - r7868529;
return r7868530;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.1

$\left(k \cdot R\right) \cdot R - D \cdot D$
2. Final simplification0.1

$\leadsto \left(R \cdot k\right) \cdot R - D \cdot D$

# Reproduce

herbie shell --seed 1
(FPCore (k R D)
:name "k * R * R - D * D"
(- (* (* k R) R) (* D D)))