diff options
author | Joseph Myers <joseph@codesourcery.com> | 2016-09-21 20:52:02 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2016-09-21 20:52:02 +0000 |
commit | d942e95cd7e493efbbff58b78e63013c79e634cd (patch) | |
tree | bf7eb7726729c2bc297f7e9540d3d100605df529 /manual/arith.texi | |
parent | 5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a (diff) | |
download | glibc-d942e95cd7e493efbbff58b78e63013c79e634cd.tar.gz glibc-d942e95cd7e493efbbff58b78e63013c79e634cd.tar.xz glibc-d942e95cd7e493efbbff58b78e63013c79e634cd.zip |
Add issubnormal.
TS 18661-1 adds an issubnormal classification macro to <math.h>. This patch implements it for glibc. There are no new underlying functions in libm because the implementation uses fpclassify; any optimizations for this macro should be done through adding __builtin_subnormal in GCC and using it in the header for suitable GCC versions, not through adding other optimized inline or out-of-line versions to glibc. The intended structure of the NEWS entry for <math.h> features from TS 18661-1 is like: * New <math.h> features are added from TS 18661-1:2014: - Nearest integer functions: roundeven, roundevenf, roundevenl. - Comparison macros: iseqsig. - Classification macros: iscanonical, issubnormal, iszero. (that is, following the grouping of interfaces in TS 18661-1:2014, with any group where any interfaces are new in glibc 2.25 being listed like that). Tested for x86_64 and x86. * math/math.h [__GLIBC_USE (IEC_60559_BFP_EXT)] (issubnormal): New macro. * math/libm-test.inc (issubnormal_test_data): New array. (issubnormal_test): New function. * manual/arith.texi (Floating Point Classes): Document issubnormal. * manual/libm-err-tab.pl: Update comment on interfaces without ulps tabulated.
Diffstat (limited to 'manual/arith.texi')
-rw-r--r-- | manual/arith.texi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/manual/arith.texi b/manual/arith.texi index dc3c367d49..bfa236a50e 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -406,6 +406,14 @@ This macro returns a nonzero value if @var{x} is a signaling NaN (sNaN). It is from TS 18661-1:2014. @end deftypefn +@comment math.h +@comment ISO +@deftypefn {Macro} int issubnormal (@emph{float-type} @var{x}) +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +This macro returns a nonzero value if @var{x} is subnormal. It is +from TS 18661-1:2014. +@end deftypefn + Another set of floating-point classification functions was provided by BSD. @Theglibc{} also supports these functions; however, we recommend that you use the ISO C99 macros in new code. Those are standard |