Conversation
M2/Macaulay2/m2/reals.m2
Outdated
| promote(Number,InexactNumber) := (x,RR) -> promote(x,default RR) | ||
| promote(ZZ,RR') := | ||
| promote(QQ,RR') := | ||
| promote(RR',RR') := |
There was a problem hiding this comment.
A bit confused:
- I think there's a better way to have promote behave like identity if the input ring and new ring are identical.
- The commit that changes this file says
fix isPromotable ring family
This reverts commit 63d7fc7.
But that commit doesn't seem to have anything to do with this file.
There was a problem hiding this comment.
the revert part of the message is an accident. will fix.
the addition of promote(XX',YY') is an unfortunate side-effect of the messy way that inexact fields are implemented in Macaulay2 (which one day I'd love to rewrite from scratch, because it's such a mess).
They're not actual functions though because they never actually get called, really one should make them dummy functions.
M2/Macaulay2/m2/matrix.m2
Outdated
| nottosamering := (X,Y) -> ( | ||
| if X === Y then error("expected ",pluralsynonym X, " for compatible rings") | ||
| else error("expected ",synonym X," and ",synonym Y," for compatible rings")) | ||
| tosamering = (M,N) -> ( |
There was a problem hiding this comment.
I don't mind keeping the old names if you don't want to change names in a bunch of places, but I don't think we should actively rename something camel-cased to all lower case. Also, maybe move these functions to where isPromotable is defined instead.
There was a problem hiding this comment.
will do. not the most urgent thing right now.
once again, this is a draft.
be69753 to
da0a5fe
Compare
3fa8cc0 to
ef2e0e1
Compare
621457c to
d2ac437
Compare
|
Would you fix the conflict in matrix.m2? |
clean up promote code:
tryin promotepromotethat used to be in another PR of mine moved here, resolves the last issue in Promotion issues #3184