Method: Z3::Expr.Mul

Defined in:
lib/z3/expr/expr.rb

.Mul(*args) ⇒ Object



181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/z3/expr/expr.rb', line 181

def Mul(*args)
  args = coerce_to_same_sort(*args)
  case args[0]
  when ArithExpr
    args[0].sort.new(LowLevel.mk_mul(args))
  when BitvecExpr
    args.inject do |a, b|
      a.sort.new(LowLevel.mk_bvmul(a, b))
    end
  else
    raise Z3::Exception, "Can't perform logic operations on #{args[0].sort} values, only Int/Real/Bitvec"
  end
end