operator / method

Obj<double> operator /(
  1. Obj<BigInt> other
)

Double division operator.

Matching the similar operator on int, this operation first performs toDouble on both this big integer and other, then does double.operator/ on those values and returns the result.

Note: The initial toDouble conversion may lose precision.

Example:

print(Obj(BigInt.from(1)) / Obj(BigInt.from(2))); // Obj(0.5)
print(Obj(BigInt.from(1.99999)) / Obj(BigInt.from(2))); // Obj(0.5)

Implementation

Obj<double> operator /(Obj<BigInt> other) => Obj(value / other.value);