On 1/22/12, Bo Jacoby <bojac...@yahoo.dk> wrote: > 5|0 1 2 3 4 is not equal to 5|0 1 2 3 4 j.0
Strange. We already know that the tolerant floor monad (<.) has different behavior depending on whether the underlying representation is complex or not, and that the Dictionary does not define the behavior precisely in either case. Many other verbs, such as the monad (<.), the dyad (|), and the dyad (#:) are defined in terms of floor, and inherit some of the strange behavior. (See "http://www.jsoftware.com/jwiki/System/Interpreter/Bugs#dictionarydefnforfloordoesnothandletolerance") However, the issue you mention does not obviously derive from the strangeness of floor. The dictionary definition of residue does not reproduce this problem. 5 | i. 5 0 1 2 3 4 5 | (i. 5) j. 0 0 1 2 _2 _1 res =: 4 :'y-x*<.y%x+0=x' 5 res i. 5 0 1 2 3 4 5 res (i. 5) j. 0 0 1 2 3 4 So basically, I don't really know why residue behaves this way, and I think it's not directly related to floor's strangeness. Unless somone gives a very good excuse for residue, I think you should file this as a bug in "http://www.jsoftware.com/jwiki/System/Interpreter/Bugs" because it directly contradicts the dictionary definition of it. Ambrus ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm