The OpenD Programming Language

BigInt.opBinary

Implements binary operators between BigInts.

  1. BigInt opBinary(T y)
    struct BigInt
    pure nothrow @safe const return scope
    opBinary
    (
    string op
    T
    )
    (
    T y
    )
    if (
    (
    op == "+" ||
    op == "*"
    ||
    op == "-"
    ||
    op == "|"
    ||
    op == "&"
    ||
    op == "^"
    ||
    op == "/"
    ||
    op == "%"
    )
    &&
    is(T : BigInt)
    )
  2. BigInt opBinary(T y)
  3. auto opBinary(T y)

Examples

auto x = BigInt("123");
auto y = BigInt("456");
BigInt z = x * y;
assert(z == BigInt("56088"));

Meta