diff options
Diffstat (limited to 'manual/arith.texi')
-rw-r--r-- | manual/arith.texi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/manual/arith.texi b/manual/arith.texi index 6ecde21b7c..5fb18f3561 100644 --- a/manual/arith.texi +++ b/manual/arith.texi @@ -1873,7 +1873,8 @@ undesirable. @w{ISO C99} therefore defines comparison functions that do not raise exceptions when NaN is examined. All of the functions are implemented as macros which allow their arguments to be of any floating-point type. The macros are guaranteed to evaluate their -arguments only once. +arguments only once. TS 18661-1:2014 adds such a macro for an +equality comparison that @emph{does} raise an exception for a NaN argument. @comment math.h @comment ISO @@ -1932,6 +1933,16 @@ This macro determines whether its arguments are unordered. In other words, it is true if @var{x} or @var{y} are NaN, and false otherwise. @end deftypefn +@comment math.h +@comment ISO +@deftypefn Macro int iseqsig (@emph{real-floating} @var{x}, @emph{real-floating} @var{y}) +@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} +This macro determines whether its arguments are equal. It is +equivalent to @code{(@var{x}) == (@var{y})}, but it raises the invalid +exception and sets @code{errno} to @code{EDOM} is either argument is a +NaN. +@end deftypefn + Not all machines provide hardware support for these operations. On machines that don't, the macros can be very slow. Therefore, you should not use these functions when NaN is not a concern. |