]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/bessel_r16.c
mtype.m4 (upcase, [...]): New macros.
[thirdparty/gcc.git] / libgfortran / generated / bessel_r16.c
index a3ef181012e1c89a9027aa19957a1f35cffd343d..d5ca883e8990172e899cf58d46f18a4eab4a938d 100644 (file)
@@ -29,11 +29,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #include <assert.h>
 
 
+
+#if defined(GFC_REAL_16_IS_FLOAT128)
+#define MATHFUNC(funcname) funcname ## q
+#else
+#define MATHFUNC(funcname) funcname ## l
+#endif
+
 #if defined (HAVE_GFC_REAL_16)
 
 
 
-#if defined (HAVE_JNL)
+#if (defined(GFC_WITH_QUAD_LIB) || defined(HAVE_JNL))
 extern void bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1,
                                     int n2, GFC_REAL_16 x);
 export_proto(bessel_jn_r16);
@@ -67,28 +74,28 @@ bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, GFC_REAL_16 x
 
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
-  if (unlikely (x == 0.0L))
+  if (unlikely (x == 0))
     {
-      ret->data[0] = 1.0L;
+      ret->data[0] = 1;
       for (i = 1; i <= n2-n1; i++)
-        ret->data[i*stride] = 0.0L;
+        ret->data[i*stride] = 0;
       return;
     }
 
   ret->data = ret->data;
-  last1 = jnl (n2, x);
+  last1 = MATHFUNC(jn) (n2, x);
   ret->data[(n2-n1)*stride] = last1;
 
   if (n1 == n2)
     return;
 
-  last2 = jnl (n2 - 1, x);
+  last2 = MATHFUNC(jn) (n2 - 1, x);
   ret->data[(n2-n1-1)*stride] = last2;
 
   if (n1 + 1 == n2)
     return;
 
-  x2rev = 2.0L/x;
+  x2rev = GFC_REAL_16_LITERAL(2.)/x;
 
   for (i = n2-n1-2; i >= 0; i--)
     {
@@ -100,7 +107,7 @@ bessel_jn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2, GFC_REAL_16 x
 
 #endif
 
-#if defined (HAVE_YNL)
+#if (defined(GFC_WITH_QUAD_LIB) || defined(HAVE_YNL))
 extern void bessel_yn_r16 (gfc_array_r16 * const restrict ret,
                                     int n1, int n2, GFC_REAL_16 x);
 export_proto(bessel_yn_r16);
@@ -135,7 +142,7 @@ bessel_yn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2,
 
   stride = GFC_DESCRIPTOR_STRIDE(ret,0);
 
-  if (unlikely (x == 0.0L))
+  if (unlikely (x == 0))
     {
       for (i = 0; i <= n2-n1; i++)
 #if defined(GFC_REAL_16_INFINITY)
@@ -147,19 +154,19 @@ bessel_yn_r16 (gfc_array_r16 * const restrict ret, int n1, int n2,
     }
 
   ret->data = ret->data;
-  last1 = ynl (n1, x);
+  last1 = MATHFUNC(yn) (n1, x);
   ret->data[0] = last1;
 
   if (n1 == n2)
     return;
 
-  last2 = ynl (n1 + 1, x);
+  last2 = MATHFUNC(yn) (n1 + 1, x);
   ret->data[1*stride] = last2;
 
   if (n1 + 1 == n2)
     return;
 
-  x2rev = 2.0L/x;
+  x2rev = GFC_REAL_16_LITERAL(2.)/x;
 
   for (i = 2; i <= n1+n2; i++)
     {