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

Method asin

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

Source from the content-addressed store, hash-verified

598 //------------------------------------------------------------------------
599 // Inverse trigonometric functions
600 public Complex asin() {
601 Complex result;
602 double tempRe, tempIm;
603 // asin(z) = -i * log(i*z + sqrt(1 - z*z))
604 tempRe = 1.0-((re*re)-(im*im));
605 tempIm = 0.0-((re*im)+(im*re));
606 result = new Complex(tempRe, tempIm);
607 result = result.sqrt();
608 result.re += -im;
609 result.im += re;
610 tempRe = Math.log(result.abs());
611 tempIm = result.arg();
612 result.re = tempIm;
613 result.im = -tempRe;
614 return result;
615 }
616
617 public Complex acos() {
618 Complex result;

Callers 4

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

Calls 4

sqrtMethod · 0.95
absMethod · 0.95
argMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected