Exponetiation

Andrew Koenig ark at alice.UucP
Thu Jun 19 23:51:37 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)



More information about the Comp.lang.c mailing list