Then tan(A+B)=tan(pi-C)=-tanC.
get tana+tan b+ tanc =-tanc( 1-tana tanb)+tanc = tanatanbanc。
Therefore, this formula has application premise, that is, A+B+C =π or three angles of a triangle.