🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2591

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

#2591
From: Neil Tungate
Date: Sat, 07 Oct 1995 22:55
21 lines
1490 bytes
seh@seh.codem.com (Stephen E. Halpin) wrote:

>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.

As a naturally cautious type when programming, I would have written:

(2^31)*(4/32)

as a matter of course. This style makes equations easier to read, and
also helps the compiler. ie I am forcing the order of execution at all
times and can therefore ignore compiler nuances :-)

-- 
Neil              Team ( Ada => UK )
http://uptown.turnpike.net/~skipper/
Technical Details
Message-ID: <813106607.29468@skipper.demon.co.uk>
Path: arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!skipper.demon.co.uk
References: <Pine.SUN.3.91.951005003000.1000A-100000-100000-100000@lagrange.uwaterloo.ca> <4540ha$hqn@regina.seh.codem.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!skipper.demon.co.uk
From: neil@skipper.demon.co.uk (Neil Tungate)
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: Sat, 07 Oct 1995 22:55:21 GMT
Organization: dnt
Message-ID: <813106607.29468@skipper.demon.co.uk>
References: <Pine.SUN.3.91.951005003000.1000A-100000-100000-100000@lagrange.uwaterloo.ca> <4540ha$hqn@regina.seh.codem.com>
NNTP-Posting-Host: skipper.demon.co.uk
X-NNTP-Posting-Host: skipper.demon.co.uk
X-Newsreader: Forte Agent .99b.112