delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/17/07:45:47

From: Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: bug??!!?? using cast from double to int
Date: Tue, 17 Mar 1998 13:38:06 +0100
Organization: Universites Paris VI/Paris VII - France
Lines: 73
Message-ID: <350E6EAE.F8B6D5D0@trash.lip6.fr>
References: <m0yEagz-000S2iC AT inti DOT gov DOT ar>
NNTP-Posting-Host: asim.lip6.fr
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

--------------086722843B077F1A51781A72
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Salvador Eduardo Tropea (SET) wrote:

> Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr> wrote:
>
> >       I've downloaded the "ncurve3" program from that create curves. It uses
> > doubles for coordonates but I cast them to int for my purpose.
> > Sometimes, my prog exist on FPE. I don't know why! (it's really the
> > cast) . So i changed the doubles to floats and it works well.
> > Question: is it a gcc bug?
>
> Are you sure that that's the problem?
> Are the values correct, I mean: are valid numbers? (no infinite, etc).
>

    it's a good remark, I'll try to get the doubles values. But that do not
explain why it works now with floats! :|

> SET
> ------------------------------------ 0 --------------------------------

--
        ^ ^ ^
        | | |
        +-+-+   Fabrice ILPONSE
          |
          |
          |
          -



--------------086722843B077F1A51781A72
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Salvador Eduardo Tropea (SET) wrote:
<BLOCKQUOTE TYPE=CITE>Fabrice ILPONSE &lt;fabrice AT trash DOT lip6 DOT fr> wrote:

<P>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I've downloaded the "ncurve3"
program from that create curves. It uses
<BR>> doubles for coordonates but I cast them to int for my purpose.
<BR>> Sometimes, my prog exist on FPE. I don't know why! (it's really the
<BR>> cast) . So i changed the doubles to floats and it works well.
<BR>> Question: is it a gcc bug?

<P>Are you sure that that's the problem?
<BR>Are the values correct, I mean: are valid numbers? (no infinite, etc).
<BR>&nbsp;</BLOCKQUOTE>
&nbsp;&nbsp;&nbsp; it's a good remark, I'll try to get the doubles values.
But that do not explain why it works now with floats! :|
<BLOCKQUOTE TYPE=CITE>

<P>SET
<BR>------------------------------------ 0 --------------------------------</BLOCKQUOTE>

<PRE>--&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^ ^ ^
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | | |
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+-+&nbsp;&nbsp; Fabrice ILPONSE
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<fabrice AT asim DOT lip6 DOT fr>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -</PRE>
&nbsp;</HTML>

--------------086722843B077F1A51781A72--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019