[Info-vax] VMS Software Q1 '23 Update

Arne Vajhøj arne at vajhoej.dk
Thu Jan 26 09:01:15 EST 2023


On 1/26/2023 8:14 AM, Simon Clubley wrote:
> On 2023-01-25, bill <bill.gunshannon at gmail.com> wrote:
>> We got a complaint from an "engineer" who claimed the compiler was
>> broken because when he compared reals they never equaled each other.
>> Prime fixed that one by adding an error message that politely said
>> "Don't do that, stupid".
> 
> Oh, for goodness sake. :-( Not that again. :-(
> 
> I am of the opinion that direct testing for equality of floating point
> numbers should be disallowed by every language and that people should
> be forced to use an alternative where _they_ have to specify the delta
> value that 2 numbers should be within before they are considered to be
> equal.

That sounds pretty tempting.

Note that most unit frameworks today require a delta
parameter for floating point "areequals" tests.

Arne





More information about the Info-vax mailing list