2. In the right triangle $\triangle ABC$, $\angle ACB=90^{\circ}$, $CD$ bisects $\angle ACB$. If $BC=a$, $CA=b(a<b)$, $CD=t$, and $t=b-a$, then $\tan A=$ $\qquad$ (express in exact numerical form).
2. $\frac{\sqrt{6}-\sqrt{2}}{2}$.

As shown in Figure 4, draw $D E \perp A C, D F \perp$ $B C$, with the feet of the perpendiculars being $E$ and $F$ respectively. It is easy to see that quadrilateral $C E D F$ is a square. Therefore,
$$
C E=D E=\frac{t}{\sqrt{2}} .
$$

From $\frac{A E}{A C}=\frac{D E}{B C}$, we have $\frac{b-\frac{t}{\sqrt{2}}}{b}=\frac{\frac{t}{\sqrt{2}}}{a}$.
Solving for $t$ gives $t=\frac{\sqrt{2} a b}{a+b}$.
Thus, $b-a=\frac{\sqrt{2} a b}{a+b}$, which means
$$
\left(\frac{a}{b}\right)^{2}+\sqrt{2}\left(\frac{a}{b}\right)-1=0 \text {. }
$$

Solving for $\frac{a}{b}$ gives $\frac{a}{b}=\frac{\sqrt{6}-\sqrt{2}}{2}$ (the negative value is discarded). Therefore, $\tan A=\frac{a}{b}=\frac{\sqrt{6}-\sqrt{2}}{2}$.