public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 6/8] float128: Expose _Float128 finite math functions.
Date: Wed, 09 Nov 2016 18:41:00 -0000	[thread overview]
Message-ID: <1478716859-3246-7-git-send-email-gftg@linux.vnet.ibm.com> (raw)
In-Reply-To: <1478716859-3246-1-git-send-email-gftg@linux.vnet.ibm.com>

From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>

Similar to the other types, entry points to
dodge wrapper call for non-finite arguments.

	* math/bits/math-finite.h:
	(__acosf128_finite): New function declaration.
	(__acoshf128_finite): Likewise.
	(__asinf128_finite): Likewise.
	(__atan2f128_finite): Likewise.
	(__atanhf128_finite): Likewise.
	(__coshf128_finite): Likewise.
	(__expf128_finite): Likewise.
	(__exp10f128_finite): Likewise.
	(__exp2f128_finite): Likewise.
	(__fmodf128_finite): Likewise.
	(__hypotf128_finite): Likewise.
	(__j0f128_finite): Likewise.
	(__y0f128_finite): Likewise.
	(__j1f128_finite): Likewise.
	(__y1f128_finite): Likewise.
	(__jnf128_finite): Likewise.
	(__ynf128_finite): Likewise.
	(__logf128_finite): Likewise.
	(__log10f128_finite): Likewise.
	(__log2f128_finite): Likewise.
	(__powf128_finite): Likewise.
	(__remainderf128_finite): Likewise.
	(__sinhf128_finite): Likewise.
	(__sqrtf128_finite): Likewise.
	(__gammaf128_r_finite): Likewise.
	(__lgammaf128_r_finite): Likewise.
	(lgammaf128): Inline override of the
	same name.
	(tgammaf128): Likewise.
---
 math/bits/math-finite.h | 104 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)

diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h
index adaad0e..0c6e2ff 100644
--- a/math/bits/math-finite.h
+++ b/math/bits/math-finite.h
@@ -32,6 +32,9 @@ extern long double __REDIRECT_NTH (acosl, (long double), __acosl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (acosf128, (_Float128), __acosf128_finite);
+#endif
 
 #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
 /* acosh.  */
@@ -47,6 +50,9 @@ extern long double __REDIRECT_NTH (acoshl, (long double), __acoshl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (acoshf128, (_Float128), __acoshf128_finite);
+#endif
 
 /* asin.  */
 extern double __REDIRECT_NTH (asin, (double), __asin_finite);
@@ -60,6 +66,9 @@ extern long double __REDIRECT_NTH (asinl, (long double), __asinl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (asinf128, (_Float128), __asinf128_finite);
+#endif
 
 /* atan2.  */
 extern double __REDIRECT_NTH (atan2, (double, double), __atan2_finite);
@@ -75,6 +84,10 @@ extern long double __REDIRECT_NTH (atan2l, (long double, long double),
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (atan2f128, (_Float128, _Float128),
+				 __atan2f128_finite);
+#endif
 
 #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
 /* atanh.  */
@@ -90,6 +103,9 @@ extern long double __REDIRECT_NTH (atanhl, (long double), __atanhl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (atanhf128, (_Float128), __atanhf128_finite);
+#endif
 
 /* cosh.  */
 extern double __REDIRECT_NTH (cosh, (double), __cosh_finite);
@@ -103,6 +119,9 @@ extern long double __REDIRECT_NTH (coshl, (long double), __coshl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (coshf128, (_Float128), __coshf128_finite);
+#endif
 
 /* exp.  */
 extern double __REDIRECT_NTH (exp, (double), __exp_finite);
@@ -116,6 +135,9 @@ extern long double __REDIRECT_NTH (expl, (long double), __expl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (expf128, (_Float128), __expf128_finite);
+#endif
 
 #ifdef __USE_GNU
 /* exp10.  */
@@ -128,6 +150,9 @@ extern long double __REDIRECT_NTH (exp10l, (long double), __exp10_finite);
 extern long double __REDIRECT_NTH (exp10l, (long double), __exp10l_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (exp10f128, (_Float128), __exp10f128_finite);
+# endif
 
 /* pow10.  */
 extern double __REDIRECT_NTH (pow10, (double), __exp10_finite);
@@ -153,6 +178,9 @@ extern long double __REDIRECT_NTH (exp2l, (long double), __exp2l_finite);
 #  endif
 # endif
 #endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (exp2f128, (_Float128), __exp2f128_finite);
+# endif
 
 /* fmod.  */
 extern double __REDIRECT_NTH (fmod, (double, double), __fmod_finite);
@@ -168,6 +196,10 @@ extern long double __REDIRECT_NTH (fmodl, (long double, long double),
 #  endif
 # endif
 #endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (fmodf128, (_Float128, _Float128),
+				 __fmodf128_finite);
+# endif
 
 #if defined __USE_XOPEN || defined __USE_ISOC99
 /* hypot.  */
@@ -185,6 +217,10 @@ extern long double __REDIRECT_NTH (hypotl, (long double, long double),
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (hypotf128, (_Float128, _Float128),
+				   __hypotf128_finite);
+#endif
 
 #if defined __USE_MISC || defined __USE_XOPEN
 /* j0.  */
@@ -199,6 +235,9 @@ extern long double __REDIRECT_NTH (j0l, (long double), __j0_finite);
 extern long double __REDIRECT_NTH (j0l, (long double), __j0l_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (j0f128, (_Float128), __j0f128_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN
@@ -214,6 +253,9 @@ extern long double __REDIRECT_NTH (y0l, (long double), __y0_finite);
 extern long double __REDIRECT_NTH (y0l, (long double), __y0l_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (y0f128, (_Float128), __y0f128_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN
@@ -229,6 +271,9 @@ extern long double __REDIRECT_NTH (j1l, (long double), __j1_finite);
 extern long double __REDIRECT_NTH (j1l, (long double), __j1l_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (j1f128, (_Float128), __j1f128_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN
@@ -244,6 +289,9 @@ extern long double __REDIRECT_NTH (y1l, (long double), __y1_finite);
 extern long double __REDIRECT_NTH (y1l, (long double), __y1l_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (y1f128, (_Float128), __y1f128_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN
@@ -259,6 +307,9 @@ extern long double __REDIRECT_NTH (jnl, (int, long double), __jn_finite);
 extern long double __REDIRECT_NTH (jnl, (int, long double), __jnl_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (jnf128, (int, _Float128), __jnf128_finite);
+# endif
 #endif
 
 #if defined __USE_MISC || defined __USE_XOPEN
@@ -274,6 +325,9 @@ extern long double __REDIRECT_NTH (ynl, (int, long double), __yn_finite);
 extern long double __REDIRECT_NTH (ynl, (int, long double), __ynl_finite);
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (ynf128, (int, _Float128), __ynf128_finite);
+# endif
 #endif
 
 #ifdef __USE_MISC
@@ -291,6 +345,10 @@ extern long double __REDIRECT_NTH (lgammal_r, (long double, int *),
 #   endif
 #  endif
 # endif
+# if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (lgammaf128_r, (_Float128, int *),
+				   __lgammaf128_r_finite);
+# endif
 #endif
 
 extern double __lgamma_r_finite (double, int *);
@@ -301,6 +359,9 @@ extern long double __REDIRECT_NTH (__lgammal_r_finite, (long double, int *),
 #else
 extern long double __lgammal_r_finite (long double, int *);
 #endif
+#if __USE_FLOAT128
+extern _Float128 __lgammaf128_r_finite (_Float128, int *);
+#endif
 
 #if ((defined __USE_XOPEN || defined __USE_ISOC99) \
      && defined __extern_always_inline)
@@ -336,6 +397,17 @@ __extern_always_inline long double __NTH (lgammal (long double __d))
 # endif
 }
 # endif
+# if __USE_FLOAT128
+__extern_always_inline _Float128 __NTH (lgammaf128 (_Float128 __d))
+{
+# if defined __USE_MISC || defined __USE_XOPEN
+  return __lgammaf128_r_finite (__d, &signgam);
+# else
+  int __local_signgam = 0;
+  return __lgammaf128_r_finite (__d, &__local_signgam);
+# endif
+}
+# endif
 #endif
 
 #if ((defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)) \
@@ -371,6 +443,9 @@ extern long double __REDIRECT_NTH (logl, (long double), __logl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (logf128, (_Float128), __logf128_finite);
+#endif
 
 /* log10.  */
 extern double __REDIRECT_NTH (log10, (double), __log10_finite);
@@ -384,6 +459,9 @@ extern long double __REDIRECT_NTH (log10l, (long double), __log10l_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (log10f128, (_Float128), __log10f128_finite);
+#endif
 
 #ifdef __USE_ISOC99
 /* log2.  */
@@ -397,6 +475,9 @@ extern long double __REDIRECT_NTH (log2l, (long double), __log2l_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (log2f128, (_Float128), __log2f128_finite);
+#endif
 
 /* pow.  */
 extern double __REDIRECT_NTH (pow, (double, double), __pow_finite);
@@ -412,6 +493,10 @@ extern long double __REDIRECT_NTH (powl, (long double, long double),
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (powf128, (_Float128, _Float128),
+				   __powf128_finite);
+#endif
 
 #if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
 /* remainder.  */
@@ -429,6 +514,10 @@ extern long double __REDIRECT_NTH (remainderl, (long double, long double),
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (remainderf128, (_Float128, _Float128),
+				   __remainderf128_finite);
+#endif
 
 #if (defined __USE_MISC							\
      || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8))
@@ -460,6 +549,9 @@ extern long double __REDIRECT_NTH (sinhl, (long double), __sinhl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (sinhf128, (_Float128), __sinhf128_finite);
+#endif
 
 /* sqrt.  */
 extern double __REDIRECT_NTH (sqrt, (double), __sqrt_finite);
@@ -473,6 +565,9 @@ extern long double __REDIRECT_NTH (sqrtl, (long double), __sqrtl_finite);
 #  endif
 # endif
 #endif
+#if __USE_FLOAT128
+extern _Float128 __REDIRECT_NTH (sqrtf128, (_Float128), __sqrtf128_finite);
+#endif
 
 #if defined __USE_ISOC99 && defined __extern_always_inline
 /* tgamma.  */
@@ -503,4 +598,13 @@ __extern_always_inline long double __NTH (tgammal (long double __d))
   return __local_signgam < 0 ? -__res : __res;
 }
 # endif
+# if __USE_FLOAT128
+extern _Float128 __gammaf128_r_finite (_Float128, int *);
+__extern_always_inline _Float128 __NTH (tgammaf128 (_Float128 __d))
+{
+  int __local_signgam = 0;
+  _Float128 __res = __gammaf128_r_finite (__d, &__local_signgam);
+  return __local_signgam < 0 ? -__res : __res;
+}
+# endif
 #endif
-- 
2.4.11

  parent reply	other threads:[~2016-11-09 18:41 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 18:41 [PATCH 0/8] More float128 declarations Gabriel F. T. Gomes
2016-11-09 18:41 ` [PATCH 5/8] float128: Add public _Float128 declarations to libm Gabriel F. T. Gomes
2016-11-09 22:04   ` Joseph Myers
2016-11-09 18:41 ` [PATCH 7/8] float128: Add private _Float128 declarations for libm Gabriel F. T. Gomes
2016-11-09 22:08   ` Joseph Myers
2016-11-10 22:13   ` Joseph Myers
2016-11-09 18:41 ` [PATCH 2/8] float128: Add _Float128 make bits to libm Gabriel F. T. Gomes
2016-12-09 21:23   ` Tulio Magno Quites Machado Filho
2016-12-12 22:49     ` Joseph Myers
2016-11-09 18:41 ` [PATCH 8/8] float128: Add wrappers to override ldbl-128 as float128 Gabriel F. T. Gomes
2016-11-09 22:13   ` Joseph Myers
2016-11-09 18:41 ` [PATCH 1/8] ldbl-128: Use mathx_hidden_def inplace of hidden_def Gabriel F. T. Gomes
2016-11-09 18:41 ` [PATCH 4/8] Add support for testing __STDC_WANT_IEC_60559_TYPES_EXT__ Gabriel F. T. Gomes
2016-11-09 21:42   ` Joseph Myers
2016-11-09 18:41 ` Gabriel F. T. Gomes [this message]
2016-11-09 22:06   ` [PATCH 6/8] float128: Expose _Float128 finite math functions Joseph Myers
2017-03-03 20:17     ` Gabriel F. T. Gomes
2017-03-03 20:50       ` Joseph Myers
2016-11-09 18:41 ` [PATCH 3/8] float128: Add wrappers for IEEE functions Gabriel F. T. Gomes
2016-11-09 21:38   ` Joseph Myers
2016-12-05 16:48     ` Gabriel F. T. Gomes
2016-12-05 18:51       ` Joseph Myers
2016-12-05 22:52         ` Steven Munroe
2016-12-06  0:31           ` Joseph Myers
2016-12-06  2:39             ` Steven Munroe
2016-12-07 19:36         ` Gabriel F. T. Gomes
2016-12-07 21:47           ` Joseph Myers
2016-12-09 21:24             ` Gabriel F. T. Gomes
2016-12-14  0:47               ` Joseph Myers
2016-12-14 13:36                 ` Gabriel F. T. Gomes
2016-12-14 14:33                   ` Joseph Myers
2016-11-09 21:31 ` [PATCH 0/8] More float128 declarations Joseph Myers
2016-11-09 23:52   ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478716859-3246-7-git-send-email-gftg@linux.vnet.ibm.com \
    --to=gftg@linux.vnet.ibm.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).