blob: d80a348112857712c1bd3574348c4061f907c9be [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
Bjorn Reese026d29f2002-01-19 15:40:18 +000018#ifndef TRIO_NAN_H
19#define TRIO_NAN_H
20
21#include "triodef.h"
Bjorn Reese45029602001-08-21 09:23:53 +000022
23#ifdef __cplusplus
24extern "C" {
25#endif
26/*
27 * Return NaN (Not-a-Number).
28 */
Bjorn Reese026d29f2002-01-19 15:40:18 +000029TRIO_PUBLIC double trio_nan(void);
Bjorn Reese45029602001-08-21 09:23:53 +000030
31/*
32 * Return positive infinity.
33 */
Bjorn Reese026d29f2002-01-19 15:40:18 +000034TRIO_PUBLIC double trio_pinf(void);
Bjorn Reese45029602001-08-21 09:23:53 +000035
36/*
37 * Return negative infinity.
38 */
Bjorn Reese026d29f2002-01-19 15:40:18 +000039TRIO_PUBLIC double trio_ninf(void);
Bjorn Reese45029602001-08-21 09:23:53 +000040
41/*
42 * If number is a NaN return non-zero, otherwise return zero.
43 */
Bjorn Reese026d29f2002-01-19 15:40:18 +000044TRIO_PUBLIC int trio_isnan(double number);
Bjorn Reese45029602001-08-21 09:23:53 +000045
46/*
47 * If number is positive infinity return 1, if number is negative
48 * infinity return -1, otherwise return 0.
49 */
Bjorn Reese026d29f2002-01-19 15:40:18 +000050TRIO_PUBLIC int trio_isinf(double number);
Bjorn Reese45029602001-08-21 09:23:53 +000051
52#ifdef __cplusplus
53}
54#endif
55
Bjorn Reese026d29f2002-01-19 15:40:18 +000056#endif /* TRIO_NAN_H */