Average Error: 45.3 → 45.3
Time: 1.6s
Precision: binary64
\[\frac{\left(\sqrt{\left(x - y\right) \cdot \left(x - y\right) + \left(4 \cdot z\right) \cdot z} - x\right) - y}{2}\]
\[\frac{\left(\sqrt{\left(x - y\right) \cdot \left(x - y\right) + \left(4 \cdot z\right) \cdot z} - x\right) - y}{2}\]
\frac{\left(\sqrt{\left(x - y\right) \cdot \left(x - y\right) + \left(4 \cdot z\right) \cdot z} - x\right) - y}{2}
\frac{\left(\sqrt{\left(x - y\right) \cdot \left(x - y\right) + \left(4 \cdot z\right) \cdot z} - x\right) - y}{2}
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (((double) sqrt(((double) (((double) (((double) (x - y)) * ((double) (x - y)))) + ((double) (((double) (4.0 * z)) * z)))))) - x)) - y)) / 2.0));
}
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (((double) sqrt(((double) (((double) (((double) (x - y)) * ((double) (x - y)))) + ((double) (((double) (4.0 * z)) * z)))))) - x)) - y)) / 2.0));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 45.3

    \[\frac{\left(\sqrt{\left(x - y\right) \cdot \left(x - y\right) + \left(4 \cdot z\right) \cdot z} - x\right) - y}{2}\]
  2. Final simplification45.3

    \[\leadsto \frac{\left(\sqrt{\left(x - y\right) \cdot \left(x - y\right) + \left(4 \cdot z\right) \cdot z} - x\right) - y}{2}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x y z)
  :name "(/ (- (- (sqrt (+ (* (- x y) (- x y)) (* (* 4 z) z))) x) y) 2)"
  :precision binary64
  (/ (- (- (sqrt (+ (* (- x y) (- x y)) (* (* 4.0 z) z))) x) y) 2.0))