Average Error: 34.2 → 34.2
Time: 1.8s
Precision: binary64
\[\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
\[\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}
\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}
double code(double b, double a, double c) {
	return ((double) (((double) (((double) sqrt(((double) (((double) (b * b)) - ((double) (((double) (4.0 * a)) * c)))))) - b)) / ((double) (2.0 * a))));
}
double code(double b, double a, double c) {
	return ((double) (((double) (((double) sqrt(((double) (((double) (b * b)) - ((double) (((double) (4.0 * a)) * c)))))) - b)) / ((double) (2.0 * a))));
}

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 34.2

    \[\frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]
  2. Final simplification34.2

    \[\leadsto \frac{\sqrt{b \cdot b - \left(4 \cdot a\right) \cdot c} - b}{2 \cdot a}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (b a c)
  :name "(/ (- (sqrt (- (* b b) (* (* 4 a) c))) b) (* 2 a))"
  :precision binary64
  (/ (- (sqrt (- (* b b) (* (* 4.0 a) c))) b) (* 2.0 a)))