[Info-vax] VMS Software Q1 '23 Update

bill bill.gunshannon at gmail.com
Sun Jan 29 09:49:18 EST 2023


On 1/28/2023 8:39 PM, Arne Vajhøj wrote:
> On 1/28/2023 8:28 PM, Scott Dorsey wrote:
>>> On 1/28/2023 6:19 PM, Johnny Billquist wrote:
>>>> On 2023-01-28 23:35, Arne Vajhøj wrote:
>>>>> On 1/28/2023 3:01 PM, Steven Schweda wrote:
>>>>>>> Consider the case where the numbers represent money.
>>>>>>
>>>>>>      Who cares what the numbers represent?  For example, if you 
>>>>>> round to
>>
>> 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

> - the language used does not have a decimal type and
>    integers with implied decimal is considered to
>    cumbersome

Wrong language for the job

> - decimal is actually used in general, but certain
>    calculations temporarily move over in floating
>    point (like some interest calculations)

Wrong language for the job

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.

bill





More information about the Info-vax mailing list