[Info-vax] DCL's flaws (both scripting and UI)

glen herrmannsfeldt gah at ugcs.caltech.edu
Sat Jan 31 12:57:25 EST 2015


Simon Clubley <clubley at remove_me.eisner.decus.org-earth.ufp> wrote:

(snip)

> If I had my way, all languages would either outright ban equality testing
> of two floating point numbers or would require the programmer to state at
> some point within the source code what the acceptable delta is between two
> floating point numbers before they are no longer considered to be equal.

I think all processors can reliably detect a floating point zero, and
most reliably detect equality on small integers. Those happen often
enough that I wouldn't want to disallow them. 
 
> The compiler would then generate code which would check if the two
> floating point numbers fell within this delta range instead of just
> comparing two variables for equality.

A high-level language with a convenient "approximately equal"
operator might be nice.  You might want a way to define the delta.

(PL/I uses the EBCDIC not sign for its not equal and logical not
operators. In ASCII, the translation tables often translate ~
(tilde) to the EBCDIC not operator. The resulting ~= looks like
an approximately equal operator.)

-- glen



More information about the Info-vax mailing list