Skip to content

Commit da0a5fe

Browse files
committed
fix tosamering for inexact fields
1 parent 4e93c86 commit da0a5fe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

M2/Macaulay2/m2/matrix.m2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ nottosamering := (X,Y) -> (
1212
else error("expected ",synonym X," and ",synonym Y," for compatible rings"))
1313
tosamering = (M,N) -> (
1414
R := ring M; S := ring N;
15+
if instance(R,InexactField) then R = ring R;
16+
if instance(S,InexactField) then S = ring S;
1517
if R =!= S then (
1618
if isPromotable(R,S) then (promote(M,S),N)
1719
else if isPromotable(S,R) then (M,promote(N,R))

M2/Macaulay2/m2/reals.m2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,10 @@ BesselY = method()
475475
BesselY(ZZ, Number) := (n, x) -> BesselY'(n, numeric x)
476476
BesselY(Number, Number) := (n, x) -> BesselY'(numeric n, numeric x)
477477

478+
ring ComplexField := R -> CC
479+
ring RealField := R -> RR
480+
ring RealIntervalField := R -> RRi
481+
478482
-- Local Variables:
479483
-- compile-command: "make -C $M2BUILDDIR/Macaulay2/m2 "
480484
-- End:

0 commit comments

Comments
 (0)