2011/11/23 Ozkan Sezer <[email protected]>:
> On Tue, Nov 22, 2011 at 11:30 PM, Prof Brian Ripley
> <[email protected]> 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,                  [email protected]
>> 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 value-ranges 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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to