Re: Modulo algorithm

2020-04-08 Thread Jay Foad
If you search your email you'll find that we've touched on this subject before. Complex residue (aka remainder, modulo) is defined the same as for real numbers: assuming you already have a complex floor operation then Residue ←{⍵-⍺×⌊⍵÷⍺}. Complex floor is a complex subject, especially when you in

Modulo algorithm

2020-04-07 Thread Elias Mårtenson
I was reading the APL spec and noted that it specifies that the modulo operation is implementation-defined. I've been looking at various sources, and it's not clear to me how complex modulo is defined. Is there some source that documents it (and specifically the method used in GNU APL). Regards,