MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / pow

Method pow

src/org/opensourcephysics/numerics/Complex.java:411–420  ·  view source on GitHub ↗
(Complex base, double exponent)

Source from the content-addressed store, hash-verified

409 }
410
411 public static Complex pow (Complex base, double exponent) {
412 // return base.log().scale(exponent).exp();
413
414 double re = exponent * Math.log(base.abs());
415 double im = exponent * base.arg();
416
417 double scalar = Math.exp(re);
418
419 return cart( scalar * Math.cos(im), scalar * Math.sin(im) );
420 }//end pow(Complex,double)
421
422
423 /**

Callers 15

mouseDraggedMethod · 0.80
roundMethod · 0.80
loadImagesMethod · 0.80
getStackPathsMethod · 0.80
getImageSequencePathsMethod · 0.80
builtInExtFunctionMethod · 0.80
isNonLeftMethod · 0.80
pixToXMethod · 0.80
pixToYMethod · 0.80
drawPlotMethod · 0.80
formatLogNumMethod · 0.80

Calls 7

cartMethod · 0.95
absMethod · 0.80
argMethod · 0.80
expMethod · 0.80
logMethod · 0.45
cosMethod · 0.45
sinMethod · 0.45

Tested by

no test coverage detected