[Info-vax] VMS Software Q1 '23 Update

Arne Vajhøj arne at vajhoej.dk
Sat Jan 28 20:39:09 EST 2023


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
- the language used does not have a decimal type and
   integers with implied decimal is considered to
   cumbersome
- decimal is actually used in general, but certain
   calculations temporarily move over in floating
   point (like some interest calculations)

Arne





More information about the Info-vax mailing list