boolean bInexactLeft;
int nOrdinal = 0;
if (!(left instanceof Number))
{
throw new TypeMismatchException(getSymbol());
}
if (left instanceof Float || left instanceof Double)
{
Number num = (Number)left;
lLeft = num.longValue();
intLeft = null;
bInexactLeft = true;
nOrdinal = (left instanceof Float) ? Primitive.FLOAT_ORDINAL : Primitive.DOUBLE_ORDINAL;
if (lLeft != num.doubleValue())
{
throw new TypeMismatchException(getSymbol());
}
}
else if (left instanceof BigDecimal)
{
BigDecimal dec = (BigDecimal)left;
if (dec.compareTo(dec.setScale(0, BigDecimal.ROUND_DOWN)) != 0)
{
throw new TypeMismatchException(getSymbol());
}
lLeft = 0;
intLeft = dec.toBigInteger();
bInexactLeft = (dec.scale() >= Primitive.MAX_SCALE);
nOrdinal = Primitive.DECIMAL_ORDINAL;
}
else
{
lLeft = ((Number)left).longValue();
intLeft = null;
bInexactLeft = false;
nOrdinal = (left instanceof Long) ? Primitive.LONG_ORDINAL : Primitive.INTEGER_ORDINAL;
}
BigInteger[] intResults = null;
long[] lResults = null;
int nResultCount = getResultCount();
if (nResultCount > 1)
{
if (intLeft != null)
{
intResults = new BigInteger[nResultCount];
}
else
{
lResults = new long[nResultCount];
}
}
if (nArgCount == 1)
{
if (intLeft != null)
{
if (nResultCount < 2)
{
intLeft = getOneArgResult(intLeft);
}
else
{
getOneArgResult(intLeft, intResults);
}
}
else
{
if (nResultCount < 2)
{
lLeft = getOneArgResult(lLeft);
}
else
{
getOneArgResult(lLeft, lResults);
}
}
}
else
{
for (int i = 1; i < nArgCount; ++i)
{
long lRight = 0;
BigInteger intRight = null;
boolean bInexactRight;
Object right = machine.getArg(i, nArgCount);
if (right == null)
{
machine.returnValue(null, nArgCount);
}
if (!(right instanceof Number))
{
throw new TypeMismatchException(getSymbol());
}
if (right instanceof Float || right instanceof Double)
{
Number num = (Number)right;
lRight = num.longValue();
intRight = null;
bInexactRight = true;
nOrdinal = Math.max(nOrdinal, (right instanceof Float) ? Primitive.FLOAT_ORDINAL : Primitive.DOUBLE_ORDINAL);
if (lRight != num.doubleValue())
{
throw new TypeMismatchException(getSymbol());
}
}
else if (right instanceof BigDecimal)
{
BigDecimal dec = (BigDecimal)right;
if (dec.compareTo(dec.setScale(0, BigDecimal.ROUND_DOWN)) != 0)
{
throw new TypeMismatchException(getSymbol());
}
lRight = 0;
intRight = dec.toBigInteger();
bInexactRight = (dec.scale() >= Primitive.MAX_SCALE);