From: Phrogz Date: 2007-02-08T08:15:07+09:00 Subject: Re: Adding Math.log2 and Math.logn to the core library. On Feb 7, 4:07 pm, "Martin DeMello" wrote: > On 2/8/07, Morton Goldberg wrote: > > > On Feb 7, 2007, at 2:50 PM, Phrogz wrote: > > > > Ideally they'd be implemented in C, but of course the simple Ruby > > > implementation is just: > > > def Math.log2( x ); Math.log( x ) / Math.log( 2 ); end > > > def Math.logn( x, n ); Math.log( x ) / Math.log( n ); end > > > I second the motion. > > > The log2 function is now in the C math library, so I think it would > > easy to add it the Ruby Math library. I would like see log for > > And while we're at it, I'd really like to see log aliased to ln Thank you, yes. I thought I was the only one for whom "log" implied base 2 or 10.