Mail Archives: djgpp-workers/2003/06/21/12:27:40
Hello.
fpclass.txh:
@ignore
* File fpclass.txh.
*
* Copyright (C) 2003 Martin Str@"omberg <ams AT ludd DOT luth DOT se>.
*
* This software may be used freely so long as this copyright notice is
* left intact. There is no warranty on this software.
*
@end ignore
@node fpclassify, math
@findex fpclassify
@subheading Syntax
@example
#include <math.h>
@end example
@subheading Description
The macro @code{fpclassify} returns the kind of the floating point
value supplied.
@subheading Return Value
FP_INFINITE, FP_NAN, FP_NORMAL, FP_SUBNORMAL, FP_ZERO or FP_UNNORMAL.
@subheading Portability
@portability !ansi-c89, ansi-c99
@subheading Example
@example
float f = 1;
double d = INFINITY;
long double ld = NAN;
if( fpclassify(f) != FP_NORMAL )
@{
printf("Something is wrong with the implementation!\n");
@}
if( fpclassify(d) != FP_INFINITE )
@{
printf("Something is wrong with the implementation!\n");
@}
if( fpclassify(ld) != FP_NAN )
@{
printf("Something is wrong with the implementation!\n");
@}
@end example
wc204.txi entry:
@findex fpclassify AT r{ added}
@findex __fpclassifyf AT r{ added}
@findex __fpclassifyd AT r{ added}
@findex __fpclassifyld AT r{ added}
The C99 macro @code{fpclassify} and the supporting functions
@code{__fpclassifyf}, @code{__fpclassifyd} and @code{__fpclassifyld} was
added.
Right,
MartinS
- Raw text -