Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!a.gp.cs.cmu.edu!koopman From: koopman@a.gp.cs.cmu.edu (Philip Koopman) Newsgroups: comp.lang.forth Subject: Re: Data determines correct operation? Summary: why it is scary Message-ID: <9898@pt.cs.cmu.edu> Date: 13 Jul 90 20:40:20 GMT References: <9811@pt.cs.cmu.edu> <1326.UUL1.3#5129@willett.UUCP> Organization: Carnegie-Mellon University, CS/RI Lines: 35 In article <1326.UUL1.3#5129@willett.UUCP>, dwp@willett.UUCP (Doug Philips) writes: > Is it that "works with positive numbers only" is scary because you > think that the author is lying, or is it scary because you didn't think > it should be necessary to put such a restriction on it? Or am I missing > some other reason? The caveat "works with positive numbers only" is much preferable to undocumented limitations. So, this restriction is not nearly as bad as the cmForth "< bug". However, as an outsider (say, a C programmer) I would not be accustomed to things as basic as division having data restrictions not taught in grade school. If you bought a calculator for $5, would you be upset if it said in the instruction manual that division with negative operands gave unspecified results? Would you even think to look for such a thing? Of course you could try it out and see what it did. But wouldn't such a limitation (if you happened to see it in the manual in the store) make you shy away from purchase out of anxiety over what other limitations (documented or not) you didn't think to look for? I have had several email conversations with Mitch Bradley in which we seem to agree that /MOD should have "reasonable" behavior for negative inputs. For example, one could place restrictions on allowable remainders and quotients. Or, one could simply say that it is equivalent to one of the fully defined divisions (which one might be implementation dependent). BUT, leaving it undefined translates to "broken" in my book. Phil Koopman koopman@greyhound.ece.cmu.edu Arpanet 2525A Wexford Run Rd. Wexford, PA 15090 Senior scientist at Harris Semiconductor, and adjunct professor at CMU. I don't speak for them, and they don't speak for me.