Average Error: 7.8 → 0.3
Time: 22.6s
Precision: 64
$\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot {y}^{2}\right) \cdot x - 56 \cdot {z}^{3}$
$\left(\left({x}^{4} + 28 \cdot \left(\left(\left(x \cdot y\right) \cdot y\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) - 7 \cdot {x}^{3}\right) - 56 \cdot {z}^{3}$
\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot {y}^{2}\right) \cdot x - 56 \cdot {z}^{3}
\left(\left({x}^{4} + 28 \cdot \left(\left(\left(x \cdot y\right) \cdot y\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) - 7 \cdot {x}^{3}\right) - 56 \cdot {z}^{3}
double f(double x, double y, double z) {
double r345605 = x;
double r345606 = r345605 * r345605;
double r345607 = 7.0;
double r345608 = r345607 * r345605;
double r345609 = r345606 - r345608;
double r345610 = r345609 * r345605;
double r345611 = 28.0;
double r345612 = y;
double r345613 = 2.0;
double r345614 = pow(r345612, r345613);
double r345615 = r345611 * r345614;
double r345616 = r345610 + r345615;
double r345617 = r345616 * r345605;
double r345618 = 56.0;
double r345619 = z;
double r345620 = 3.0;
double r345621 = pow(r345619, r345620);
double r345622 = r345618 * r345621;
double r345623 = r345617 - r345622;
return r345623;
}


double f(double x, double y, double z) {
double r345624 = x;
double r345625 = 4.0;
double r345626 = pow(r345624, r345625);
double r345627 = 28.0;
double r345628 = y;
double r345629 = r345624 * r345628;
double r345630 = r345629 * r345628;
double r345631 = 1.0;
double r345632 = -1.0;
double r345633 = 2.0;
double r345634 = pow(r345632, r345633);
double r345635 = r345631 / r345634;
double r345636 = 1.0;
double r345637 = pow(r345635, r345636);
double r345638 = r345630 * r345637;
double r345639 = r345627 * r345638;
double r345640 = r345626 + r345639;
double r345641 = 7.0;
double r345642 = 3.0;
double r345643 = pow(r345624, r345642);
double r345644 = r345641 * r345643;
double r345645 = r345640 - r345644;
double r345646 = 56.0;
double r345647 = z;
double r345648 = 3.0;
double r345649 = pow(r345647, r345648);
double r345650 = r345646 * r345649;
double r345651 = r345645 - r345650;
return r345651;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 7.8

$\left(\left(x \cdot x - 7 \cdot x\right) \cdot x + 28 \cdot {y}^{2}\right) \cdot x - 56 \cdot {z}^{3}$
2. Simplified7.8

$\leadsto \color{blue}{\left(28 \cdot {y}^{2} + x \cdot \left(x \cdot \left(x - 7\right)\right)\right) \cdot x - 56 \cdot {z}^{3}}$
3. Taylor expanded around -inf 7.7

$\leadsto \color{blue}{\left(\left({x}^{4} + 28 \cdot \left(\left(x \cdot {y}^{2}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) - 7 \cdot {x}^{3}\right)} - 56 \cdot {z}^{3}$
4. Using strategy rm
5. Applied unpow27.7

$\leadsto \left(\left({x}^{4} + 28 \cdot \left(\left(x \cdot \color{blue}{\left(y \cdot y\right)}\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) - 7 \cdot {x}^{3}\right) - 56 \cdot {z}^{3}$
6. Applied associate-*r*0.3

$\leadsto \left(\left({x}^{4} + 28 \cdot \left(\color{blue}{\left(\left(x \cdot y\right) \cdot y\right)} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) - 7 \cdot {x}^{3}\right) - 56 \cdot {z}^{3}$
7. Final simplification0.3

$\leadsto \left(\left({x}^{4} + 28 \cdot \left(\left(\left(x \cdot y\right) \cdot y\right) \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right)\right) - 7 \cdot {x}^{3}\right) - 56 \cdot {z}^{3}$

# Reproduce

herbie shell --seed 1
(FPCore (x y z)
:name "((x*x-7*x)*x+28*pow(y,2))*x - 56*pow(z,3)"
:precision binary64
(- (* (+ (* (- (* x x) (* 7 x)) x) (* 28 (pow y 2))) x) (* 56 (pow z 3))))