Mail Archives: djgpp/1994/07/29/14:54:20
Perhaps you must swap low and bytes (0 <-> 3 and 1 <-> 2).
To verify, try my little ugly prgm which dump (low byte to high byte)
3 floating point variables (float, double and long double).
On my SUN, it prints :
40 06 66 66
40 00 CC CC CC CC CC CD
40 00 CC CC CC CC CC CD
------------ cut here ------------
#include <stdio.h>
float f = 2.1;
/*long float lf = 2.1;*/
double d = 2.1;
long double ld = 2.1;
#define PRINT(var) for (i=0 ; i<sizeof(var) ; printf ("%2.2X ", ((unsigned char *)(&var))[i++]));printf ("\n");
void main (void)
{
int i;
PRINT (f);
/* PRINT (lf);*/
PRINT (d);
PRINT (ld);
}
------------ cut here ------------
A+
*************************************************************
* Pascal RICHARD | pascal DOT richard AT art DOT alcatel DOT fr *
*************************************************************
- Raw text -