Average Error: 4.5 → 4.5
Time: 1.5s
Precision: binary64
\[\left(a \cdot {x}^{2} + b \cdot x\right) + c\]
\[\left(a \cdot {x}^{2} + b \cdot x\right) + c\]
\left(a \cdot {x}^{2} + b \cdot x\right) + c
\left(a \cdot {x}^{2} + b \cdot x\right) + c
double code(double a, double x, double b, double c) {
	return ((double) (((double) (((double) (a * ((double) pow(x, 2.0)))) + ((double) (b * x)))) + c));
}
double code(double a, double x, double b, double c) {
	return ((double) (((double) (((double) (a * ((double) pow(x, 2.0)))) + ((double) (b * x)))) + c));
}

Error

Bits error versus a

Bits error versus x

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 4.5

    \[\left(a \cdot {x}^{2} + b \cdot x\right) + c\]
  2. Final simplification4.5

    \[\leadsto \left(a \cdot {x}^{2} + b \cdot x\right) + c\]

Reproduce

herbie shell --seed 2020153 
(FPCore (a x b c)
  :name "(+ (+ (* a (pow x 2)) (* b x)) c)"
  :precision binary64
  (+ (+ (* a (pow x 2.0)) (* b x)) c))