/** * Additional multiply method which works like times to fulfill groovy's * method signature * * @param that * @return */ public final IExpr multiply(final IExpr that) { return times(that); }
@Override public IExpr times(final IExpr that) { if (that instanceof ComplexSym) { return multiply((ComplexSym) that); } return super.times(that); }
@Override public IExpr times(final IExpr that) { if (that instanceof Num) { return newInstance(fDouble * ((Num) that).fDouble); } return super.times(that); }
/** * @param that * @return */ @Override public IExpr times(final IExpr that) { if (that instanceof ComplexNum) { return newInstance(fComplex.multiply(((ComplexNum) that).fComplex)); } return super.times(that); }
/** {@inheritDoc} */ @Override public IExpr times(final IExpr that) { if (that instanceof FractionSym) { return this.multiply((FractionSym) that); } if (that instanceof IntegerSym) { return this.multiply(valueOf(((IntegerSym) that).fInteger)); } return super.times(that); }
/** * @param that * @return */ @Override public IExpr times(final IExpr that) { if (that instanceof IntegerSym) { return this.multiply((IntegerSym) that); } if (isZero()) { return F.C0; } if (that instanceof FractionSym) { return FractionSym.valueOf(fInteger).multiply((FractionSym) that); } return super.times(that); }