The safest algorithm is Taylor expansion: for tanx and sinx Taylor expansion in x- > at 0, yes.
tanx = x + ( 1/3)x^3 +o(x^5)
sinx = x - ( 1/6)x^3 + o(x^5)
It is enough to expand to X 3 here, because the denominator is only X 3. After the expansion is too high, those tail terms become high-order infinitesimals.
So tanx-sinx = (1/2) x 3+o (x 5)
So (tanx-sinx) = (1/2)+[o (x 5)]/x 3, and the result of taking the limit is1/2.
Through Taylor expansion, it is found that tanx and sinx are in x->; 0 is indeed an infinitesimal, but in order x 3, the approximation speeds of the two are different, so the two infinitesimals are not completely equivalent. But when we only consider the case of order X, it is generally called "equivalent infinitesimal".