/** * Evaluate. * * @param arg1 the arg 1 * @return the complex */ @Override public Complex evaluate( Complex arg1 ) { return arg1.log();// ComplexUtils.log(arg1); }
public Complex evaluate(Complex arg1) { return arg1.log();// ComplexUtils.log(arg1); }
/** * Returns of value of this complex number raised to the power of * <code>x</code>. Implements the formula: * * <pre> * <code> y<sup>x</sup> = exp(x·log(y))</code> * </pre> * * where <code>exp</code> and <code>log</code> are {@link #exp} and * {@link #log}, respectively. * * 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, or if <code>y</code> equals * {@link org.matheclipse.parser.client.math.Complex#ZERO}. * * @param x the exponent. * @return <code>this</code><sup><code>x</code></sup> * @throws java.lang.NullPointerException if x is null * @since 1.2 */ public Complex pow( Complex x ) { if ( x == null ) { throw new NullPointerException(); } return this.log().multiply( x ).exp(); }
return this.log().multiply(x).exp();
/** * Compute the * <a href="http://mathworld.wolfram.com/InverseCosine.html" TARGET="_top"> * inverse cosine</a> of this complex number. Implements the formula: * * <pre> * <code> acos(z) = -i (log(z + i (sqrt(1 - z<sup>2</sup>))))</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 cosine of this complex number * @since 1.2 */ public Complex acos() { if ( isNaN() ) { return Complex.NaN; } return this.add( this.sqrt1z().multiply( Complex.I ) ).log().multiply( Complex.I.negate() ); }
/** * Compute the * <a href="http://mathworld.wolfram.com/InverseSine.html" TARGET="_top"> * inverse sine</a> of this complex number. Implements the formula: * * <pre> * <code> asin(z) = -i (log(sqrt(1 - z<sup>2</sup>) + iz)) </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 sine of this complex number. * @since 1.2 */ public Complex asin() { if ( isNaN() ) { return Complex.NaN; } return sqrt1z().add( this.multiply( Complex.I ) ).log().multiply( Complex.I.negate() ); }
/** * Compute the <a href="http://mathworld.wolfram.com/InverseCosine.html" * TARGET="_top"> inverse cosine</a> of this complex number. * <p> * Implements the formula: * * <pre> * <code> acos(z) = -i (log(z + i (sqrt(1 - z<sup>2</sup>))))</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 cosine of this complex number * @since 1.2 */ public Complex acos() { if (isNaN()) { return Complex.NaN; } return this.add(this.sqrt1z().multiply(Complex.I)).log().multiply(Complex.I.negate()); }
/** * Compute the <a href="http://mathworld.wolfram.com/InverseSine.html" * TARGET="_top"> inverse sine</a> of this complex number. * <p> * Implements the formula: * * <pre> * <code> asin(z) = -i (log(sqrt(1 - z<sup>2</sup>) + iz)) </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 sine of this complex number. * @since 1.2 */ public Complex asin() { if (isNaN()) { return Complex.NaN; } return sqrt1z().add(this.multiply(Complex.I)).log().multiply(Complex.I.negate()); }
/** * 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))); }