Average Error: 44.3 → 44.3
Time: 1.0s
Precision: binary64
\[\sqrt{\left(\left(w \cdot w + x \cdot x\right) + y \cdot y\right) + z \cdot z}\]
\[\sqrt{\left(\left(w \cdot w + x \cdot x\right) + y \cdot y\right) + z \cdot z}\]
\sqrt{\left(\left(w \cdot w + x \cdot x\right) + y \cdot y\right) + z \cdot z}
\sqrt{\left(\left(w \cdot w + x \cdot x\right) + y \cdot y\right) + z \cdot z}
double code(double w, double x, double y, double z) {
	return ((double) sqrt(((double) (((double) (((double) (((double) (w * w)) + ((double) (x * x)))) + ((double) (y * y)))) + ((double) (z * z))))));
}
double code(double w, double x, double y, double z) {
	return ((double) sqrt(((double) (((double) (((double) (((double) (w * w)) + ((double) (x * x)))) + ((double) (y * y)))) + ((double) (z * z))))));
}

Error

Bits error versus w

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 44.3

    \[\sqrt{\left(\left(w \cdot w + x \cdot x\right) + y \cdot y\right) + z \cdot z}\]
  2. Final simplification44.3

    \[\leadsto \sqrt{\left(\left(w \cdot w + x \cdot x\right) + y \cdot y\right) + z \cdot z}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (w x y z)
  :name "(sqrt (+ (+ (+ (* w w) (* x x)) (* y y)) (* z z)))"
  :precision binary64
  (sqrt (+ (+ (+ (* w w) (* x x)) (* y y)) (* z z))))