Average Error: 0.0 → 0.0
Time: 18.6s
Precision: 64
$\left(\left(\left(\left({x}^{5} - {x}^{4}\right) - 5 \cdot {x}^{3}\right) + {x}^{2}\right) + 8 \cdot x\right) + 4$
$\left(\left({x}^{2} + \left(\left({x}^{5} - {x}^{4}\right) - 5 \cdot {x}^{3}\right)\right) + 8 \cdot x\right) + 4$
\left(\left(\left(\left({x}^{5} - {x}^{4}\right) - 5 \cdot {x}^{3}\right) + {x}^{2}\right) + 8 \cdot x\right) + 4
\left(\left({x}^{2} + \left(\left({x}^{5} - {x}^{4}\right) - 5 \cdot {x}^{3}\right)\right) + 8 \cdot x\right) + 4
double f(double x) {
double r43305894 = x;
double r43305895 = 5.0;
double r43305896 = pow(r43305894, r43305895);
double r43305897 = 4.0;
double r43305898 = pow(r43305894, r43305897);
double r43305899 = r43305896 - r43305898;
double r43305900 = 3.0;
double r43305901 = pow(r43305894, r43305900);
double r43305902 = r43305895 * r43305901;
double r43305903 = r43305899 - r43305902;
double r43305904 = 2.0;
double r43305905 = pow(r43305894, r43305904);
double r43305906 = r43305903 + r43305905;
double r43305907 = 8.0;
double r43305908 = r43305907 * r43305894;
double r43305909 = r43305906 + r43305908;
double r43305910 = r43305909 + r43305897;
return r43305910;
}


double f(double x) {
double r43305911 = x;
double r43305912 = 2.0;
double r43305913 = pow(r43305911, r43305912);
double r43305914 = 5.0;
double r43305915 = pow(r43305911, r43305914);
double r43305916 = 4.0;
double r43305917 = pow(r43305911, r43305916);
double r43305918 = r43305915 - r43305917;
double r43305919 = 3.0;
double r43305920 = pow(r43305911, r43305919);
double r43305921 = r43305914 * r43305920;
double r43305922 = r43305918 - r43305921;
double r43305923 = r43305913 + r43305922;
double r43305924 = 8.0;
double r43305925 = r43305924 * r43305911;
double r43305926 = r43305923 + r43305925;
double r43305927 = r43305926 + r43305916;
return r43305927;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\left(\left(\left(\left({x}^{5} - {x}^{4}\right) - 5 \cdot {x}^{3}\right) + {x}^{2}\right) + 8 \cdot x\right) + 4$
2. Final simplification0.0

$\leadsto \left(\left({x}^{2} + \left(\left({x}^{5} - {x}^{4}\right) - 5 \cdot {x}^{3}\right)\right) + 8 \cdot x\right) + 4$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "pow(x,5)-pow(x,4)-5*pow(x,3)+pow(x,2)+8*x+4"
(+ (+ (+ (- (- (pow x 5) (pow x 4)) (* 5 (pow x 3))) (pow x 2)) (* 8 x)) 4))