| 1 |
/* |
| 2 |
* Definition of special numbers (__infinity) |
| 3 |
* |
| 4 |
*/ |
| 5 |
|
| 6 |
/* |
| 7 |
* Copyright (c) 1999-2000 Jean-Alain Marck |
| 8 |
* Copyright (c) 1999-2003 Eric Gourgoulhon |
| 9 |
* Copyright (c) 2001 Joachim Frieben |
| 10 |
* Copyright (c) 2003 Jerome Novak |
| 11 |
* Copyright (c) 2003 Christian Klein |
| 12 |
* |
| 13 |
* This file is part of LORENE. |
| 14 |
* |
| 15 |
* LORENE is free software; you can redistribute it and/or modify |
| 16 |
* it under the terms of the GNU General Public License as published by |
| 17 |
* the Free Software Foundation; either version 2 of the License, or |
| 18 |
* (at your option) any later version. |
| 19 |
* |
| 20 |
* LORENE is distributed in the hope that it will be useful, |
| 21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 |
* GNU General Public License for more details. |
| 24 |
* |
| 25 |
* You should have received a copy of the GNU General Public License |
| 26 |
* along with LORENE; if not, write to the Free Software |
| 27 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 28 |
* |
| 29 |
*/ |
| 30 |
|
| 31 |
|
| 32 |
#ifndef __NBR_SPX_ |
| 33 |
#define __NBR_SPX_ |
| 34 |
|
| 35 |
/* |
| 36 |
* Definition des nombres particuliers (norme ieee) |
| 37 |
* |
| 38 |
* Actuellement: |
| 39 |
* infini code comme __infinity |
| 40 |
* |
| 41 |
* On pourra mettre par la suite, au fur et a mesure des besoins: |
| 42 |
* |
| 43 |
* extern double __libm_qnan_d ; |
| 44 |
* extern double __libm_inf_d ; |
| 45 |
* extern double __libm_neginf_d ; |
| 46 |
* extern double __infinity ; |
| 47 |
* |
| 48 |
* Les machines reconnuees sont: |
| 49 |
* SGI (par defaut) |
| 50 |
* DEC Alpha (__alpha) |
| 51 |
* HP-PA (__hppa) |
| 52 |
* PC Linux (__linux) |
| 53 |
* |
| 54 |
* Pour info: |
| 55 |
* |
| 56 |
* -------------------------------------------------------- |
| 57 |
* | | |
| 58 |
* | Double Precision Format | |
| 59 |
* | | |
| 60 |
* | | bit 0 | bits 1 - 11 | bits 12 - 63 | |
| 61 |
* | ----------------------------------------------- | |
| 62 |
* | | Sign | Exponent | Mantissa | | |
| 63 |
* | | | | | |
| 64 |
* | | |
| 65 |
* | \ msb lsb / \ msb lsb / | |
| 66 |
* | | |
| 67 |
* -------------------------------------------------------- |
| 68 |
* |
| 69 |
* ---------------------------------------------- |
| 70 |
* | Condition: plus or minus ZERO | |
| 71 |
* | | |
| 72 |
* | Sign | Exponent | Mantissa | |
| 73 |
* | | (All Zeros) | (All Zeros) | |
| 74 |
* | | |
| 75 |
* | Condition: plus or minus INFINITY | |
| 76 |
* | | |
| 77 |
* | Sign | Exponent | Mantissa | |
| 78 |
* | | (All Ones) | (All Zeros) | |
| 79 |
* | | |
| 80 |
* | Condition: NaN (Not a Number) | |
| 81 |
* | | |
| 82 |
* | Sign | Exponent | Mantissa | |
| 83 |
* | | (All Ones) | (Not All Zeros) | |
| 84 |
* | | |
| 85 |
* ---------------------------------------------- |
| 86 |
*/ |
| 87 |
|
| 88 |
|
| 89 |
/* |
| 90 |
* $Id: nbr_spx.h,v 1.6 2014/10/06 15:09:40 j_novak Exp $ |
| 91 |
* $Log: nbr_spx.h,v $ |
| 92 |
* Revision 1.6 2014/10/06 15:09:40 j_novak |
| 93 |
* Modified #include directives to use c++ syntax. |
| 94 |
* |
| 95 |
* Revision 1.5 2009/11/22 17:06:11 j_novak |
| 96 |
* Patched to build on a Macbook Pro (thanks E. Schnetter) |
| 97 |
* |
| 98 |
* Revision 1.4 2007/06/16 22:19:23 m_saijo |
| 99 |
* Add the case __i386__ for supporting Intel Mac. |
| 100 |
* |
| 101 |
* Revision 1.3 2003/02/05 13:51:40 e_gourgoulhon |
| 102 |
* Added the case __ppc__ for MacOS X. |
| 103 |
* |
| 104 |
* Revision 1.2 2002/09/09 12:57:22 e_gourgoulhon |
| 105 |
* Added the case of IBM AIX with xlC compiler. |
| 106 |
* |
| 107 |
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon |
| 108 |
* LORENE |
| 109 |
* |
| 110 |
* Revision 2.2 2001/05/29 15:59:27 eric |
| 111 |
* Ajout du cas des machines HP-PA (contribution de Joachim). |
| 112 |
* |
| 113 |
* Revision 2.1 2000/03/17 08:17:35 eric |
| 114 |
* Mise en conformite Linux : huge_val.h ---> math.h |
| 115 |
* |
| 116 |
* Revision 2.0 1999/02/15 10:41:51 hyc |
| 117 |
* *** empty log message *** |
| 118 |
* |
| 119 |
* Revision 2.1 1999/02/15 09:59:50 hyc |
| 120 |
* *** empty log message *** |
| 121 |
* |
| 122 |
* Revision 1.3 1998/06/10 07:25:37 eric |
| 123 |
* Ajout du cas PC Linux. |
| 124 |
* |
| 125 |
* Revision 1.2 1997/10/21 12:48:04 hyc |
| 126 |
* *** empty log message *** |
| 127 |
* |
| 128 |
* Revision 1.1 1997/10/17 15:40:01 hyc |
| 129 |
* Initial revision |
| 130 |
* |
| 131 |
* |
| 132 |
* $Header: /cvsroot/Lorene/C++/Include/nbr_spx.h,v 1.6 2014/10/06 15:09:40 j_novak Exp $ |
| 133 |
* |
| 134 |
*/ |
| 135 |
|
| 136 |
#ifdef __alpha |
| 137 |
#include <cfloat> |
| 138 |
#define __infinity DBL_INFINITY |
| 139 |
#else |
| 140 |
#ifdef __hppa |
| 141 |
#include <cmath> |
| 142 |
#define __infinity HUGE_VAL |
| 143 |
#else |
| 144 |
#ifdef __linux |
| 145 |
#include <cmath> |
| 146 |
#define __infinity HUGE_VAL |
| 147 |
#else |
| 148 |
#ifdef __aix |
| 149 |
#include <cmath> |
| 150 |
#define __infinity HUGE_VAL |
| 151 |
#else |
| 152 |
#ifdef __ppc__ |
| 153 |
#include <cmath> |
| 154 |
#define __infinity INFINITY |
| 155 |
#else |
| 156 |
#ifdef __i386__ |
| 157 |
#include <cmath> |
| 158 |
#define __infinity INFINITY |
| 159 |
#else |
| 160 |
#ifdef __x86_64__ |
| 161 |
#include <cmath> |
| 162 |
#define __infinity INFINITY |
| 163 |
#else |
| 164 |
extern double __infinity ; |
| 165 |
#endif |
| 166 |
#endif |
| 167 |
#endif |
| 168 |
#endif |
| 169 |
#endif |
| 170 |
#endif |
| 171 |
#endif |
| 172 |
|
| 173 |
#endif |