Average Error: 23.3 → 23.3
Time: 1.2s
Precision: binary64
\[\sqrt{\left(b \cdot b - 4 \cdot c\right) + 4 \cdot y}\]
\[\sqrt{\left(b \cdot b - 4 \cdot c\right) + 4 \cdot y}\]
\sqrt{\left(b \cdot b - 4 \cdot c\right) + 4 \cdot y}
\sqrt{\left(b \cdot b - 4 \cdot c\right) + 4 \cdot y}
double code(double b, double c, double y) {
	return ((double) sqrt(((double) (((double) (((double) (b * b)) - ((double) (4.0 * c)))) + ((double) (4.0 * y))))));
}
double code(double b, double c, double y) {
	return ((double) sqrt(((double) (((double) (((double) (b * b)) - ((double) (4.0 * c)))) + ((double) (4.0 * y))))));
}

Error

Bits error versus b

Bits error versus c

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 23.3

    \[\sqrt{\left(b \cdot b - 4 \cdot c\right) + 4 \cdot y}\]
  2. Final simplification23.3

    \[\leadsto \sqrt{\left(b \cdot b - 4 \cdot c\right) + 4 \cdot y}\]

Reproduce

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