Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:58

0001 /* gsl_nan.h
0002  * 
0003  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef __GSL_NAN_H__
0021 #define __GSL_NAN_H__
0022 
0023 #ifdef INFINITY
0024 # define GSL_POSINF INFINITY
0025 # define GSL_NEGINF (-INFINITY)
0026 #elif defined(HUGE_VAL)
0027 # define GSL_POSINF HUGE_VAL
0028 # define GSL_NEGINF (-HUGE_VAL)
0029 #else
0030 # define GSL_POSINF (gsl_posinf())
0031 # define GSL_NEGINF (gsl_neginf())
0032 #endif
0033 
0034 #ifdef NAN
0035 # define GSL_NAN NAN
0036 #elif defined(INFINITY)
0037 # define GSL_NAN (INFINITY/INFINITY)
0038 #else
0039 # define GSL_NAN (gsl_nan())
0040 #endif
0041 
0042 #define GSL_POSZERO (+0.0)
0043 #define GSL_NEGZERO (-0.0)
0044 
0045 #endif /* __GSL_NAN_H__ */