[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Size of (long double) ??



Jose Rodriguez <jrguez@inm.es> writes:

> The last line says sizeof(long double) is 8, the same as type
> (double).  This is a bit "short" for this type (even in the i386,
> this program reports sizeof(long double) is 12).
> 
> Under xxgdb on Debian-Alpha, the command
> 
> (xxgdb)  display sizeof(long double)
> 
> shows the size of this type is 16 (I think this is the right one).

Strange. Looks like a bug to me.

> Since Alpha system is new to me, any comment about this issue would be
> appreciated.
> ¿How can size of "double" and "long double" be the same?

The reason is that the Alpha FPU uses 64 bit numbers, so any
additional size would have to be emulated in software, making them so
slow to be pretty useless (at least factor 10, I guess).

The i386 FPU does have some more bits internally, 96 or so, and gcc
can use those with the long double type.

	Falk


Reply to: