package org.matheclipse.core.interfaces;
import org.matheclipse.core.expression.NumberUtil;
/**
* A numeric (double) number.
*
*/
public interface INum extends ISignedNumber {
public double getRealPart();
public INum add(INum val);
public INum multiply(INum val);
public INum pow(INum val);
/** {@inheritDoc} */
public boolean isNumIntValue();
/**
* Returns the value of this number as an int (by simply casting
* to type int).
*
* @return
*/
public int intValue();
/**
* Converts this double value to an int value; unlike
* {@link #intValue} this method raises {@link ArithmeticException} if this
* integer cannot be represented by an int type.
*
* @return the numeric value represented by this integer after conversion to
* type int.
* @throws ArithmeticException
* if conversion to int is not possible.
*/
public int toInt() throws ArithmeticException;
}
Ads help maintain this website.