On Sun, 25 Mar 2001, J. David Bryan wrote:
On 24 Mar 2001, at 20:17, f.couperin wrote:
I don't know if it's really a bug but the result is really surprising.
[...]
I have : gpc version 20000727, based on 2.95.2 19991024 (release)
Running your program on:
(i386-mingw32msvc) gpc version 20001107, based on 2.95.2 19991024 (release)
...produces "OK". You didn't mention your platform, but perhaps this is a function of the floating-point representation used internally, or perhaps this is a change in GPC from your version to mine.
-- Dave
My platform is PII 400, Linux SuSe 7.1, 'gpc -v' tells me: gpc version 19991030, based on 2.95.2 19991024 (release)
I made some more tests looking on the bit pattern of returned LongReal values (thanks to Frank for his hint to use SizeOf). LongReal uses 64 bits for mantissa and 16 for exponent and sign. If we store enough significant (>20) decimal digits on disk, errors can be found if any, only in the LSB, that's OK. The write statement should look like this: Writeln(TextFile, A:28), nevertheless comparing(=) FP values is walking on glazed frost.
So I take back my suspicion that gpc has some weakness in handling LongReal's (... on PII & Linux).
Ernst-Ludwig