24 g2int isign,iexp,imant;
27 static float two23,two126;
28 static g2int test = 0;
29 uint64_t msk1 = 0x80000000;
30 g2int msk2 = 0x7F800000;
31 g2int msk3 = 0x007FFFFF;
40 for (j = 0; j < num; j++)
43 isign = (rieee[j]&msk1)>>31;
44 iexp = (rieee[j]&msk2)>>23;
45 imant = (rieee[j]&msk3);
52 if ((iexp > 0) && (iexp < 255))
54 temp = (float)
int_power(2.0, (iexp - 127));
55 a[j] = sign * temp * (1.0 + (two23 * (float)imant));
60 a[j] = sign * two126 * two23 * (float)imant;
66 a[j] = sign * (1E+37);
int64_t g2int
Long integer type.
Header file with internal function prototypes NCEPLIBS-g2c library.
double int_power(double x, g2int y)
Function similar to C pow() power function.
void rdieee(g2int *rieee, float *a, g2int num)
Read a list of real values in 32-bit IEEE floating point format.