Mike Day wrote: > FWIW, pending J6.02, this offers some improvement in > time and space: > NB. in J 6.0.1 > NB. reduce x to an integer multiple of y before divide > NB. does it work for -ve & +ve x > (x-300000) (<[EMAIL PROTECTED] -: ([ - |~) % ]) 17 > 1 > ts'x <[EMAIL PROTECTED] 17' > 0.210536 2.09723e7 > ts'x (([ - |~) % ]) 17' > 0.0587469 1.25841e7 > > I expect there's a better way still, and still in 6.01 ! > > Mike
Just curious, does any hardware fpu support <:@% , that is short circuiting the computing of the fractional part of a quotient? -- regards, bill ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
