Logarithm function

kinghajj kinghajj_member at pathlink.com
Sat Apr 22 00:03:26 PDT 2006


I noticed that there is no logarithm function in std.math that allows for any
base. Seeing how it would be simple to make one, I did:

[code]
import std.math;

real log(real b, real n)
{
return std.math.log(n)/std.math.log(b);
}
[/code]





More information about the Digitalmars-d mailing list