I was looking for an easy way to get foreign expressions similar to fc fc 3!:5 brep |value error: brep paren |value error: paren treen |value error: treen
I think I posted this question as a response to the wrong post. Linda -----Original Message----- From: programming-boun...@jsoftware.com [mailto:programming-boun...@jsoftware.com] On Behalf Of Raul Miller Sent: Tuesday, January 17, 2012 2:49 PM To: Programming forum Subject: Re: [Jprogramming] i.!.1e_7~ If you use: require '~system/packages/misc/xenos.ijs' Then 5!:2 is named 'display', 5!:4 is named 'tree' and 5!:6 is named 'paren' If you use: require '~system/main/myutil.ijs' Then the names are 'brep', 'tree' and 'prep' and they have been extended to allow an unboxed string argument. Note that the conflicting definition for 'tree' suggest that you should never use both 'require' statements -- that would be too ambiguous and too confusing. -- Raul On Mon, Jan 16, 2012 at 6:19 AM, Linda Alvord <lindaalv...@verizon.net> wrote: > fc > 3!:5 > > Do 5!:2 5!:4 and 5!:6 have names also? > > Linda > > > -----Original Message----- > From: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] On Behalf Of Roger Hui > Sent: Monday, January 16, 2012 12:38 AM > To: Programming forum > Subject: Re: [Jprogramming] i.!.1e_7~ > > You can use the ideas and models in > http://www.jsoftware.com/jwiki/Essays/Tolerant_Comparison . Tolerant > index-of is not modeled there but obtains without much difficulty: > > tidot=: 1 : '#@[ - +/"1@:(+./\"1)@:(m teq"0/)~' > > x=: 2 1 3 > y=: 1+0.1*i.25 > x 0.1 tidot y > 1 1 3 3 3 3 3 3 0 0 0 0 0 3 3 3 3 2 2 2 2 2 2 2 3 > > > > On Sun, Jan 15, 2012 at 9:11 PM, 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. >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm