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 header file 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 file is part of R. R is distributed under the terms of the 12 * GNU General Public License, either Version 2, June 1991 or Version 3, 13 * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public License 21 * along with this program; if not, a copy is available at 22 * https://www.R-project.org/Licenses/ 23 */ 24 25 /* Included by R.h: API */ 26 27 #ifndef R_EXT_CONSTANTS_H_ 28 #define R_EXT_CONSTANTS_H_ 29 30 /* usually in math.h, but not with strict C99 compliance */ 31 #ifndef M_PI 32 #define M_PI 3.141592653589793238462643383279502884197169399375 33 #endif 34 35 #ifndef STRICT_R_HEADERS 36 #define PI M_PI 37 #include <float.h> /* Defines the rest, at least in C99 */ 38 #define SINGLE_EPS FLT_EPSILON 39 #define SINGLE_BASE FLT_RADIX 40 #define SINGLE_XMIN FLT_MIN 41 #define SINGLE_XMAX FLT_MAX 42 #define DOUBLE_DIGITS DBL_MANT_DIG 43 #define DOUBLE_EPS DBL_EPSILON 44 #define DOUBLE_XMAX DBL_MAX 45 #define DOUBLE_XMIN DBL_MIN 46 #endif 47 48 #endif /* R_EXT_CONSTANTS_H_ */ 49