Skip to content
Prev 58690 / 398502 Next

About 'choose' function


        
Ted> On 08-Nov-04 Duncan Murdoch wrote:
>> On Mon, 08 Nov 2004 15:56:49 -0000 (GMT), (Ted Harding)
    >> <Ted.Harding at nessie.mcc.ac.uk> wrote :
    >> 
    >>> Further investigation indicates that there is an integer
    >>> truncation problem with 'choose':
    >>> 
    >>> > print(choose(60000000000,1),digits=20) [1]
    >>> 60001679906.00000 >
    >>> print(my.choose3(60000000000,1),digits=20) [1] 6e+10
    >>  Are you sure you're using the standard R choose()?  I
    >> get different results from you:
    >> 
    >>> print(choose(60000000000,1),digits=20)
    >> [1] 6e+10
    >> 
    >> What platform are you using?  I did this is Windows R
    >> 2.0.0, and get the same result in the beta of 2.0.1.

    Ted> Well, that's good to learn! As usual, I'm out of date,
    Ted> but this time it seems to matter:

    Ted>   R-1.8.0 on Linux

    Ted> (Yes, it was the standard R choose() from that
    Ted> version).

    Ted> Perhaps I'd better roll up my sleeves and finally
    Ted> upgrade (though I'm really waiting for the next release
    Ted> since the move to 2.0 seems to have needed a few things
    Ted> ironed out).

well, yes, but there are so many (mostly small) things that we
have ironed out in R since version 1.8.0....

The "NEWS" of 1.9.0 and 1.9.1 are already in file "ONEWS" (=
"Old News") and do contain
Ted> Thanks for the cross-check, Duncan.  
indeed!

Martin