Average Error: 0.0 → 0.0
Time: 26.2s
Precision: 64
\[\cos^{-1} \left(\frac{\left(\left(x + y\right) + z\right) - 1}{2}\right)\]
\[\cos^{-1} \left(\frac{\left(z + \left(x + y\right)\right) - 1}{2}\right)\]
\cos^{-1} \left(\frac{\left(\left(x + y\right) + z\right) - 1}{2}\right)
\cos^{-1} \left(\frac{\left(z + \left(x + y\right)\right) - 1}{2}\right)
double f(double x, double y, double z) {
        double r13661911 = x;
        double r13661912 = y;
        double r13661913 = r13661911 + r13661912;
        double r13661914 = z;
        double r13661915 = r13661913 + r13661914;
        double r13661916 = 1.0;
        double r13661917 = r13661915 - r13661916;
        double r13661918 = 2.0;
        double r13661919 = r13661917 / r13661918;
        double r13661920 = acos(r13661919);
        return r13661920;
}

double f(double x, double y, double z) {
        double r13661921 = z;
        double r13661922 = x;
        double r13661923 = y;
        double r13661924 = r13661922 + r13661923;
        double r13661925 = r13661921 + r13661924;
        double r13661926 = 1.0;
        double r13661927 = r13661925 - r13661926;
        double r13661928 = 2.0;
        double r13661929 = r13661927 / r13661928;
        double r13661930 = acos(r13661929);
        return r13661930;
}

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 0.0

    \[\cos^{-1} \left(\frac{\left(\left(x + y\right) + z\right) - 1}{2}\right)\]
  2. Final simplification0.0

    \[\leadsto \cos^{-1} \left(\frac{\left(z + \left(x + y\right)\right) - 1}{2}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x y z)
  :name "acos((x+y+z-1)/2)"
  (acos (/ (- (+ (+ x y) z) 1) 2)))