Average Error: 25.6 → 25.6
Time: 1.2s
Precision: binary64
\[\sqrt{{b}^{2} - \left(4 \cdot a\right) \cdot b}\]
\[\sqrt{{b}^{2} - \left(4 \cdot a\right) \cdot b}\]
\sqrt{{b}^{2} - \left(4 \cdot a\right) \cdot b}
\sqrt{{b}^{2} - \left(4 \cdot a\right) \cdot b}
double code(double b, double a) {
	return ((double) sqrt(((double) (((double) pow(b, 2.0)) - ((double) (((double) (4.0 * a)) * b))))));
}
double code(double b, double a) {
	return ((double) sqrt(((double) (((double) pow(b, 2.0)) - ((double) (((double) (4.0 * a)) * b))))));
}

Error

Bits error versus b

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 25.6

    \[\sqrt{{b}^{2} - \left(4 \cdot a\right) \cdot b}\]
  2. Final simplification25.6

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

Reproduce

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