From: "Mauricio Fernández" Date: 2004-04-23T16:15:53+09:00 Subject: Re: log base 2 and floats that don't look it On Fri, Apr 23, 2004 at 03:54:10PM +0900, Phil Tomson wrote: > 2 things: > > 1) Why isn't there a log base 2 function in the standard Math library? > Seems pretty essential. >> module Math; def log2(x); log(x)/log(2) end; module_function :log2 end => Math >> (0..10).map{|x| 2 ** x}.map{|x| Math.log2(x)} => [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0] -- Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com "You, sir, are nothing but a pathetically lame salesdroid! I fart in your general direction!" -- Randseed on #Linux