Re: [pure-lang-users] math.pure
Status: Beta
Brought to you by:
agraef
From: me22 <me...@gm...> - 2008-06-28 20:28:56
|
On Sat, Jun 28, 2008 at 16:13, Albert Graef <Dr....@t-...> wrote: > Eddie Rucker wrote: >> However, instead of log x being the log base 10 how about >> >> log b::int x::double | log b::bigint x::double = ln x / ln b; > > Seems useful. Well, log is customary for base 10 logarithms, at least on > this side of the Atlantic. I could rename that function to log10, though > (that's also how it's called in Python). Or we could use log (x,b) or > log (b,x) for a logarithm with given base (but that would take away the > possibility to curry, which is pretty useful with your definition). > Opinions? > I'd say "customary" depends greatly on context. Without a base, I think it should be natural, for consistency with C and my math profs. I really like the curried version, though. |