I'm confused here. Should Ronan's C code really be
if (px<-1.0 || px>1.0) result+=(1.0-px)*(1.0-px); or if (px<-1.0 || px>1.0) result+=(-1.0-px)*(1.0-px); The latter is more symmetrical, and is also continuous, which the first is not. It's also easily implementable as f=:0 >. <:@:*: Best wishes, John ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
