/* s_atanl.c
*
- * Inverse circular tangent for 128-bit __float128 precision
+ * Inverse circular tangent for 128-bit long double precision
* (arctangent)
*
*
*
* SYNOPSIS:
*
- * __float128 x, y, atanl();
+ * long double x, y, atanq();
*
- * y = atanl( x );
+ * y = atanq( x );
*
*
*
*
*/
-/* Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
+/* Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
+ License along with this library; if not, see
+ <http://www.gnu.org/licenses/>. */
#include "quadmath-imp.h"
q4 = 2.173623741810414221251136181221172551416E1Q;
/* q5 = 1.000000000000000000000000000000000000000E0 */
-static const long double huge = 1.0e4930Q;
+static const __float128 huge = 1.0e4930Q;
__float128
atanq (__float128 x)
if (k <= 0x3fc50000) /* |x| < 2**-58 */
{
+ math_check_force_underflow (x);
/* Raise inexact. */
if (huge + x > 0.0)
return x;
/* Index of nearest table element.
Roundoff to integer is asymmetrical to avoid cancellation when t < 0
(cf. fdlibm). */
- k = 8.0Q * x + 0.25Q;
+ k = 8.0 * x + 0.25;
u = 0.125Q * k;
/* Small arctan argument. */
t = (x - u) / (1.0 + x * u);