🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2603

Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)

#2603
From: Robert Dewar
Date: Tue, 10 Oct 1995 14:40
14 lines
1380 bytes
:> Something is better than nothing, as long as you dont get a false sense
> of security from it.  Im more concerned about boundary behavior, ie what
> happens with (2^31)*4/32..  When executed in order, it should really
> produce an exception - veriants of C which dont optimize to (2^31)/8
> return 0 and go on their merry way...  The simple truth of the matter
> is you have to know something about the underlying machine in almost any
> language.

It is interesting to note that in Ada 95, an expression like
(2**31)*4/32

is a static expression and therefore requird to be evaluated exactly without
intermediate overflow. This rule is precisely to take care of the "more
concerned" of the writer.
Technical Details
Message-ID: <dewar.813335969@schonberg>
Path: arc1-ca.pugleaf.net!news.mathworks.com!panix!cmcl2!schonberg!dewar
References: <Pine.SUN.3.91.951005003000.1000A-100000-100000-100000@lagrange.uwaterloo.ca> <4540ha$hqn@regina.seh.codem.com> <Pine.SUN.3.91.951009165821.27682A-100000@lagrange.uwaterloo.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.mathworks.com!panix!cmcl2!schonberg!dewar
From: dewar@cs.nyu.edu (Robert Dewar)
Newsgroups: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++,comp.lang.ada
Subject: Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)
Date: 10 Oct 1995 10:40:42 -0400
Organization: Courant Institute of Mathematical Sciences
Message-ID: <dewar.813335969@schonberg>
References: <Pine.SUN.3.91.951005003000.1000A-100000-100000-100000@lagrange.uwaterloo.ca> <4540ha$hqn@regina.seh.codem.com>  <Pine.SUN.3.91.951009165821.27682A-100000@lagrange.uwaterloo.ca>
NNTP-Posting-Host: schonberg.cs.nyu.edu
X-Newsreader: NN version 6.5.0 (NOV)