Afficher un message
Vieux 31/10/2007, 02h12   #84
user923005
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Bug/Gross InEfficiency in HeathField's fgetline program

On Oct 30, 4:41 pm, Tor Rustad <tor_rus...@hotmail.com> wrote:
> Dann Corbit wrote:
> > "Tor Rustad" <tor_rus...@hotmail.com> wrote in message
> >news:9c-dnQDPb81DwLva4p2dnAA@telenor.com...
> >> Malcolm McLean wrote:
> >>> In reality we would use a floating point rather than an integer type.
> >> No, most financial institutions are not even allowed to use floating-point
> >> for financial calculations. In fact, I have only seen fixed point
> >> calculations, when dealing with money.

>
> > Even for time value of money calculations (e.g. compound interest)?

>
> I haven't programmed or audited code for compound interest calculations,
> but when I analyzed all the COBOL sources (for Y2K bugs) of a major
> in-house system, no floating-point code was scanned (approx 300.000 LOC).
>
> COBOL has built in support for fixed-point calculations, so when dealing
> with monetary computations on mainframes, that's the natural pick IMO.


I would be very leery of fixed point calculations used to calculate
interest over time.

I use a modified version of Moshier's Qfloat and perform all
calculations with 100 digits of precision. It can calculate "U.S.
national debt" sized amounts over centuries and not lose a penny.

Of course, it is possible that your COBOL compiler has done something
like that.

  Réponse avec citation
 
Page generated in 0,05818 seconds with 9 queries