operator / method

dynamic operator /(
  1. Object other
)

Implementation

operator /(Object other) {
  final effectiveOther = _fromObject(other);

  final out = Value(data / effectiveOther.data, {
    this,
    effectiveOther,
  }, ValueOperation.divide);

  out.localBackward = () {
    grad += out.grad * pow(effectiveOther.data, -1);
    effectiveOther.grad += out.grad * (-data * pow(effectiveOther.data, -2));
  };

  return out;
}