This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] PATCH -- Fix for PR 15619


On Sun, May 30, 2004 at 09:24:19AM -0700, Steve Kargl wrote:
> On Sun, May 30, 2004 at 11:52:51AM +0100, Paul Brook wrote:
> > > See attached.
> > > fortran.diff is applied to gcc/fortran.
> > > random.c.diff is applied to random.c
> > 
> > I tweaked the int->float conversion routines, and applied as follows.
> > 
> > Paul
> > 
> 
> Thanks!  But, your tweaking has broken the REAL(8) version.
> 

I also failed to point out that your tweak has invalidated the comments 
concerning the numerical range of [0,1).  The new numerical range with
your code is (0,1].

      kiss = kiss_random_kernel ();
      *x = (GFC_REAL_4)kiss / (GFC_REAL_4)(~(GFC_UINTEGER_4) 0);

kiss falls into the range [1,~(GFC_UINTEGER_4) 0].

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]