Print sin, cos, and tan of special angles
Pyth, 125 122 bytes

Uses the formula n = 4 - |floor(4.5-9k)|, where kπ = θ i.e. k is the quotient of the second and third inputs, to determine which special angle is in question: the angles 0, 30, 45, 60 and 90 degrees are numbered 0 to 4 respectively, and the 90~180 degrees angles go in reverse; this formula works for θ∈[0,π]. The values of corresponding sines would be sqrt(n)/2 and existent, non-zero tangents would be 3^(n/2-1). However, my implementation uses lists with hard-coded compressed strings for higher control of output format, and it seems the code is shorter that way too.

A,c." t8¾Îzp³9ÓÍÕ¬$ ·Íb³°ü"dc." t@a'óè©ê¶oyÑáîwÀ(";J+cEE?qz\c.5ZK-4.as-4.5*3*3%J1?qz\t+?&gt;%J1 .5\-k@GK+?&gt;%J2 1\-k@HK


Let's turn it into pythonic pseudocode:

                                   z = input()
                                   k = ""
                                   d = " "
                                   Z = 0
A,c." t8¾Îzp³9ÓÍÕ¬$ ·Íb³°ü"d       G = "0 sqrt(3)/3 1 sqrt(3) nan".split(d)
  c." t@a'óè©ê¶oyÑáîwÀ(";          H = "0 1/2 sqrt(2)/2 sqrt(3)/2 1".split()
J+cEE                              J = eval(input())/eval(input()) +
  ?qz\c.5Z                             0.5 if z == "c" else Z
                                   # the second term converts sin to cos
K-4.as-4.5*3*3%J1                  K = 4 - abs(int(4.5 - 3*3*(J%1)))
                                   # 9* would lose precision so 3*3* instead
?qz\t                              if z == "t"
  +?&gt;%J1 .5\-k                         print(("-" if J%1 &gt; 0.5 else k) +
   @GK                                     G[K])
                                   else:
  +?&gt;%J2 1\-k                          print(("-" if J%2 &gt; 1 else k) +
   @HK                                     H[K])


Test online.