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

Method atanh

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

Source from the content-addressed store, hash-verified

741 }
742
743 public Complex atanh() {
744 // atanh(z) = 1/2 * log( (1+z)/(1-z) )
745 double tempRe, tempIm;
746 Complex result = new Complex(1.0+re, im);
747 tempRe = 1.0-re;
748 tempIm = -im;
749 result = result.div(new Complex(tempRe, tempIm));
750 tempRe = Math.log(result.abs());
751 tempIm = result.arg();
752 result.re = 0.5*tempRe;
753 result.im = 0.5*tempIm;
754 return result;
755 }
756
757 /**
758 * Returns <tt>true</tt> if either the real or imaginary component of this

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected