Changeset 2828 in Sophya
- Timestamp:
- Nov 2, 2005, 10:00:15 AM (20 years ago)
- Location:
- trunk/SophyaProg/Tests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaProg/Tests/tnt.cc
r2733 r2828 113 113 << " (complex<double>)zvs= " << zzd << endl; 114 114 cout << "String->double: dvs = " << dvs 115 << " (double)zvs= " << (double)dvs << endl; 115 << " (double)dvs= " << (double)dvs << endl; 116 TimeStamp ts; 117 MuTyV tv = ts; 118 cout << "MuTyV=TimeStamp->String: tv = " << tv 119 << " ->double= " << (double)tv << " ->TimeStamp:" 120 << TimeStamp((double)tv).ToString() << endl; 116 121 117 122 … … 138 143 139 144 dvl["Sinf"] = "inf 0985"; 145 dvl["ToDay"] = ts; 140 146 dvl.Print(); 141 147 … … 184 190 dt.AddDoubleColumn("f_sinxcos"); 185 191 dt.AddDoubleColumn("f_x2"); 192 dt.AddComplexColumn("cmplx_cos_sin"); 193 dt.AddDoubleComplexColumn("dcmplx_cos_sin"); 186 194 MuTyV rec[10]; 187 195 cout << " 1/ First 1000 lines .... " << endl; … … 193 201 double x = M_PI*k/100.; 194 202 double fx = sin(x)*cos(x); 203 double sx = sin(x); 204 double cx = cos(x); 195 205 rec[2] = x; 196 rec[3] = s in(x);197 rec[4] = c os(x);206 rec[3] = sx; 207 rec[4] = cx; 198 208 rec[5] = fx; 199 209 rec[6] = x*x; 210 rec[7] = complex<r_4>(cx, sx); 211 rec[8] = complex<r_8>(cx, sx); 200 212 dt.AddLine(rec); 201 213 } … … 213 225 double x = M_PI*k/100.; 214 226 double fx = sin(x)*cos(x); 227 double sx = sin(x); 228 double cx = cos(x); 215 229 rec[2] = x; 216 rec[3] = s in(x);217 rec[4] = c os(x);230 rec[3] = sx; 231 rec[4] = cx; 218 232 rec[5] = fx; 219 233 rec[6] = x*x; 234 rec[7] = complex<r_4>(cx, sx); 235 rec[8] = complex<r_8>(cx, sx); 220 236 dt.AddLine(rec); 221 237 } … … 262 278 dt.AddDoubleColumn("f_sinxcos"); 263 279 dt.AddDoubleColumn("f_x2"); 280 dt.AddComplexColumn("cmplx_cos_sin"); 281 dt.AddDoubleComplexColumn("dcmplx_cos_sin"); 264 282 MuTyV rec[10]; 265 283 cout << " 1/ First 1000 lines .... " << endl; … … 268 286 double x = M_PI*k/100.; 269 287 double fx = sin(x)*cos(x); 288 double sx = sin(x); 289 double cx = cos(x); 270 290 rec[1] = x; 271 rec[2] = s in(x);272 rec[3] = c os(x);291 rec[2] = sx; 292 rec[3] = cx; 273 293 rec[4] = fx; 274 294 rec[5] = x*x; 295 rec[6] = complex<r_4>(cx, sx); 296 rec[7] = complex<r_8>(cx, sx); 275 297 dt.AddLine(rec); 276 298 } -
trunk/SophyaProg/Tests/tstboloread.cc
r2615 r2828 14 14 #include <stdlib.h> 15 15 #include <iostream> 16 #include <values.h>16 // #include <values.h> 17 17 #include <string.h> 18 18 #include <string> -
trunk/SophyaProg/Tests/tstcolread.cc
r2615 r2828 6 6 #include <stdlib.h> 7 7 #include <iostream> 8 #include <values.h>8 // #include <values.h> 9 9 #include <string.h> 10 10 #include <string> -
trunk/SophyaProg/Tests/ttimestamp.cc
r2659 r2828 26 26 27 27 InitTim(); 28 cout << " Sizeof(TimeStamp=) " << sizeof(TimeStamp) << endl; 28 29 TimeStamp ts; 29 cout << "ts: Now : " << ts << endl; 30 TimeStamp ts2("30/01/1962","14:22:35.65"); 31 cout << "ts2: 30/01/1962 14:22:35.65 : " << ts2 << endl; 30 cout << "ts: Now : " << ts << "(->double: " << (double)ts << " )" << endl; 31 TimeStamp ts2("26/8/1974","14:22:35.65"); 32 cout << "ts2: 26/8/1974 14:22:35.65 : " << ts2 33 << " double->TimeStamp: " << TimeStamp(ts2.ToDays()) << endl; 32 34 TimeStamp ts3("01/01/1905","00:00:00"); 33 cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): " << (double)ts3 << endl; 35 cout << "ts3: 01/01/1905 , 00:00:00 : " << ts3 << " (double): " 36 << (double)ts3 << " double->TimeStamp: " << TimeStamp(ts3.ToDays()) << endl; 34 37 TimeStamp ts4("01/01/1901","03:00:20"); 35 cout << "ts3: 01/01/1901 , 02:00:20 : " << ts4 << " (double): " << (double)ts4 << endl; 38 cout << "ts3: 01/01/1901 , 03:00:20 : " << ts4 << " (double): " 39 << (double)ts4 << " double->TimeStamp: " << TimeStamp(ts4.ToDays()) << endl; 36 40 41 TimeStamp ts5("01/12/1899","00:00:00"); 42 cout << "ts5: 01/12/1899 , 00:00:00 : " << ts5 << " (double): " 43 << (double)ts5 << " double->TimeStamp: " << TimeStamp(ts5.ToDays()) << endl; 44 TimeStamp ts6("01/12/1899","15:30:00"); 45 cout << "ts6: 01/12/1899 , 15:30:00 : " << ts6 << " (double): " 46 << (double)ts6 << " double->TimeStamp: " << TimeStamp(ts6.ToDays()) << endl; 47 cout << " ts.ToString(bool, bool) test : " << endl; 48 cout << " ts.ToString()= " << ts.ToString() << endl; 49 cout << " ts.ToString(fgd=true, fgh=false)= " << ts.ToString(true, false) << endl; 50 cout << " ts.ToString(fgd=false, fgh=true)= " << ts.ToString(false, true) << endl; 37 51 38 52 }
Note:
See TracChangeset
for help on using the changeset viewer.