Is there any reason you can't look at the differences directly and compare those? I.e.
2-/\PIs,{.PIs _2.38419e_7 4.76837e_7 _2.38419e_7 Here we see that the third one is the odd man out with twice the difference. For more than three items, you would probably want to sort them first. On Mon, Jan 16, 2012 at 12:11 AM, Raul Miller <rauldmil...@gmail.com> wrote: > Let's suppose that I have some low precision floating point numbers: > > require 'dll' > PIs=: _1 fc a.{~ 219 15 73 64 220 15 73 64 218 15 73 64 > PIs > 3.14159 3.14159 3.14159 > > I would like to be able to recognize that some of these values are > close to each other > i.!.3e_7~ PIs > |domain error > > I can't use comparison tolerance on i. for this purpose, because i. > throws a domain error when I try to specify the precision I want to > use. > > I also can't use ": because I can't rely on the numbers not being "off > by one" when formatted -- but I can rely on them being close enough > that if they were slightly different they would format the same. > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm