2001-08-21 13:23:53 +04:00
/*************************************************************************
*
* $ Id $
*
* Copyright ( C ) 2001 Bjorn Reese < breese @ users . sourceforge . net >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THIS SOFTWARE IS PROVIDED ` ` AS IS ' ' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES , INCLUDING , WITHOUT LIMITATION , THE IMPLIED WARRANTIES OF
2020-03-08 19:19:42 +03:00
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE . THE AUTHORS AND
2001-08-21 13:23:53 +04:00
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER .
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2002-01-19 18:40:18 +03:00
# ifndef TRIO_NAN_H
# define TRIO_NAN_H
# include "triodef.h"
2001-08-21 13:23:53 +04:00
# ifdef __cplusplus
extern " C " {
# endif
2002-03-27 19:12:22 +03:00
enum {
TRIO_FP_INFINITE ,
TRIO_FP_NAN ,
TRIO_FP_NORMAL ,
TRIO_FP_SUBNORMAL ,
TRIO_FP_ZERO
} ;
2001-08-21 13:23:53 +04:00
/*
* Return NaN ( Not - a - Number ) .
*/
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC double trio_nan TRIO_PROTO ( ( void ) ) ;
2001-08-21 13:23:53 +04:00
/*
* Return positive infinity .
*/
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC double trio_pinf TRIO_PROTO ( ( void ) ) ;
2001-08-21 13:23:53 +04:00
/*
* Return negative infinity .
*/
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC double trio_ninf TRIO_PROTO ( ( void ) ) ;
2012-09-11 09:26:36 +04:00
2002-09-26 02:44:43 +04:00
/*
* Return negative zero .
*/
TRIO_PUBLIC double trio_nzero TRIO_PROTO ( ( TRIO_NOARGS ) ) ;
2001-08-21 13:23:53 +04:00
/*
* If number is a NaN return non - zero , otherwise return zero .
*/
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC int trio_isnan TRIO_PROTO ( ( double number ) ) ;
2001-08-21 13:23:53 +04:00
/*
* If number is positive infinity return 1 , if number is negative
* infinity return - 1 , otherwise return 0.
*/
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC int trio_isinf TRIO_PROTO ( ( double number ) ) ;
2001-08-21 13:23:53 +04:00
2002-03-27 19:12:22 +03:00
/*
* If number is finite return non - zero , otherwise return zero .
*/
2003-08-06 08:43:55 +04:00
#if 0
/* Temporary fix - these 2 routines not used in libxml */
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC int trio_isfinite TRIO_PROTO ( ( double number ) ) ;
2002-03-27 19:12:22 +03:00
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC int trio_fpclassify TRIO_PROTO ( ( double number ) ) ;
2003-08-06 08:43:55 +04:00
# endif
TRIO_PUBLIC int trio_signbit TRIO_PROTO ( ( double number ) ) ;
2002-03-27 19:12:22 +03:00
2002-09-26 02:44:43 +04:00
TRIO_PUBLIC int trio_fpclassify_and_signbit TRIO_PROTO ( ( double number , int * is_negative ) ) ;
2002-03-27 19:12:22 +03:00
2001-08-21 13:23:53 +04:00
# ifdef __cplusplus
}
# endif
2002-01-19 18:40:18 +03:00
# endif /* TRIO_NAN_H */