convert a string to 2 unsigned long
Posted on 1998-08-04
How do I convert a character string to 2 unsigned longs if my system doesn't support 64bits data type such as double ? (which means I cannot use atof() to
convert a string to double number and then convert to 2 unsigned long).
char DOUBLE = "50393836554747838837636355443"; // string format of a
// double number
I cannot use: double d = atof(DOUBLE); since my system doesn't have
the primitive type "double".
unsigned long LO = first 32 bits of the DOUBLE
unsigned long HI = second 32 bits of the DOUBLE