Skip to content

Commit

Permalink
fixed RingElement / Number for inexact base fields
Browse files Browse the repository at this point in the history
Example:
RR_100[x]; x/2
  • Loading branch information
mahrud committed Aug 18, 2024
1 parent eb46dc9 commit 0bc19d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion M2/Macaulay2/m2/enginering.m2
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ frac0 = (f,g) -> f/g

-- TODO: should these be more uniform? see 3e329d60815 and 13675361300
Number / RingElement := frac0 @@ promoteleftexact
RingElement / Number := (f, g) -> if f % g == 0 then f // g else (1/g) * f
RingElement / Number := (f, g) -> if (try f % g == 0 else false) then f // g else (1/g) * f

-- Note: % is not implemented for inexact fields
InexactNumber / RingElement := frac0 @@ promoteleftinexact
Expand Down

0 comments on commit 0bc19d8

Please sign in to comment.