delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/06/21/12:27:40

From: <ams AT ludd DOT luth DOT se>
Message-Id: <200306211627.h5LGRMBj028665@speedy.ludd.luth.se>
Subject: Re: fpclassify
In-Reply-To: <1659-Sat21Jun2003191143+0300-eliz@elta.co.il> "from Eli Zaretskii
at Jun 21, 2003 07:11:44 pm"
To: djgpp-workers AT delorie DOT com
Date: Sat, 21 Jun 2003 18:27:22 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-MailScanner: Found to be clean
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019