Average Error: 33.7 → 33.7
Time: 1.4s
Precision: binary64
\[b + \sqrt{b \cdot b - a \cdot c}\]
\[b + \sqrt{b \cdot b - a \cdot c}\]
b + \sqrt{b \cdot b - a \cdot c}
b + \sqrt{b \cdot b - a \cdot c}
double code(double b, double a, double c) {
	return ((double) (b + ((double) sqrt(((double) (((double) (b * b)) - ((double) (a * c))))))));
}
double code(double b, double a, double c) {
	return ((double) (b + ((double) sqrt(((double) (((double) (b * b)) - ((double) (a * c))))))));
}

Error

Bits error versus b

Bits error versus a

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 33.7

    \[b + \sqrt{b \cdot b - a \cdot c}\]
  2. Final simplification33.7

    \[\leadsto b + \sqrt{b \cdot b - a \cdot c}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (b a c)
  :name "(+ b (sqrt (- (* b b) (* a c))))"
  :precision binary64
  (+ b (sqrt (- (* b b) (* a c)))))