FACT++  1.0
static void t_flotin ( int *  status)
static

Definition at line 1322 of file palTest.c.

References i, palDfltin(), viv(), and vvd().

Referenced by main().

1322  {
1323 
1324  int j;
1325  const char * s = " 12.345, , -0 1E3-4 2000 E ";
1326  /* 123456789012345678901234567890123 */
1327  int i = 1;
1328  double dv = 0.0;
1329 
1330  palDfltin ( s, &i, &dv, &j );
1331  viv ( i, 10, "palDfltin", "I1", status );
1332  vvd ( dv, 12.345, 1e-12, "palDfltin", "V1", status );
1333  viv ( j, 0, "palDfltin", "J1", status );
1334 
1335  palDfltin ( s, &i, &dv, &j );
1336  viv ( i, 12, "palDfltin", "I2", status );
1337  vvd ( dv, 12.345, 1e-12, "palDfltin", "V2", status );
1338  viv ( j, 1, "palDfltin", "J2", status );
1339 
1340  palDfltin ( s, &i, &dv, &j );
1341  viv ( i, 16, "palDfltin", "I3", status );
1342  vvd ( dv, 0, 0, "palDfltin", "V3", status );
1343  viv ( j, -1, "palDfltin", "J3", status );
1344 
1345  palDfltin ( s, &i, &dv, &j );
1346  viv ( i, 19, "palDfltin", "I4", status );
1347  vvd ( dv, 1000, 0, "palDfltin", "V4", status );
1348  viv ( j, 0, "palDfltin", "J4", status );
1349 
1350  palDfltin ( s, &i, &dv, &j );
1351  viv ( i, 22, "palDfltin", "I5", status );
1352  vvd ( dv, -4, 0, "palDfltin", "V5", status );
1353  viv ( j, -1, "palDfltin", "J5", status );
1354 
1355  palDfltin ( s, &i, &dv, &j );
1356  viv ( i, 28, "palDfltin", "I6", status );
1357  vvd ( dv, 2000, 0, "palDfltin", "V6", status );
1358  viv ( j, 0, "palDfltin", "J6", status );
1359 
1360  palDfltin ( s, &i, &dv, &j );
1361  viv ( i, 34, "palDfltin", "I7", status );
1362  vvd ( dv, 2000, 0, "palDfltin", "V7", status );
1363  viv ( j, 1, "palDfltin", "J7", status ); /* differs from slaDfltin */
1364 
1365  /* Now test overflow and underflow */
1366  i = 1;
1367  palDfltin( " 1D600 ", &i, &dv, &j );
1368  viv ( i, 8, "palDfltin", "I8", status );
1369  vvd ( dv, HUGE_VAL, 0, "palDfltin", "V8", status );
1370  viv ( j, 2, "palDfltin", "J8", status );
1371 
1372 }
void palDfltin(const char *string, int *nstrt, double *dreslt, int *jflag)
Definition: palDfltin.c:146
int i
Definition: db_dim_client.c:21
static void viv(int ival, int ivalok, const char *func, const char *test, int *status)
Definition: palTest.c:65
static void vvd(double val, double valok, double dval, const char *func, const char *test, int *status)
Definition: palTest.c:99

+ Here is the call graph for this function:

+ Here is the caller graph for this function: