  A new robust algorithm for the numerical computation of biarcs, i.e. $G^1$
curves composed of two arcs of circle, is presented. Many algorithms exist but
are based on geometric constructions, which must consider many geometrical
configurations. The proposed algorithm uses an algebraic construction which is
reduced to the solution of a single $2$ by $2$ linear system. Singular angles
configurations are treated smoothly by using the pseudoinverse matrix when
solving the linear system. The proposed algorithm is compared with the Matlab's
routine \texttt{rscvn} that solves geometrically the same problem. Numerical
experiments show that Matlab's routine sometimes fails near singular
configurations and does not select the correct solution for large angles,
whereas the proposed algorithm always returns the correct solution. The
proposed solution smoothly depends on the geometrical parameters so that it can
be easily included in more complex algorithms like splines of biarcs or least
squares data fitting.
