🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #433

Bug in Rational class of g++-2.3

#433
From: Stefan Naeher
Date: Fri, 08 Jan 1993 11:49
23 lines
1155 bytes
Class Rational seems to have problems with zero values, e.g., the following 
program exits with the error message "Rational Error: Zero denominator"


#include <Rational.h>

main()
{
  Rational r1 = 17;

  Rational r = r1 - 0;
}

Is this a known bug, can it be fixed easily ?


-------------------------------------------------------------------------------
Stefan N"aher                                      e-mail: stefan@mpi-sb.mpg.de
Max-Planck-Institut f"ur Informatik                phone:  +49 681 302 5420
Im Stadtwald                                       fax:    +49 681 302 5401
6600 Saarbr"ucken
Germany
-------------------------------------------------------------------------------
Technical Details
Message-ID: <23686@sbsvax.cs.uni-sb.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mpi-sb.mpg.de!stefan

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.lib.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mpi-sb.mpg.de!stefan
From: stefan@mpi-sb.mpg.de (Stefan Naeher)
Subject: Bug in Rational class of g++-2.3
Message-ID: <23686@sbsvax.cs.uni-sb.de>
Sender: gnulists@ai.mit.edu
Reply-To: stefan@mpi-sb.mpg.de
Organization: Max-Planck Institut fuer Informatik
Distribution: gnu
Date: Fri, 8 Jan 1993 11:49:31 GMT
Approved: bug-lib-g++@prep.ai.mit.edu
Lines: 26