Average Error: 0.8 → 0.1
Time: 21.1s
Precision: 64
$\left(\left(\left({x}^{4} + a \cdot {x}^{3}\right) + b \cdot {x}^{2}\right) + c \cdot x\right) + d$
$d + \left(x \cdot \left(x \cdot \left(x + a\right) + b\right) + c\right) \cdot x$
\left(\left(\left({x}^{4} + a \cdot {x}^{3}\right) + b \cdot {x}^{2}\right) + c \cdot x\right) + d
d + \left(x \cdot \left(x \cdot \left(x + a\right) + b\right) + c\right) \cdot x
double f(double x, double a, double b, double c, double d) {
double r11614147 = x;
double r11614148 = 4.0;
double r11614149 = pow(r11614147, r11614148);
double r11614150 = a;
double r11614151 = 3.0;
double r11614152 = pow(r11614147, r11614151);
double r11614153 = r11614150 * r11614152;
double r11614154 = r11614149 + r11614153;
double r11614155 = b;
double r11614156 = 2.0;
double r11614157 = pow(r11614147, r11614156);
double r11614158 = r11614155 * r11614157;
double r11614159 = r11614154 + r11614158;
double r11614160 = c;
double r11614161 = r11614160 * r11614147;
double r11614162 = r11614159 + r11614161;
double r11614163 = d;
double r11614164 = r11614162 + r11614163;
return r11614164;
}

double f(double x, double a, double b, double c, double d) {
double r11614165 = d;
double r11614166 = x;
double r11614167 = a;
double r11614168 = r11614166 + r11614167;
double r11614169 = r11614166 * r11614168;
double r11614170 = b;
double r11614171 = r11614169 + r11614170;
double r11614172 = r11614166 * r11614171;
double r11614173 = c;
double r11614174 = r11614172 + r11614173;
double r11614175 = r11614174 * r11614166;
double r11614176 = r11614165 + r11614175;
return r11614176;
}

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.8

$\left(\left(\left({x}^{4} + a \cdot {x}^{3}\right) + b \cdot {x}^{2}\right) + c \cdot x\right) + d$
2. Simplified0.1

$\leadsto \color{blue}{d + x \cdot \left(c + x \cdot \left(x \cdot \left(a + x\right) + b\right)\right)}$
3. Final simplification0.1

$\leadsto d + \left(x \cdot \left(x \cdot \left(x + a\right) + b\right) + c\right) \cdot x$

# Reproduce

herbie shell --seed 1
(FPCore (x a b c d)
:name "pow(x,4)+a*pow(x,3)+b*pow(x,2)+c*x+d"
(+ (+ (+ (+ (pow x 4) (* a (pow x 3))) (* b (pow x 2))) (* c x)) d))