Article View: comp.lang.misc
Article #220Re: Types, arrays, generality, and notation (was: Fortran90 and Arrays)
From: Raul Deluth Miller-Rockwell
Date: Wed, 15 Apr 1992 14:40
Date: Wed, 15 Apr 1992 14:40
30 lines
2222 bytes
2222 bytes
Stephen P Spackman: (sorry about messing up attribution, earlier)
| ||> [... reduction on empty array ...]
| ||> Nono, you missed the point. Some operations (like "+") make
| ||> SENSE for empty arrays, and there you supply the
| ||> appropriate value (0). Others (like "min") only make sense
| ||> on an empty array in an extended domain (for present
| ||> purposes: don't make sense) and so you REQUIRE at least one
| ||> element, ...
Me:
|I've been hoping some one else would bring this up, but: what kind
|of implementation is this, where you've got a numeric type but no
|maximum element of that type? I wasn't aware that could happen
|with a finite set of numbers -- at least, not for the case where
|those numbers are members of the set of real numbers.
That's not the point. The point is that if I say min({}) and you
say -32768, you are WRONG.
No kidding. If your system, or your implementation of sets, only
allows 16 bit signed integers then the answer should be 32767. If
your system allows ieee floating point, then the answer should be
positive infinity.
You're right, it's trivial to show that -32768 is not an identity
element, try min(0, -32768). But I don't see why you think that
-32768 is a maximum element for your numeric type.
--
Raul Deluth Miller-Rockwell <rockwell@socrates.umd.edu>
Technical Details
Message-ID:
<ROCKWELL.92Apr15094037@socrates.umd.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!socrates!rockwellReferences:
<ROCKWELL.92Mar21001252@socrates.umd.edu> <STEPHEN.92Apr11043808@estragon.uchicago.edu> <1992Apr13.194947.17250@newshost.lanl.gov> <STEPHEN.92Apr14171919@estragon.uchicago.edu> <ROCKWELL.92Apr15002308@socrates.umd.edu> <STEPHEN.92Apr15014148@estragon.uchicago.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) Subject: Re: Types, arrays, generality, and notation (was: Fortran90 and Arrays) In-Reply-To: stephen@estragon.uchicago.edu's message of 15 Apr 92 06:41:40 GMT Message-ID: <ROCKWELL.92Apr15094037@socrates.umd.edu> Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) Organization: Traveller References: <ROCKWELL.92Mar21001252@socrates.umd.edu> <STEPHEN.92Apr11043808@estragon.uchicago.edu> <1992Apr13.194947.17250@newshost.lanl.gov> <STEPHEN.92Apr14171919@estragon.uchicago.edu> <ROCKWELL.92Apr15002308@socrates.umd.edu> <STEPHEN.92Apr15014148@estragon.uchicago.edu> Date: Wed, 15 Apr 1992 14:40:37 GMT Lines: 30