:: [DNG] Decimal fixed-point (WAS: Re:…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Hendrik Boom
Date:  
À: dng
Anciens-sujets: Re: [DNG] What languages are actually used?
Sujet: [DNG] Decimal fixed-point (WAS: Re: What languages are actually used?
On Wed, Nov 13, 2024 at 12:27:30PM +0100, Didier Kryn wrote:
> Le 11/11/2024 à 15:07, Curtis Maurand a écrit :
> > I worked in insurance in an IBM house and IBM is big on Java, still. They’ve been big on porting a lot of cobol code to Java. I M has written tools to port over Cobol code. They don’t work, but they’re trying.
> >
> > Our policy management system called Point-in-C is now Point-in-Java.
>
>     AFAIK, one of the critical points about bank computation is decimal
> fixed point operations. I remember that old IBM mainframes had cpu
> instructions for that.


It also works to choose units appropriately -- such as counting pennies
instead of dollars, and inserting or removing a decmial point in inut and output.
Of course, it's a bit less error-prone if the language takes care of this for one.

-- hendrik

>
>     One might say that fixed point is like integer, but there are surprising
> effects of rounding. I have tried this in Ada, which features both binary
> and decimal fixed point numbers, with custom precision and the two are
> different because of the precision and the rounding it causes. Assigning a
> decimal value to a binary fixed point and printing it doesn't always print
> the assigned value.
>
>     I've read that fixed point operations are now available in C and C++. I
> don't know as from which versions, and with which data type. And what about
> decimal fixed point in Java?
>
> --     Didier
>
>
>
>
>
>
>
>
>


> _______________________________________________
> Dng mailing list
> Dng@???
> Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> Archive: https://lists.dyne.org/lurker/list/dng.en.html