[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [SCICOMP] algoritme til pow(float, float);



"Mikael Rasmussen" <sslug@sslug> writes:

> Hejsa Sci-Slugger
> 
> Til nogle beregninger på en hjemmeside har jeg
> brug for at beregne pow(float x, float y), altså
> x^y hvor y = 0.8

> Beregningerne foregår i JavaScript og jeg har kun adgang
> til gængse regneregler (+-*/). Har prøvet at fremstille
> forskellige iterationer men det er ikke lykkedes mig at
> ramme "rigtigt", da x kan svinge fra 100 til 100000.

Jeg ved intet om javascript, men hvis man søger på nettet, finder man 
et math object. Kan man ikke bruge det?
http://www.google.com/search?q=javascript+pow
http://www.paschools.pa.sk.ca/javascript/math.htm

Hvis du har logeritmer kan du skrive
x^1/5 = exp(0.2 * log(x))

-- 
Niels L Ellegaard  http://dirac.ruc.dk/~gnalle/
SPECIAL OFFER! I proofread unsolicited commercial email sent to this
address at a rate of US $500.00 per incident!  Include billing address
in your message and save US $500.00 per hour off ordinary address
resolution and tracking charge!


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:34 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *