Setting a function to an expression that resulted from a SOLVE function



In the code below, I create the triangle equation and label it TRI. I
then solve TRI for THETA in order to rearrange the equation in terms
of THETA.  I then create a function THETA(A,B,C) and try to set it
equal to the solution of the above.  When I try make substitutions for
the arguments of THETA, however, the function does not evaluate
numerically.  Why?  Also, THETA(x,y,z) results in D4.  Why?
 
(C1) TRI: C^2 = A^2+B^2-2*A*B*COS(THETA);
   2     2    2
(D1)          C  = - 2 A B COS(THETA) + B  + A
(C2) THETA(A,B,C):= RHS(FIRST(SOLVE(TRI,THETA)));
(D2)          THETA(A, B, C) := RHS(FIRST(SOLVE(TRI, THETA)))
(C3) THETA(A,B,C);
SOLVE is using arc-trig functions to get a solution.
Some solutions will be lost.
                                 2
                               C      B    A
(D3)     %PI - ACOS(----- - --- - ---)
                             2 A B 2 A   2 B
(C4) THETA(1,2,3);
SOLVE is using arc-trig functions to get a solution.
Some solutions will be lost.
                                  2
                               C      B    A
(D4)     %PI - ACOS(----- - --- - ---)
                             2 A B   2 A   2 B
(C5) EV(THETA(1,2,3),NUMER);
SOLVE is using arc-trig functions to get a solution.
Some solutions will be lost.
RAT replaced -0.5 by -1//2 = -0.5
RAT replaced -3.14159265358979 by -103993//33102 = -3.1415926530119
          2
                                                               0.5 C  0.5 B  0.5 A
(D5) - 3.020965500573983E-5 (33102 ACOS(------ - ----- - -----) - 103993)
                                                                  A B    A    B