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

Method atan

src/org/opensourcephysics/numerics/Complex.java:636–648  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

634 }
635
636 public Complex atan() {
637 // atan(z) = -i/2 * log((i-z)/(i+z))
638 double tempRe, tempIm;
639 Complex result = new Complex(-re, 1.0-im);
640 tempRe = re;
641 tempIm = 1.0+im;
642 result = result.div(new Complex(tempRe, tempIm));
643 tempRe = Math.log(result.abs());
644 tempIm = result.arg();
645 result.re = 0.5*tempIm;
646 result.im = -0.5*tempRe;
647 return result;
648 }
649
650 //------------------------------------------------------------------------
651 // Hyperbolic trigonometric functions

Callers 5

getAngleAtRadiusMethod · 0.80
refreshScaleMethod · 0.80
getSourcePointMethod · 0.80
builtInFunctionMethod · 0.80
builtInFunctionMethod · 0.80

Calls 4

divMethod · 0.95
absMethod · 0.95
argMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected