delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/17/10:01:04

Message-Id: <m0yExo7-000S2kC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr>, djgpp AT delorie DOT com
Date: Tue, 17 Mar 1998 11:59:44 +0000
MIME-Version: 1.0
Subject: Re: bug??!!?? using cast from double to int
In-reply-to: <350E6EAE.F8B6D5D0@trash.lip6.fr>

Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr> wrote:

> 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! :|

But perhaps the bit pattern stored in the double is invalid, but not the one in 
the float.

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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