/** * Compute the * <a href="http://mathworld.wolfram.com/SquareRoot.html" TARGET="_top"> * square root</a> of 1 - <code>this</code><sup>2</sup> for this complex * number. Computes the result directly as * <code>sqrt(Complex.ONE.subtract(z.multiply(z)))</code>. * * Returns {@link org.matheclipse.parser.client.math.Complex#NaN} if either * real or imaginary part of the input argument is <code>NaN</code>. * * Infinite values in real or imaginary parts of the input may result in * infinite or NaN values returned in parts of the result. * * @return the square root of 1 - <code>this</code><sup>2</sup> * @since 1.2 */ public Complex sqrt1z() { return createComplex( 1.0, 0.0 ).subtract( this.multiply( this ) ).sqrt(); }
/** * Compute the <a href="http://mathworld.wolfram.com/SquareRoot.html" * TARGET="_top"> square root</a> of 1 - <code>this</code><sup>2</sup> for * this complex number. * <p> * Computes the result directly as * <code>sqrt(Complex.ONE.subtract(z.multiply(z)))</code>. * </p> * <p> * Returns {@link Complex#NaN} if either real or imaginary part of the input * argument is <code>NaN</code>. * </p> * <p> * Infinite values in real or imaginary parts of the input may result in * infinite or NaN values returned in parts of the result. * </p> * * @return the square root of 1 - <code>this</code><sup>2</sup> * @since 1.2 */ public Complex sqrt1z() { return createComplex(1.0, 0.0).subtract(this.multiply(this)).sqrt(); }
/** * Compute the * <a href="http://mathworld.wolfram.com/InverseTangent.html" TARGET="_top"> * inverse tangent</a> of this complex number. Implements the formula: * * <pre> * <code> atan(z) = (i/2) log((i + z)/(i - z)) </code> * </pre> * * Returns {@link org.matheclipse.parser.client.math.Complex#NaN} if either * real or imaginary part of the input argument is <code>NaN</code> or * infinite. * * @return the inverse tangent of this complex number * @since 1.2 */ public Complex atan() { if ( isNaN() ) { return Complex.NaN; } return this.add( Complex.I ).divide( Complex.I.subtract( this ) ).log().multiply( Complex.I.divide( createComplex( 2.0, 0.0 ) ) ); }
/** * Compute the <a href="http://mathworld.wolfram.com/InverseTangent.html" * TARGET="_top"> inverse tangent</a> of this complex number. * <p> * Implements the formula: * * <pre> * <code> atan(z) = (i/2) log((i + z)/(i - z)) </code> * </pre> * * </p> * <p> * Returns {@link Complex#NaN} if either real or imaginary part of the input * argument is <code>NaN</code> or infinite. * </p> * * @return the inverse tangent of this complex number * @since 1.2 */ public Complex atan() { if (isNaN()) { return Complex.NaN; } return this.add(Complex.I).divide(Complex.I.subtract(this)).log().multiply(Complex.I.divide(createComplex(2.0, 0.0))); }