/*
(non-Javadoc)

@see javax.money.MonetaryAmount#multiply(Number)
434379
@Override
    public Money multiply(double multiplicand) {
    	NumberVerifier.checkNoInfinityOrNaN(multiplicand);
        if (multiplicand == 1.0d) {
            return this;
        }
        return multiply(new BigDecimal(String.valueOf(multiplicand)));
    }
1128809
public function multiply($number)
  {
    return Money::init((int) round($this->cents * $number, 0, PHP_ROUND_HALF_EVEN), $this->currency->getIsoCode());
  }
885006
public Rational multiply(Rational value)
    {
        return new Rational(numerator * value.getNumerator(),
                            denominator * value.getDenominator());
    }
882494
def multiply_and_add(n):
    ''''''
    multiplier, offset = di.resolver.unpack(multiply_and_add)
    return (multiplier * n) + offset
1075532
public void multiply(double val) {
        for (int c = 0; c < this.values.length; c++) {
            multiplyValue(c, val);
        }
    }
157823
public static MonetaryAmount sum(MonetaryAmount a, MonetaryAmount b){
        MoneyUtils.checkAmountParameter(Objects.requireNonNull(a), Objects.requireNonNull(b.getCurrency()));
        return a.add(b);
    }
611871
void increment(double amount) {
    spectatorCounter.add(amount);
    if (amount >= 0.0) {
      for (int i = 0; i < Pollers.NUM_POLLERS; ++i) {
        add(count.getCurrent(i), amount);
      }
    }
  }
406537
final public void Multiplication() throws ParseException {
    Unary();
    label_13:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case MULT:
      case DIV0:
      case DIV1:
      case MOD0:
      case MOD1:
        ;
        break;
      default:
        jj_la1[27] = jj_gen;
        break label_13;
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case MULT:
        jj_consume_token(MULT);
                  AstMult jjtn001 = new AstMult(JJTMULT);
                  boolean jjtc001 = true;
                  jjtree.openNodeScope(jjtn001);
        try {
          Unary();
        } catch (Throwable jjte001) {
                  if (jjtc001) {
                    jjtree.clearNodeScope(jjtn001);
                    jjtc001 = false;
                  } else {
                    jjtree.popNode();
                  }
                  if (jjte001 instanceof RuntimeException) {
                    {if (true) throw (RuntimeException)jjte001;}
                  }
                  if (jjte001 instanceof ParseException) {
                    {if (true) throw (ParseException)jjte001;}
                  }
                  {if (true) throw (Error)jjte001;}
        } finally {
                  if (jjtc001) {
                    jjtree.closeNodeScope(jjtn001,  2);
                  }
        }
        break;
      case DIV0:
      case DIV1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case DIV0:
          jj_consume_token(DIV0);
          break;
        case DIV1:
          jj_consume_token(DIV1);
          break;
        default:
          jj_la1[28] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
                           AstDiv jjtn002 = new AstDiv(JJTDIV);
                           boolean jjtc002 = true;
                           jjtree.openNodeScope(jjtn002);
        try {
          Unary();
        } catch (Throwable jjte002) {
                           if (jjtc002) {
                             jjtree.clearNodeScope(jjtn002);
                             jjtc002 = false;
                           } else {
                             jjtree.popNode();
                           }
                           if (jjte002 instanceof RuntimeException) {
                             {if (true) throw (RuntimeException)jjte002;}
                           }
                           if (jjte002 instanceof ParseException) {
                             {if (true) throw (ParseException)jjte002;}
                           }
                           {if (true) throw (Error)jjte002;}
        } finally {
                           if (jjtc002) {
                             jjtree.closeNodeScope(jjtn002,  2);
                           }
        }
        break;
      case MOD0:
      case MOD1:
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case MOD0:
          jj_consume_token(MOD0);
          break;
        case MOD1:
          jj_consume_token(MOD1);
          break;
        default:
          jj_la1[29] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
        }
                           AstMod jjtn003 = new AstMod(JJTMOD);
                           boolean jjtc003 = true;
                           jjtree.openNodeScope(jjtn003);
        try {
          Unary();
        } catch (Throwable jjte003) {
                           if (jjtc003) {
                             jjtree.clearNodeScope(jjtn003);
                             jjtc003 = false;
                           } else {
                             jjtree.popNode();
                           }
                           if (jjte003 instanceof RuntimeException) {
                             {if (true) throw (RuntimeException)jjte003;}
                           }
                           if (jjte003 instanceof ParseException) {
                             {if (true) throw (ParseException)jjte003;}
                           }
                           {if (true) throw (Error)jjte003;}
        } finally {
                           if (jjtc003) {
                             jjtree.closeNodeScope(jjtn003,  2);
                           }
        }
        break;
      default:
        jj_la1[30] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    }
  }
476276
public RoundedMoney with(CurrencyUnit currency) {
        Objects.requireNonNull(currency, "currency required");
        return new RoundedMoney(asType(BigDecimal.class), currency, rounding);
    }
618220
@Override
    public RoundedMoney subtract(MonetaryAmount amount) {
        MoneyUtils.checkAmountParameter(amount, currency);
        if (amount.isZero()) {
            return this;
        }
        return new RoundedMoney(number.subtract(amount.getNumber().numberValue(BigDecimal.class),
                Optional.ofNullable(
                        monetaryContext.get(MathContext.class)).orElse(MathContext.DECIMAL64)),
                currency, rounding);
    }
1366768
function multiplyByNumber(num, x, base) {
  if (num < 0) return null;
  if (num == 0) return [];
  var result = [];
  var power = x;

  while (true) {
    if (num & 1) {
      result = add(result, power, base);
    }

    num = num >> 1;
    if (num === 0) break;
    power = add(power, power, base);
  }

  return result;
}
673445
public <N extends Number & Comparable<N>> NumberExpression<T> multiply(N right) {
        return Expressions.numberOperation(getType(), Ops.MULT, mixin, ConstantImpl.create(right));
    }
1011646
public function multiply($factor)
    {
        if (!is_numeric($factor)) {
            throw new \InvalidArgumentException('Factor must be numeric');
        }

        $amount = bcmul($this->amount, strval($factor), self::BCSCALE);

        return self::valueOf($amount, $this->currency);
    }
993086
public void increment(int i, int j, double value)
    {
        if(Double.isNaN(value) || Double.isInfinite(value))
            throw new ArithmeticException("Can not add a value " + value);
        set(i, j, get(i, j)+value);
    }
936608
@Override
    public CurrencyAmount add(final CurrencyAmount money) {
        if (!money.getCurrency().equals(currency)) {
            throw new IllegalArgumentException("You cannot add " + money.getCurrency() + " with " + currency);
        }
        return new Cash(currency, BigDecimalUtil.add(amount, money.getAmount()));
    }
513592
@Override
    public RoundedMoney divide(Number divisor) {
        BigDecimal bd = MoneyUtils.getBigDecimal(divisor);
        if (isOne(bd)) {
            return this;
        }
        RoundingMode rm = monetaryContext.get(RoundingMode.class);
        if(rm==null){
            rm = RoundingMode.HALF_EVEN;
        }
        BigDecimal dec = number.divide(bd, rm);
        return new RoundedMoney(dec, currency, rounding).with(rounding);
    }
1198121
private BigRational multiply(BigDecimal value) {
		BigDecimal n = numerator.multiply(value);
		BigDecimal d = denominator;
		return of(n, d);
	}