Average Error: 26.2 → 26.2
Time: 3.3s
Precision: binary64
\[\cos^{-1} \left(\frac{\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3}{\sqrt{\left(x1 \cdot x1 + x2 \cdot x2\right) + x3 \cdot x3} \cdot \sqrt{\left(\left(y1 \cdot y1 + y2 \cdot y2\right) + y3\right) + y3}}\right)\]
\[\cos^{-1} \left(\frac{\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3}{\sqrt{\left(x1 \cdot x1 + x2 \cdot x2\right) + x3 \cdot x3} \cdot \sqrt{\left(\left(y1 \cdot y1 + y2 \cdot y2\right) + y3\right) + y3}}\right)\]
\cos^{-1} \left(\frac{\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3}{\sqrt{\left(x1 \cdot x1 + x2 \cdot x2\right) + x3 \cdot x3} \cdot \sqrt{\left(\left(y1 \cdot y1 + y2 \cdot y2\right) + y3\right) + y3}}\right)
\cos^{-1} \left(\frac{\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3}{\sqrt{\left(x1 \cdot x1 + x2 \cdot x2\right) + x3 \cdot x3} \cdot \sqrt{\left(\left(y1 \cdot y1 + y2 \cdot y2\right) + y3\right) + y3}}\right)
double code(double x1, double y1, double x2, double y2, double x3, double y3) {
	return ((double) acos(((double) (((double) (((double) (((double) (x1 * y1)) + ((double) (x2 * y2)))) + ((double) (x3 * y3)))) / ((double) (((double) sqrt(((double) (((double) (((double) (x1 * x1)) + ((double) (x2 * x2)))) + ((double) (x3 * x3)))))) * ((double) sqrt(((double) (((double) (((double) (((double) (y1 * y1)) + ((double) (y2 * y2)))) + y3)) + y3))))))))));
}
double code(double x1, double y1, double x2, double y2, double x3, double y3) {
	return ((double) acos(((double) (((double) (((double) (((double) (x1 * y1)) + ((double) (x2 * y2)))) + ((double) (x3 * y3)))) / ((double) (((double) sqrt(((double) (((double) (((double) (x1 * x1)) + ((double) (x2 * x2)))) + ((double) (x3 * x3)))))) * ((double) sqrt(((double) (((double) (((double) (((double) (y1 * y1)) + ((double) (y2 * y2)))) + y3)) + y3))))))))));
}

Error

Bits error versus x1

Bits error versus y1

Bits error versus x2

Bits error versus y2

Bits error versus x3

Bits error versus y3

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 26.2

    \[\cos^{-1} \left(\frac{\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3}{\sqrt{\left(x1 \cdot x1 + x2 \cdot x2\right) + x3 \cdot x3} \cdot \sqrt{\left(\left(y1 \cdot y1 + y2 \cdot y2\right) + y3\right) + y3}}\right)\]
  2. Final simplification26.2

    \[\leadsto \cos^{-1} \left(\frac{\left(x1 \cdot y1 + x2 \cdot y2\right) + x3 \cdot y3}{\sqrt{\left(x1 \cdot x1 + x2 \cdot x2\right) + x3 \cdot x3} \cdot \sqrt{\left(\left(y1 \cdot y1 + y2 \cdot y2\right) + y3\right) + y3}}\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x1 y1 x2 y2 x3 y3)
  :name "(acos (/ (+ (+ (* x1 y1) (* x2 y2)) (* x3 y3)) (* (sqrt (+ (+ (* x1 x1) (* x2 x2)) (* x3 x3))) (sqrt (+ (+ (+ (* y1 y1) (* y2 y2)) y3) y3)))))"
  :precision binary64
  (acos (/ (+ (+ (* x1 y1) (* x2 y2)) (* x3 y3)) (* (sqrt (+ (+ (* x1 x1) (* x2 x2)) (* x3 x3))) (sqrt (+ (+ (+ (* y1 y1) (* y2 y2)) y3) y3))))))