blob: f955198c1a77b250e45fd47eb2aeeafe9ede2928 [file] [log] [blame]
Bjorn Reese45029602001-08-21 09:23:53 +00001/*************************************************************************
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
22extern "C" {
23#endif
24/*
25 * Return NaN (Not-a-Number).
26 */
27double trio_nan(void);
28
29/*
30 * Return positive infinity.
31 */
32double trio_pinf(void);
33
34/*
35 * Return negative infinity.
36 */
37double trio_ninf(void);
38
39/*
40 * If number is a NaN return non-zero, otherwise return zero.
41 */
42int 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 */
48int trio_isinf(double number);
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif /* __TRIO_NAN_H__ */