blob: 5b983b95de7eaf4b72d1a3df11ed5289eb82c827 [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
Daniel Veillardcda96922001-08-21 10:56:31 +000024
25#ifndef TRIO_PUBLIC
26#define TRIO_PUBLIC
27#endif
28
Bjorn Reese45029602001-08-21 09:23:53 +000029/*
30 * Return NaN (Not-a-Number).
31 */
Daniel Veillardcda96922001-08-21 10:56:31 +000032TRIO_PUBLIC
Bjorn Reese45029602001-08-21 09:23:53 +000033double trio_nan(void);
34
35/*
36 * Return positive infinity.
37 */
Daniel Veillardcda96922001-08-21 10:56:31 +000038TRIO_PUBLIC
Bjorn Reese45029602001-08-21 09:23:53 +000039double trio_pinf(void);
40
41/*
42 * Return negative infinity.
43 */
Daniel Veillardcda96922001-08-21 10:56:31 +000044TRIO_PUBLIC
Bjorn Reese45029602001-08-21 09:23:53 +000045double trio_ninf(void);
46
47/*
48 * If number is a NaN return non-zero, otherwise return zero.
49 */
Daniel Veillardcda96922001-08-21 10:56:31 +000050TRIO_PUBLIC
Bjorn Reese45029602001-08-21 09:23:53 +000051int trio_isnan(double number);
52
53/*
54 * If number is positive infinity return 1, if number is negative
55 * infinity return -1, otherwise return 0.
56 */
Daniel Veillardcda96922001-08-21 10:56:31 +000057TRIO_PUBLIC
Bjorn Reese45029602001-08-21 09:23:53 +000058int trio_isinf(double number);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* __TRIO_NAN_H__ */