Thanks Henry and Raul for your responses. Indeed, I have encountered limitations of floating point arithmetic.
showmismatch is great idea to quickly detect cases validating property. Usually I will want to have something like this though (100 runs or so): run=: 3 : 0 shape=.1+?2#100 m=.genUniformMatrix shape s=. _100 100 runiform 2 s checkEqOfMatricesWithScalars m ) (+/)(run"0)100#0 100 I will try to experiment also with digit precision and rounding as a measure to avoid those limitations. Cheers, Pawel Jakubas ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm