Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site linus.UUCP Path: utzoo!linus!bs From: bs@linus.UUCP (Robert D. Silverman) Newsgroups: net.lang.c Subject: Re: Exponetiation Message-ID: <174@linus.UUCP> Date: Wed, 25-Jun-86 14:52:47 EDT Article-I.D.: linus.174 Posted: Wed Jun 25 14:52:47 1986 Date-Received: Fri, 27-Jun-86 03:12:33 EDT References: <366@bucsb.bu.edu.UUCP> <5664@alice.uUCp> Organization: The MITRE Corporation, Bedford, MA Lines: 12 > > 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