00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #endif
00053
00054 #ifndef _CONSTANTS_H_
00055 #define _CONSTANTS_H_
00056
00057 #if defined(CH_USE_FLOAT)
00058
00059 #define zero (0.0e0)
00060 #define one (1.0e0)
00061 #define two (2.0e0)
00062 #define three (3.0e0)
00063 #define four (4.0e0)
00064 #define five (5.0e0)
00065 #define six (6.0e0)
00066 #define seven (7.0e0)
00067 #define eight (8.0e0)
00068 #define nine (9.0e0)
00069 #define ten (10.0e0)
00070 #define twelve (12.0e0)
00071 #define fifteen (15.0e0)
00072 #define sixteen (16.0e0)
00073 #define twenty (20.0e0)
00074 #define tenth (0.100e0)
00075 #define eighth (0.125e0)
00076 #define sixth (1.000e0 / 6.000e0)
00077 #define fourth (0.250e0)
00078 #define third (1.000e0 / 3.000e0)
00079 #define half (0.500e0)
00080 #define two3rd (2.000e0 / 3.000e0)
00081 #define Pi (3.14159265358979323846e0)
00082
00083 #define ZERO (0.0E0)
00084 #define ONE (1.0E0)
00085 #define TWO (2.0E0)
00086 #define THREE (3.0E0)
00087 #define FOUR (4.0E0)
00088 #define FIVE (5.0E0)
00089 #define SIX (6.0E0)
00090 #define SEVEN (7.0E0)
00091 #define EIGHT (8.0E0)
00092 #define NINE (9.0E0)
00093 #define TEN (10.0E0)
00094 #define TWELVE (12.0E0)
00095 #define FIFTEEN (15.0E0)
00096 #define SIXTEEN (16.0E0)
00097 #define TWENTY (20.0E0)
00098 #define TENTH (0.100E0)
00099 #define EIGHTH (0.125E0)
00100 #define SIXTH (1.000E0 / 6.000E0)
00101 #define FOURTH (0.250E0)
00102 #define THIRD (1.000E0 / 3.000E0)
00103 #define HALF (0.500E0)
00104 #define TWO3RD (2.000E0 / 3.000E0)
00105 #define PI (3.14159265358979323846E0)
00106
00107 #elif defined(CH_USE_DOUBLE)
00108
00109 #define zero (0.0d0)
00110 #define one (1.0d0)
00111 #define two (2.0d0)
00112 #define three (3.0d0)
00113 #define four (4.0d0)
00114 #define five (5.0d0)
00115 #define six (6.0d0)
00116 #define seven (7.0d0)
00117 #define eight (8.0d0)
00118 #define nine (9.0d0)
00119 #define ten (10.0d0)
00120 #define twelve (12.0d0)
00121 #define fifteen (15.0d0)
00122 #define sixteen (16.0d0)
00123 #define twenty (20.0d0)
00124 #define tenth (0.100d0)
00125 #define eighth (0.125d0)
00126 #define sixth (1.000d0 / 6.000d0)
00127 #define fourth (0.250d0)
00128 #define third (1.000d0 / 3.000d0)
00129 #define half (0.500d0)
00130 #define two3rd (2.000d0 / 3.000d0)
00131 #define Pi (3.14159265358979323846264338327950288d0)
00132
00133 #define ZERO (0.0D0)
00134 #define ONE (1.0D0)
00135 #define TWO (2.0D0)
00136 #define THREE (3.0D0)
00137 #define FOUR (4.0D0)
00138 #define FIVE (5.0D0)
00139 #define SIX (6.0D0)
00140 #define SEVEN (7.0D0)
00141 #define EIGHT (8.0D0)
00142 #define NINE (9.0D0)
00143 #define TEN (10.0D0)
00144 #define TWELVE (12.0D0)
00145 #define FIFTEEN (15.0D0)
00146 #define SIXTEEN (16.0D0)
00147 #define TWENTY (20.0D0)
00148 #define TENTH (0.100D0)
00149 #define EIGHTH (0.125D0)
00150 #define SIXTH (1.000D0 / 6.000D0)
00151 #define FOURTH (0.250D0)
00152 #define THIRD (1.000D0 / 3.000D0)
00153 #define HALF (0.500D0)
00154 #define TWO3RD (2.000D0 / 3.000D0)
00155 #define PI (3.14159265358979323846264338327950288D0)
00156
00157 #else
00158
00159 #error One of CH_USE_{FLOAT,DOUBLE} must be defined
00160
00161 #endif
00162
00163 #endif