Problems with Test
hintak_leung at yahoo.co.uk
Mon Nov 1 09:45:12 CDT 2010
--- On Mon, 1/11/10, James Mckenzie <jjmckenzie51 at earthlink.net> wrote:
> From: James Mckenzie <jjmckenzie51 at earthlink.net>
> Subject: Re: Problems with Test
> To: "Charles Davis" <cdavis at mymail.mines.edu>
> Cc: "wine-devel at winehq.org" <wine-devel at winehq.org>
> Date: Monday, 1 November, 2010, 14:26
> Charles Davis <cdavis at mymail.mines.edu>
> >On 10/31/10 9:23 PM, James McKenzie wrote:
> >> All:
> >> I'm trying to convert one integer number using a
> float number factor.
> >> Here is the code:
> >> int ry = 125;
> >> double ryf;
> >> ryf = ry/1440;
> Got it. I tried to cast ry to double, but that did
> not work. Guess my version of gcc has a problem or I
> did it wrong.
- ryf = ((double) ry)/1440; - should work#
- ryf = (double) ry/1440; - does not work, because it is equivalent to
"(double) (ry/1440) " (still integer division).
So it depends on how you did cast, really.
More information about the wine-devel