doc: use ASCII in .texi files where UTF-8 isn't needed
[gnulib.git] / lib / tanl.c
index 51262f0..ae70884 100644 (file)
 /* Specification.  */
 #include <math.h>
 
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+long double
+tanl (long double x)
+{
+  return tan (x);
+}
+
+#else
+
+/* Code based on glibc/sysdeps/ieee754/ldbl-128/s_tanl.c
+   and           glibc/sysdeps/ieee754/ldbl-128/k_tanl.c.  */
+
 /* tanl(x)
  * Return tangent function of x.
  *
  *      TRIG(x) returns trig(x) nearly rounded
  */
 
-#include "trigl.h"
-#ifdef HAVE_SINL
-#ifdef HAVE_COSL
-#include "trigl.c"
-#endif
-#endif
+# include "trigl.h"
 
 /*
  * ====================================================
@@ -120,7 +128,7 @@ static const long double
   /* 1.000000000000000000000000000000000000000E0 */
 
 
-long double
+static long double
 kernel_tanl (long double x, long double y, int iy)
 {
   long double z, r, v, w, s, u, u1;
@@ -213,16 +221,18 @@ tanl (long double x)
     }
 }
 
+#endif
+
 #if 0
 int
 main (void)
 {
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492));
-  printf ("%.16Lg\n", tanl(-0.7853981633974483096156608458198757210492));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 *3));
-  printf ("%.16Lg\n", tanl(-0.7853981633974483096156608458198757210492 *31));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 / 2));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 * 3/2));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 * 5/2));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492));
+  printf ("%.16Lg\n", tanl (-0.7853981633974483096156608458198757210492));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 *3));
+  printf ("%.16Lg\n", tanl (-0.7853981633974483096156608458198757210492 *31));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 / 2));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 * 3/2));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 * 5/2));
 }
 #endif