operator ^ method

Value operator ^(
  1. covariant Value other
)

Implementation

Value operator ^(covariant Value other) {
  var result = Value(pow(value, other.value), op: powOp);
  result._prev.addAll([this, other]);
  _backwardFn = () => {
        grad += ((other.value * pow(value, other.value - 1)) * result.grad),
      };
  return result;
}