1 // Cosine function of numerical and symbolic arguments
19 if (car(p1
) == symbol(ADD
))
20 cosine_of_angle_sum();
26 // Use angle sum formula for special angles.
32 cosine_of_angle_sum(void)
66 if (car(p1
) == symbol(ARCCOS
)) {
79 // cosine function is symmetric, cos(-x) = cos(x)
87 // cos(arctan(x)) = 1 / sqrt(1 + x^2)
89 // see p. 173 of the CRC Handbook of Mathematical Sciences
91 if (car(p1
) == symbol(ARCTAN
)) {
102 // multiply by 180/pi
130 push_rational(-1, 2);
142 push_rational(-1, 2);
158 push_rational(-1, 2);