Bjorn Reese | 4502960 | 2001-08-21 09:23:53 +0000 | [diff] [blame^] | 1 | /************************************************************************* |
| 2 | * |
| 3 | * $Id$ |
| 4 | * |
| 5 | * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net> |
| 6 | * |
| 7 | * Permission to use, copy, modify, and distribute this software for any |
| 8 | * purpose with or without fee is hereby granted, provided that the above |
| 9 | * copyright notice and this permission notice appear in all copies. |
| 10 | * |
| 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED |
| 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
| 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND |
| 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. |
| 15 | * |
| 16 | ************************************************************************/ |
| 17 | |
| 18 | #ifndef __TRIO_NAN_H__ |
| 19 | #define __TRIO_NAN_H__ |
| 20 | |
| 21 | #ifdef __cplusplus |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | /* |
| 25 | * Return NaN (Not-a-Number). |
| 26 | */ |
| 27 | double trio_nan(void); |
| 28 | |
| 29 | /* |
| 30 | * Return positive infinity. |
| 31 | */ |
| 32 | double trio_pinf(void); |
| 33 | |
| 34 | /* |
| 35 | * Return negative infinity. |
| 36 | */ |
| 37 | double trio_ninf(void); |
| 38 | |
| 39 | /* |
| 40 | * If number is a NaN return non-zero, otherwise return zero. |
| 41 | */ |
| 42 | int trio_isnan(double number); |
| 43 | |
| 44 | /* |
| 45 | * If number is positive infinity return 1, if number is negative |
| 46 | * infinity return -1, otherwise return 0. |
| 47 | */ |
| 48 | int trio_isinf(double number); |
| 49 | |
| 50 | #ifdef __cplusplus |
| 51 | } |
| 52 | #endif |
| 53 | |
| 54 | #endif /* __TRIO_NAN_H__ */ |