public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/5580: double
@ 2002-02-05 1:06 Richard Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2002-02-05 1:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR other/5580; it has been noted by GNATS.
From: Richard Henderson <rth@redhat.com>
To: x-tronic@ji.cz
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: other/5580: double
Date: Tue, 5 Feb 2002 01:02:30 -0800
On Sun, Feb 03, 2002 at 01:04:01PM -0000, x-tronic@ji.cz wrote:
> double d1=40/12;
> double d2=40/12.00;
>
> d1 is 3 (???)
> d2 is 3.333 (as it should)
Not a bug. This is
double d1 = (double)((int)40 / (int)12);
not
double d1 = (double)40 / (double)12;
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: other/5580: double
@ 2002-02-05 2:21 nathan
0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2002-02-05 2:21 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, x-tronic
Synopsis: double
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Tue Feb 5 02:21:06 2002
State-Changed-Why:
not a bug. refer to the definition of the / operator
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5580
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: other/5580: double
@ 2002-02-04 12:06 Andrew Pinski
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Pinski @ 2002-02-04 12:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR other/5580; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: x-tronic@ji.cz
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: other/5580: double
Date: Mon, 4 Feb 2002 14:56:25 -0500
please close this; as this is not a bug but
a problem with the programmer not knowing
that a number without a decimal point is an integer
and does not get converted to a double unless it is
in an operation with a double.
Thanks,
Andrew Pinski
On Sunday, February 3, 2002, at 08:04 , x-tronic@ji.cz wrote:
>
>> Number: 5580
>> Category: other
>> Synopsis: double
>> Confidential: no
>> Severity: non-critical
>> Priority: medium
>> Responsible: unassigned
>> State: open
>> Class: sw-bug
>> Submitter-Id: net
>> Arrival-Date: Mon Feb 04 11:06:01 PST 2002
>> Closed-Date:
>> Last-Modified:
>> Originator: x-tronic@ji.cz
>> Release: gcc 2.96 20000731
>> Organization:
>> Environment:
> RedHat Linux 7.2
>> Description:
> double d1=40/12;
> double d2=40/12.00;
>
> d1 is 3 (???)
> d2 is 3.333 (as it should)
>
> leads to serious bugs in applications
>> How-To-Repeat:
>
>> Fix:
>
>> Release-Note:
>> Audit-Trail:
>> Unformatted:
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* other/5580: double
@ 2002-02-04 11:06 x-tronic
0 siblings, 0 replies; 4+ messages in thread
From: x-tronic @ 2002-02-04 11:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 5580
>Category: other
>Synopsis: double
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 04 11:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: x-tronic@ji.cz
>Release: gcc 2.96 20000731
>Organization:
>Environment:
RedHat Linux 7.2
>Description:
double d1=40/12;
double d2=40/12.00;
d1 is 3 (???)
d2 is 3.333 (as it should)
leads to serious bugs in applications
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-02-05 10:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05 1:06 other/5580: double Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2002-02-05 2:21 nathan
2002-02-04 12:06 Andrew Pinski
2002-02-04 11:06 x-tronic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).