Open putianyi889 opened 10 months ago
I don't find this intuitive, so I'll ask for clarification: you want A // B == (A // 1) / (B // 1)
in your example?
I disagree. In my opinion, //
should construct a Rational
(which AbstractMatrix{<:Rational}
is not). I think it's a big stretch (and an unnecessary pun) to make it do matrix right-division.
you want
A // B == (A // 1) / (B // 1)
in your example?
I'd say A // B == (A // one(eltype(A))) / (B // one(eltype(B)))
, but you get the point
//
should construct aRational
(whichAbstractMatrix{<:Rational}
There is a case where it doesn't.
There is a case where it doesn't.
IMO that method is different than this, because the method implements the idea of scalar multiplication, which is a simpler operation than matrix multiplication with inverse. The semantics you propose feel nonobvious.
Since
//
supportsComplex{Integer}
and/
supportsMatrix{Rational}
, it's intuitive that//
should supportMatrix{Integer}
as well.A workaround for now is
(A // 1) / (B // 1)
.