diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2004-11-10 19:04:29 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2004-11-10 19:04:29 +0000 |
commit | 13c27199231cbc2cc83969ada741b95be1cca4d3 (patch) | |
tree | 58c32705247dcf031d6f17d8bc8ef78557d74113 /trio/trionan.h | |
parent | 486bdc6d20c7e7d8c6eeb3124cf845abefcd7d11 (diff) | |
download | fetchmail-13c27199231cbc2cc83969ada741b95be1cca4d3.tar.gz fetchmail-13c27199231cbc2cc83969ada741b95be1cca4d3.tar.bz2 fetchmail-13c27199231cbc2cc83969ada741b95be1cca4d3.zip |
Import Trio 1.10 into fetchmail's trunk.
svn path=/trunk/; revision=3995
Diffstat (limited to 'trio/trionan.h')
-rw-r--r-- | trio/trionan.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/trio/trionan.h b/trio/trionan.h new file mode 100644 index 00000000..3fbed375 --- /dev/null +++ b/trio/trionan.h @@ -0,0 +1,81 @@ +/************************************************************************* + * + * $Id: trionan.h,v 1.7 2002/05/04 14:26:44 breese Exp $ + * + * 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 + * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND + * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. + * + ************************************************************************/ + +#ifndef TRIO_NAN_H +#define TRIO_NAN_H + +#include "triodef.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + TRIO_FP_INFINITE, + TRIO_FP_NAN, + TRIO_FP_NORMAL, + TRIO_FP_SUBNORMAL, + TRIO_FP_ZERO +}; + +/* + * Return NaN (Not-a-Number). + */ +TRIO_PUBLIC double trio_nan TRIO_PROTO((void)); + +/* + * Return positive infinity. + */ +TRIO_PUBLIC double trio_pinf TRIO_PROTO((void)); + +/* + * Return negative infinity. + */ +TRIO_PUBLIC double trio_ninf TRIO_PROTO((void)); + +/* + * Return negative zero. + */ +TRIO_PUBLIC double trio_nzero TRIO_PROTO((TRIO_NOARGS)); + +/* + * If number is a NaN return non-zero, otherwise return zero. + */ +TRIO_PUBLIC int trio_isnan TRIO_PROTO((double number)); + +/* + * If number is positive infinity return 1, if number is negative + * infinity return -1, otherwise return 0. + */ +TRIO_PUBLIC int trio_isinf TRIO_PROTO((double number)); + +/* + * If number is finite return non-zero, otherwise return zero. + */ +TRIO_PUBLIC int trio_isfinite TRIO_PROTO((double number)); + +TRIO_PUBLIC int trio_signbit TRIO_PROTO((double number)); + +TRIO_PUBLIC int trio_fpclassify TRIO_PROTO((double number)); + +TRIO_PUBLIC int trio_fpclassify_and_signbit TRIO_PROTO((double number, int *is_negative)); + +#ifdef __cplusplus +} +#endif + +#endif /* TRIO_NAN_H */ |