Hmm.. clearly not intended for gaussian integers. ri =: * * [: <. 0.5 + | ri 1j1 0.707107j0.707107
But I guess that's the thing about what we get taught... it tends to have only situational relevance. Thanks, -- Raul On Sat, Jan 16, 2016 at 10:50 AM, Kip Murray <[email protected]> wrote: > Here is my latest round-to-integer. It rounds the absolute value and then > restores the sign -- the way I was taught to round. Apologies if someone > else has already presented this. > > ri =: * * [: <. 0.5 + | > ri _1234.56 > _1235 > ri 123.45 > 123 > > --Kip Murray > > > -- > Sent from Gmail Mobile > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
