Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Prof Brian Ripley <ripley@st...>  20111122 22:09:38

Assuming you are still updating 1.0, this comes from a bug report on R built with a toolchain from Sept 2010 (but the bug is still present in the 1.0 branch). Suppose x is what is called in the C code MAXNUM, the maximum normalized double. Then pow(x, y) is computed as INF for 0 < y <= 1, when it should be a perfectly good normalized double. The bug is at line 382 of pow.c, which has if (x >= MAXNUM) { #if INFINITIES if (y > 0.0) return (INFINITY); #else if (y > 0.0) return (MAXNUM); #endif return (0.0); } It should of course be x > MAXNUM. There is a similar problem at line 410, which should be x < MAXNUM . The code in 2.0 and trunk is completely different, and does these corner cases correctly.  Brian D. Ripley, ripley@... Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 
From: Ozkan Sezer <sezeroz@gm...>  20111123 07:18:36

On Tue, Nov 22, 2011 at 11:30 PM, Prof Brian Ripley <ripley@...> wrote: > Assuming you are still updating 1.0, this comes from a bug report on > R built with a toolchain from Sept 2010 (but the bug is still present > in the 1.0 branch). > > Suppose x is what is called in the C code MAXNUM, the maximum > normalized double. Then pow(x, y) is computed as INF for 0 < y <= 1, > when it should be a perfectly good normalized double. The bug is at > line 382 of pow.c, which has > > if (x >= MAXNUM) > { > #if INFINITIES > if (y > 0.0) > return (INFINITY); > #else > if (y > 0.0) > return (MAXNUM); > #endif > return (0.0); > } > > It should of course be x > MAXNUM. > > There is a similar problem at line 410, which should be x < MAXNUM . > > The code in 2.0 and trunk is completely different, and does these > corner cases correctly. > >  > Brian D. Ripley, ripley@... > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 Kai: can you approve that the changes are correct?  O.S. 
From: Kai Tietz <ktietz70@go...>  20111123 07:54:12

2011/11/23 Ozkan Sezer <sezeroz@...>: > On Tue, Nov 22, 2011 at 11:30 PM, Prof Brian Ripley > <ripley@...> wrote: >> Assuming you are still updating 1.0, this comes from a bug report on >> R built with a toolchain from Sept 2010 (but the bug is still present >> in the 1.0 branch). >> >> Suppose x is what is called in the C code MAXNUM, the maximum >> normalized double. Then pow(x, y) is computed as INF for 0 < y <= 1, >> when it should be a perfectly good normalized double. The bug is at >> line 382 of pow.c, which has >> >> if (x >= MAXNUM) >> { >> #if INFINITIES >> if (y > 0.0) >> return (INFINITY); >> #else >> if (y > 0.0) >> return (MAXNUM); >> #endif >> return (0.0); >> } >> >> It should of course be x > MAXNUM. >> >> There is a similar problem at line 410, which should be x < MAXNUM . >> >> The code in 2.0 and trunk is completely different, and does these >> corner cases correctly. >> >>  >> Brian D. Ripley, ripley@... >> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >> University of Oxford, Tel: +44 1865 272861 (self) >> 1 South Parks Road, +44 1865 272866 (PA) >> Oxford OX1 3TG, UK Fax: +44 1865 272595 > > Kai: can you approve that the changes are correct? > >  > O.S. Hi Ozkan, Yes, for my understanding of valid valueranges here, the the check should be indeed x > MAXNUM. Brian is right. Otherwise we disallow the case for MAXNUM. A patch for this is approved. Kai 
From: Ozkan Sezer <sezeroz@gm...>  20111123 08:16:33

On Wed, Nov 23, 2011 at 9:54 AM, Kai Tietz <ktietz70@...> wrote: > 2011/11/23 Ozkan Sezer <sezeroz@...>: >> On Tue, Nov 22, 2011 at 11:30 PM, Prof Brian Ripley >> <ripley@...> wrote: >>> Assuming you are still updating 1.0, this comes from a bug report on >>> R built with a toolchain from Sept 2010 (but the bug is still present >>> in the 1.0 branch). >>> >>> Suppose x is what is called in the C code MAXNUM, the maximum >>> normalized double. Then pow(x, y) is computed as INF for 0 < y <= 1, >>> when it should be a perfectly good normalized double. The bug is at >>> line 382 of pow.c, which has >>> >>> if (x >= MAXNUM) >>> { >>> #if INFINITIES >>> if (y > 0.0) >>> return (INFINITY); >>> #else >>> if (y > 0.0) >>> return (MAXNUM); >>> #endif >>> return (0.0); >>> } >>> >>> It should of course be x > MAXNUM. >>> >>> There is a similar problem at line 410, which should be x < MAXNUM . >>> >>> The code in 2.0 and trunk is completely different, and does these >>> corner cases correctly. >>> >>>  >>> Brian D. Ripley, ripley@... >>> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ >>> University of Oxford, Tel: +44 1865 272861 (self) >>> 1 South Parks Road, +44 1865 272866 (PA) >>> Oxford OX1 3TG, UK Fax: +44 1865 272595 >> >> Kai: can you approve that the changes are correct? >> >>  >> O.S. > > Hi Ozkan, > > Yes, for my understanding of valid valueranges here, the the check > should be indeed x > MAXNUM. Brian is right. Otherwise we disallow > the case for MAXNUM. > > A patch for this is approved. > > Kai > Applied rev. 4636 http://mingww64.svn.sourceforge.net/viewvc/mingww64?view=revision&revision=4636  O.S. 
Sign up for the SourceForge newsletter:
No, thanks