Exponetiation
Robert D. Silverman
bs at linus.UUCP
Thu Jun 26 04:52:47 AEST 1986
> > I'm confused. I've been trying to figure out a quick and easy way
> > to exponetiate to a fraction (ie. x^(4.25)) and also be able to
> > figure out the power when given the base and the result.
>
> a^b is exp(b*ln(a)). So, if x = a^b and you know a and x,
>
> exp(b*ln(a)) = x
> b * ln(a) = ln(x)
> b = ln(x) / ln(a)
Better make sure that a,x > 0 before using this well known trick.
Bob Silverman
More information about the Comp.lang.c
mailing list