Re: [Haskell] for large x, log (x::Integer) :: Double

2004-07-05 Thread Edmund GRIMLEY EVANS
Dylan Thurston: > For those who aren't aware: working with logs base 2 internally will > be very much faster than logs base 10, since the numbers are stored > internally in a base-2 representation. (Note that 'show' converts to > base 10, which involves a large number of divisions in the easy > a

Re: [Haskell] for large x, log (x::Integer) :: Double

2004-07-05 Thread Axel Simon
On Sun, Jul 04, 2004 at 12:32:39PM +0200, Dylan Thurston wrote: > On Wed, Jun 30, 2004 at 03:07:00PM -0700, Greg Buchholz wrote: > > -- Inspired from Mr. Howard Oakley. Might not qualify as "good", > > -- but with this function I get log10(x)=849.114419903382 > > ... > > For those who aren't awa

[Haskell] Overriding Prelude functions

2004-07-05 Thread André Pang
Hi all, Inspired by a bit of hackery today, I managed to find a nice way to re-define Prelude functions in modular way. There may be some functions in the Prelude that you would like to redefine: in this example, we redefine the "lookup" function, which normally has a type signature of look