Greetings,
I am running GPC under RedHat 7.3 on an Intel i686. I am trying to debug a MatLab program by running it against one written in Gnu Pascal. I am using the type longreal throughout. According to the manual this typically occupies 80 bits. Is there any way of finding out easily how long longreal is on my hardware? I want to avoid precision-related problems. The programs generate much the same output but depart beyond about 7 significant figures.
Thanks in advance for information and advice.
John O.
John Ollason wrote:
Greetings,
I am running GPC under RedHat 7.3 on an Intel i686. I am trying to debug a MatLab program by running it against one written in Gnu Pascal. I am using the type longreal throughout. According to the manual this typically occupies 80 bits. Is there any way of finding out easily how long longreal is on my hardware?
WriteLn (BitSizeOf (LongReal))
On i686 it will be 80 bits. Actually, the statement outputs 96 -- I think the size is rounded up internally, so values can, e.g., be moved in 3 32 bit registers. But only 80 bits are actually used.
Frank
Frank Heckenbach a écrit:
John Ollason wrote:
Greetings,
I am running GPC under RedHat 7.3 on an Intel i686. I am trying to debug a MatLab program by running it against one written in Gnu Pascal. I am using the type longreal throughout. According to the manual this typically occupies 80 bits. Is there any way of finding out easily how long longreal is on my hardware?
WriteLn (BitSizeOf (LongReal))
On i686 it will be 80 bits. Actually, the statement outputs 96 -- I think the size is rounded up internally, so values can, e.g., be moved in 3 32 bit registers. But only 80 bits are actually used.
Yes, on DJGPP at least, "extended" are stored on 12 bytes, but only 10 are used, The two extra are padding.
Maurice