🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.objects
Article #4928

Re: dzielenie przez zero

#4928
From: Marcin Bilski
Date: Thu, 11 Feb 1999 22:57
25 lines
1875 bytes
Z draft'u:

"5 If during the evaluation of an expression, the result is not mathemat-
  ically  defined  or  not  in the range of representable values for its
  type, the behavior is undefined, unless such an expression is  a  con-
  stant  expression  (_expr.const_),  in  which case the program is ill-
  formed.  [Note: most existing implementations of  C++  ignore  integer

  overflows.  Treatment of division by zero, forming a remainder using a
  zero divisor, and all floating point exceptions vary  among  machines,
  and is usually adjustable by a library function.  ]"


Jaros³aw S³awiñski wrote:

> Nie dostalem odpowiedzi z listy pl.comp.lang.c co do takiej kwestii:
> float a, b, c;
> a = 10.0;
> b = 0.0;
> c = a/b;
> i w c jest teraz to co w a, czyli 10.0. To nie ma znaczenia, ze sa
> wpisane w programie wartosci zmiennych. Mozna wczytac je z klawiatury,
> bedzie to samo - w komp. BC++3.1 i jak ktos tam mnie poinformowal w
> MSVC++. Czy jest to normalne, czy to jakies bledy? Moze tu ktos mnie
> oswieci?
Technical Details
Message-ID: <36C360A0.9CD3D220@mindless.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!news.wnaft.agh.edu.pl!news.memax.krakow.pl!paa.gov.pl!news.swierk.pl!news.icm.edu.pl!orion.cst.tpsa.pl!news.tpnet.pl!not-for-mail
References: <36BF3D67.841C4B34@ds2.pg.gda.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!news.wnaft.agh.edu.pl!news.memax.krakow.pl!paa.gov.pl!news.swierk.pl!news.icm.edu.pl!orion.cst.tpsa.pl!news.tpnet.pl!not-for-mail
Message-ID: <36C360A0.9CD3D220@mindless.com>
From: Marcin Bilski <bilus@mindless.com>
X-Mailer: Mozilla 4.08 [en] (WinNT; I)
MIME-Version: 1.0
Newsgroups: pl.comp.objects
Subject: Re: dzielenie przez zero
References: <36BF3D67.841C4B34@ds2.pg.gda.pl>
Lines: 26
Date: Thu, 11 Feb 1999 22:57:32 GMT
NNTP-Posting-Host: 195.117.32.167
X-Complaints-To: abuse@tpsa.pl
X-Trace: news.tpnet.pl 918773852 195.117.32.167 (Thu, 11 Feb 1999 23:57:32 MET DST)
NNTP-Posting-Date: Thu, 11 Feb 1999 23:57:32 MET DST
Organization: TPNET - http://www.tpnet.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit