Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

modulo of a non-integer

Does Sage support modulo of a non-integer? for example: var("m b") m=2pi, b=3.5pi, b.mod(m), This returns 3.5pi instead of the expected 1.5pi or M=2.2, B=7.7, B.mod(M) for which I expect 1.1

I can calculate it explicitly with b-m*int(b/m), but I cannot find the mod version in sage. Which seems surprising.

modulo of a non-integer

Does Sage support modulo of a non-integer? for example: example:

var("m b")
m=2pi, m=2*pi,  b=3.5pi, b=3.5*pi,  b.mod(m), b.mod(m),

This returns 3.5pi 3.5*pi instead of the expected 1.5pi 1.5*pi or

M=2.2,
B=7.7,
B.mod(M) B.mod(M)

for which I expect 1.11.1.

I can calculate it explicitly with b-m*int(b/m), b-m*int(b/m), but I cannot find the mod version in sage. Which seems surprising.