:: Re: [DNG] Politics of IT in the U.S…
Página Inicial
Delete this message
Reply to this message
Autor: Hendrik Boom
Data:  
Para: dng
Assunto: Re: [DNG] Politics of IT in the U.S. government
On Wed, Aug 03, 2016 at 11:51:32PM +0200, Didier Kryn wrote:
>
>     COBOL has fixed point base 10 operations, which is mandatory for
> financial computation. C hasn't. I've heared that, in the US at least,
> floating point operations are illegal in the finance area. The only other
> language I know which also features this kind of operations is guess
> which... Ada.

>
>     I remember, though, I have noticed that the GCC C compiler (or maybe
> C++)  can be built with fixed point operations, but I'm afraid it implies
> some extension of the language.


Floating-point just isn't accurate enough. Multiple-precision scaled
fixed-point would work, even if it's binary.

Early versions of gnucash used floating-point and I reported it as a
bug. They now use decimal numbers in XML for currency amounts. I
don't know what they use internally, nor wat they'll use when they
switch gnucash to a real database instead of an XML file.

-- hendrik