If the line segment joining the points A(a,b) and B(c,d) subtends an angle θ at the origin, then cosθ is equal to
(a2-b2)(c2-d2)-4abcd