CAS not always working with trigonometric formulas ?



Hello all
I have a simple question : "cos(%pi/4)" gives me "SQRT(2)/2" but
tan(%pi/8) gives me "TAN(%PI/8)" instead of "SQRT(2)-1", why ?
Best regards
Thomas