comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Pilgrim <simon.pilgrim@gecm.com>
Subject: Re: Renaming Fixed Point Mutiplicative operator in Ada 95
Date: 1998/05/21
Date: 1998-05-21T00:00:00+00:00	[thread overview]
Message-ID: <3564A1ED.3DAC@gecm.com> (raw)
In-Reply-To: dewar.895785693@merv


Robert Dewar wrote:
<< Incidentally, in a critical system, I would jolly well hope that
EITHER

  a) you prove that division by zero cannot happen

 or

  b) you test for it explicitly
 
     if z = 0 then
         ....
     else
         a := y /z;
     end if;           >> 

It is not sufficient to just check for equality to zero with fixed point
types.  If z is small enough then a divide by zero exception will still
be generated by some targets (Intel 486 & Motorola 68k for example).

Regards,

Simon Pilgrim




  reply	other threads:[~1998-05-21  0:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-19  0:00 Renaming Fixed Point Mutiplicative operator in Ada 95 Stuart Hutchesson
1998-05-19  0:00 ` Matthew Heaney
1998-05-20  0:00   ` Robert Dewar
     [not found]     ` <matthew_heaney-ya023680002005981908570001@news.ni.net>
1998-05-21  0:00       ` Robert Dewar
1998-05-22  0:00         ` Robert I. Eachus
1998-05-23  0:00           ` Robert Dewar
     [not found]       ` <01bd84c3$47215d60$440029a1@m00rq900>
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00           ` Simon Pilgrim [this message]
1998-05-21  0:00             ` Matthew Heaney
1998-05-22  0:00               ` Robert I. Eachus
1998-05-22  0:00           ` Stuart Hutchesson
1998-05-22  0:00             ` Matthew Heaney
1998-05-23  0:00             ` Robert Dewar
1998-05-22  0:00           ` Rod Chapman
1998-05-22  0:00             ` John McCabe
1998-05-21  0:00         ` Matthew Heaney
1998-05-21  0:00         ` Robert Dewar
1998-05-21  0:00       ` John McCabe
1998-05-21  0:00         ` Matthew Heaney
1998-05-21  0:00         ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox