# ?

Average Error: 0.1 → 0.0
Time: 5.6s
Precision: binary64
Cost: 25984

# ?

$\left(\left(-1 \leq x \land x \leq 1\right) \land \left(-1 \leq y \land y \leq 1\right)\right) \land \left(-1 \leq z \land z \leq 1\right)$
$\left(\left(\cos^{-1} x + \cos^{-1} y\right) + \cos^{-1} z\right) - \pi$
$\cos^{-1} x + \left(\cos^{-1} z + \left(\cos^{-1} y - \pi\right)\right)$
(FPCore (x y z) :precision binary64 (- (+ (+ (acos x) (acos y)) (acos z)) PI))
(FPCore (x y z) :precision binary64 (+ (acos x) (+ (acos z) (- (acos y) PI))))
double code(double x, double y, double z) {
return ((acos(x) + acos(y)) + acos(z)) - ((double) M_PI);
}

double code(double x, double y, double z) {
return acos(x) + (acos(z) + (acos(y) - ((double) M_PI)));
}

public static double code(double x, double y, double z) {
return ((Math.acos(x) + Math.acos(y)) + Math.acos(z)) - Math.PI;
}

public static double code(double x, double y, double z) {
return Math.acos(x) + (Math.acos(z) + (Math.acos(y) - Math.PI));
}

def code(x, y, z):
return ((math.acos(x) + math.acos(y)) + math.acos(z)) - math.pi

def code(x, y, z):
return math.acos(x) + (math.acos(z) + (math.acos(y) - math.pi))

function code(x, y, z)
return Float64(Float64(Float64(acos(x) + acos(y)) + acos(z)) - pi)
end

function code(x, y, z)
return Float64(acos(x) + Float64(acos(z) + Float64(acos(y) - pi)))
end

function tmp = code(x, y, z)
tmp = ((acos(x) + acos(y)) + acos(z)) - pi;
end

function tmp = code(x, y, z)
tmp = acos(x) + (acos(z) + (acos(y) - pi));
end

code[x_, y_, z_] := N[(N[(N[(N[ArcCos[x], $MachinePrecision] + N[ArcCos[y],$MachinePrecision]), $MachinePrecision] + N[ArcCos[z],$MachinePrecision]), $MachinePrecision] - Pi),$MachinePrecision]

code[x_, y_, z_] := N[(N[ArcCos[x], $MachinePrecision] + N[(N[ArcCos[z],$MachinePrecision] + N[(N[ArcCos[y], $MachinePrecision] - Pi),$MachinePrecision]), $MachinePrecision]),$MachinePrecision]

\left(\left(\cos^{-1} x + \cos^{-1} y\right) + \cos^{-1} z\right) - \pi

\cos^{-1} x + \left(\cos^{-1} z + \left(\cos^{-1} y - \pi\right)\right)


# Try it out?

Results

 In Out
Enter valid numbers for all inputs

# Derivation?

1. Initial program 0.1

$\left(\left(\cos^{-1} x + \cos^{-1} y\right) + \cos^{-1} z\right) - \pi$
2. Simplified0.0

$\leadsto \color{blue}{\cos^{-1} x + \left(\cos^{-1} z + \left(\cos^{-1} y - \pi\right)\right)}$
Proof
[Start]0.1 $\left(\left(\cos^{-1} x + \cos^{-1} y\right) + \cos^{-1} z\right) - \pi$ $\color{blue}{\left(\cos^{-1} x + \left(\cos^{-1} y + \cos^{-1} z\right)\right)} - \pi$ $\color{blue}{\cos^{-1} x + \left(\left(\cos^{-1} y + \cos^{-1} z\right) - \pi\right)}$ $\cos^{-1} x + \left(\color{blue}{\left(\cos^{-1} z + \cos^{-1} y\right)} - \pi\right)$ $\cos^{-1} x + \color{blue}{\left(\cos^{-1} z + \left(\cos^{-1} y - \pi\right)\right)}$
3. Final simplification0.0

$\leadsto \cos^{-1} x + \left(\cos^{-1} z + \left(\cos^{-1} y - \pi\right)\right)$

# Reproduce?

herbie shell --seed 1
(FPCore (x y z)
:name "acos(x)+acos(y)+acos(z)-PI"
:precision binary64
:pre (and (and (and (<= -1.0 x) (<= x 1.0)) (and (<= -1.0 y) (<= y 1.0))) (and (<= -1.0 z) (<= z 1.0)))
(- (+ (+ (acos x) (acos y)) (acos z)) PI))