bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REQUEST - bash floating point math support


From: Zachary Santer
Subject: Re: REQUEST - bash floating point math support
Date: Thu, 6 Jun 2024 07:10:09 -0400

On Wed, Jun 5, 2024 at 4:08 PM Robert Elz <kre@munnari.oz.au> wrote:
>
> That's a perfect case for scaled integers - no-one ever deals with
> fractions of cents in this kind of thing (a bank won't ever tell you
> that your balance is $5678.17426 for example, even if the interest
> calculations computed accurately might arrive at that number.)

Additionally, floating-point arithmetic introduces rounding errors
that are *very undesirable* in a financial context. There, you will
likely see fixed-point arithmetic, which is effectively the same thing
as scaled integers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]