[Beowulf] Question about amd64 architecture and floating point operations

Jakob Oestergaard jakob at unthought.net
Wed Nov 22 06:42:15 PST 2006


On Wed, Nov 22, 2006 at 09:01:54AM -0200, Ivan Paganini wrote:
> Hello everybody at beowulf. Sorry about the _really_ newbie question, but
> after doing some tests and researching a little, a question arose when
> fooling around with amd64 (more precisely, an amd64 Athlon 4200 X2) and gcc
> and sun studio 11. The architecture has 64 bits integer registers and 128
> bits floating point registers, but my test programs in C just gave me the
> same precision that I got with an old athlon 2400 xp (32bits), that is, long
> double go only to 1x10^ 4961, even with the -m64 flag. I always imagined
> that I would get the double precision without the long double declaration
> (or, maybe, 40bits precision). What am I missing here?

You are missing that 64-bit addressing capability, 64-bit integer
registers and 128-bit floating point registers for SIMD instructions
does not mean that the FPU has been extended to work on
even-further-extended-precision floating point scalars.  :)

> Is the compiler (gcc
> 4.1, sun studio express 11), the operating system (ubuntu 64bits edgy), or
> just an error in my logic?

The FPU simply cannot do what you were looking for. It was never meant
to, and nobody promised it would.

If you thought it would, it is a misunderstanding. Sorry :)

-- 

 / jakob




More information about the Beowulf mailing list