Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / R_ext / Constants.h @ 2486

History | View | Annotate | Download (1.5 kB)

1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998-2012   The R Core Team.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU Lesser General Public License as published by
8
 *  the Free Software Foundation; either version 2.1 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU Lesser General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU Lesser General Public License
17
 *  along with this program; if not, a copy is available at
18
 *  http://www.r-project.org/Licenses/
19
 */
20

    
21
/* Included by R.h: API */
22

    
23
#ifndef R_EXT_CONSTANTS_H_
24
#define R_EXT_CONSTANTS_H_
25

    
26
/* usually in math.h, but not with strict C99 compliance */
27
#ifndef M_PI
28
#define M_PI 3.141592653589793238462643383279502884197169399375
29
#endif
30

    
31
#ifndef STRICT_R_HEADERS
32
#define PI             M_PI
33
#include <float.h>  /* Defines the rest, at least in C99 */
34
#define SINGLE_EPS     FLT_EPSILON
35
#define SINGLE_BASE    FLT_RADIX
36
#define SINGLE_XMIN    FLT_MIN
37
#define SINGLE_XMAX    FLT_MAX
38
#define DOUBLE_DIGITS  DBL_MANT_DIG
39
#define DOUBLE_EPS     DBL_EPSILON
40
#define DOUBLE_XMAX    DBL_MAX
41
#define DOUBLE_XMIN    DBL_MIN
42
#endif
43

    
44
#endif /* R_EXT_CONSTANTS_H_ */