16 May
2020
16 May
'20
8:56 a.m.
I believe that the APL language folks are the first to attempt coming up with a standard for complex modulo. I discuss these issues in a paper I wrote in 1993: http://home.pipeline.com/~hbaker1/Gaussian.html At 12:11 AM 5/16/2020, Tom Karzes wrote:
Wolfram defines mod as:
a mod b = a - b * floor(a/b)
for real or complex a and b.
I think they define complex floor as:
floor(a) = floor(re(a)) + i * floor(im(a))
for complex a.
Tom
Kerry Mitchell writes:
Hi all,
Is there a standard, or at least, reasonable, definition of the modulo function for complex numbers? What I've come up with is:
a mod b = r means a = qb + r,
where q is the Gaussian integer that minimizes |r|, with |qb| <= |a|.
Thanks for any guidance, Kerry