Use algorithm from the Cephes library tanf for Tan.