Mail Archives: djgpp/2001/03/02/06:48:45
Thanks for your e-mail.
>>>If your problem is with 14.399996 being printed instead of 14.4,
>>>that's normal: REAL variables only have about 6.5 digits of
>>>precision. Try using DOUBLE PRECISION instead.
>
>> Thanks, it seems to be ok.
>> But was it a bug, I have newer seen before in my long life?
>
>It was not so much a bug, but a an error in your >expectation about the program's
behaviour. You'ld have
>to learn a bit more about Fortran to see how to get
>the behaviour you expected. And a bit more about
It was just a test from book and numbers differ from typed. That is why I asked
it.
>numerical computation in general to see why doing this
>kind of stuff with a datatype like REAL is a bad idea ---
>professional software of this type would usually count
>pennies (or even fractions of pennies), not pounds,
>and store everything in INTEGER or even INTEGER*8
>variables.
I have use about 17,5 years marks (not pennies), pounds (not pennies) and dollars
(not cents) for counting salary or payment (and real or higher precision) in
databases.
Where are these "pennies from heaven" professionals, that I can change some
experience with them?
>--
>Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
>Even if all the snow were burnt, ashes would remain.
P.S Where is yours remaining ashes ;-)?
Thank you!
Veli Suorsa
---
Oulu, FINLAND
Mailto:VJSuorsa AT Surfeu DOT Fi
http://members.surfeu.fi/veli.suorsa/
http://www.surfeu.fi
- Raw text -