package org.matheclipse.core.interfaces;

/**
 * 
 * Implemented by all number interfaces
 * 
 */
public interface INumber extends IExpr {
	/**
	 * Gets the signum value of a complex number
	 * 
	 * @return 0 for this == 0; +1 for
	 *         real(this) > 0 or
	 *         ( real(this)==0 && imaginary(this) > 0 );
	 *         -1 for
	 *         real(this) < 0 || ( real(this) == 0 && imaginary(this) < 0 )
	 */
	public int complexSign();

	/**
	 * Get the absolute value for a given number
	 * 
	 * @return
	 */
	public IExpr eabs();
	
	/**
	 * Is this number equal an integer number?
	 * @param i
	 * @return
	 */
	public boolean equalsInt(int i);
	
	public INumber opposite();
	
	/**
	 * Returns the imaginary part of a complex number
	 * 
	 * @return real part
	 */
	public ISignedNumber getIm();
	
	/**
	 * Returns the real part of a complex number
	 * 
	 * @return real part
	 */
	public ISignedNumber getRe(); 
}

 

Ads help maintain this website.