trionan.h

Go to the documentation of this file.
00001 /*************************************************************************
00002  *
00003  * $Id: trionan.h,v 1.1 2007/06/07 20:07:25 anttimaa Exp $
00004  *
00005  * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
00006  *
00007  * Permission to use, copy, modify, and distribute this software for any
00008  * purpose with or without fee is hereby granted, provided that the above
00009  * copyright notice and this permission notice appear in all copies.
00010  *
00011  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
00012  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00013  * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
00014  * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
00015  *
00016  ************************************************************************/
00017 
00018 #ifndef TRIO_NAN_H
00019 #define TRIO_NAN_H
00020 
00021 #include "triodef.h"
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 enum {
00028   TRIO_FP_INFINITE,
00029   TRIO_FP_NAN,
00030   TRIO_FP_NORMAL,
00031   TRIO_FP_SUBNORMAL,
00032   TRIO_FP_ZERO
00033 };
00034 
00035 /*
00036  * Return NaN (Not-a-Number).
00037  */
00038 TRIO_PUBLIC double trio_nan TRIO_PROTO((void));
00039 
00040 /*
00041  * Return positive infinity.
00042  */
00043 TRIO_PUBLIC double trio_pinf TRIO_PROTO((void));
00044 
00045 /*
00046  * Return negative infinity.
00047  */
00048 TRIO_PUBLIC double trio_ninf TRIO_PROTO((void));
00049   
00050 /*
00051  * Return negative zero.
00052  */
00053 TRIO_PUBLIC double trio_nzero TRIO_PROTO((TRIO_NOARGS));
00054 
00055 /*
00056  * If number is a NaN return non-zero, otherwise return zero.
00057  */
00058 TRIO_PUBLIC int trio_isnan TRIO_PROTO((double number));
00059 
00060 /*
00061  * If number is positive infinity return 1, if number is negative
00062  * infinity return -1, otherwise return 0.
00063  */
00064 TRIO_PUBLIC int trio_isinf TRIO_PROTO((double number));
00065 
00066 /*
00067  * If number is finite return non-zero, otherwise return zero.
00068  */
00069 #if 0
00070     /* Temporary fix - these 2 routines not used in libxml */
00071 TRIO_PUBLIC int trio_isfinite TRIO_PROTO((double number));
00072 
00073 TRIO_PUBLIC int trio_fpclassify TRIO_PROTO((double number));
00074 #endif
00075 
00076 TRIO_PUBLIC int trio_signbit TRIO_PROTO((double number));
00077 
00078 TRIO_PUBLIC int trio_fpclassify_and_signbit TRIO_PROTO((double number, int *is_negative));
00079 
00080 #ifdef __cplusplus
00081 }
00082 #endif
00083 
00084 #endif /* TRIO_NAN_H */
footer
 SourceForge.net Logo