acos method

MathComplex acos()

Implementation

MathComplex acos(){
	if( _im == 0.0 ){
		if( (_re < -1.0) || (_re > 1.0) ){
			if( ClipMath.complexIsReal() ){
				ClipMath.setComplexError();
				return floatToComplex( facos( _re ) );
			}
		} else {
			return floatToComplex( facos( _re ) );
		}
	}
/*
	// -i * log( this + sqrt( sqr() - 1.0 ) )
	MathComplex c = MathComplex( 0.0, 1.0 ).minus().mul( add( sqr().sub( 1.0 ).sqrt() ).log() );
*/
	// i * log( this - i * sqrt( -sqr() + 1.0 ) )
	MathComplex i = MathComplex( 0.0, 1.0 );
	MathComplex c = i.mul( sub( i.mul( sqr().minus().add( 1.0 ).sqrt() ) ).log() );
	c._re = _radToAng( c._re );
	c._im = _radToAng( c._im );
	return c;
}