[Info-vax] VMS Software Q1 '23 Update
Arne Vajhøj
arne at vajhoej.dk
Sun Jan 29 14:30:54 EST 2023
On 1/29/2023 9:49 AM, bill wrote:
> On 1/28/2023 8:39 PM, Arne Vajhøj wrote:
>> On 1/28/2023 8:28 PM, Scott Dorsey wrote:
>>> One of the absolute FIRST things that I was told about floating point
>>> variables in my first programming class was to NEVER use them to
>>> represent
>>> money.
>>
>> It is known to be problematic.
>>
>> But there are 3 cases where it happens anyway:
>> - the developer does not care
>
> Wrong developer
I agree.
>> - the language used does not have a decimal type and
>> integers with implied decimal is considered to
>> cumbersome
>
> Wrong language for the job
I agree, but 40 years ago there were a lot of common
languages without decimal type. Probably easier today
as most common languages has decimal - C and C++ being the
exception.
>> - decimal is actually used in general, but certain
>> calculations temporarily move over in floating
>> point (like some interest calculations)
>
> Wrong language for the job
I think it would be more risky to do the interest calculations
in decimal than in floating point. Decimals could easily
loose precision if developer not extremely careful about
decimals.
> Obviously, all of these can be fixed properly. Guess the concepts of
> right tool for the job and due diligence no longer carry any sway.
Probably more an old times problem than a today problem. Newer
languages just have it even if they are not targeted towards
real business applications.
Arne
More information about the Info-vax
mailing list