Thank you






On Fri., Aug. 11, 2023, 19:39 chris burke, <cbu...@jsoftware.com> wrote:

> The x: converts its argument to extended. You are giving it a floating
> point argument, not an integer, i.e.
>
>    180548043269214561950911457875657
> 1.80548e32
>    datatype 180548043269214561950911457875657
> floating
>
> To use this value as an extended integer you need the 'x' suffix.
>
>    180548043269214561950911457875657x
> 180548043269214561950911457875657
>
> If you have the value as a string, then append 'x' and evaluate it:
>
>    A=: '180548043269214561950911457875657'
>    ". A,'x'
> 180548043269214561950911457875657
>
> On Fri, Aug 11, 2023 at 5:56 PM Ak O <akin...@gmail.com> wrote:
> >
> > My response might not have been clear.
> >
> > This is the result I get.
> >
> >      (x: 180548043269214561950911457875657)   -:
> >  180548043269214561950911457875657x
> > 0
> >
> > Ak
> >
> > On Fri., Aug. 11, 2023, 13:01 Henry Rich, <henryhr...@gmail.com> wrote:
> >
> > > (x: value) produces extended version of value.
> > >
> > > Henry Rich
> > >
> > > On Fri, Aug 11, 2023, 2:44 PM Ak O <akin...@gmail.com> wrote:
> > >
> > > > Hi everybody, I hope you are all well.
> > > >
> > > > I have a question about the Anagram ( A. ) operator.
> > > >
> > > > In a defined function, how do I designate that an input 'x' is
> treatment
> > > > as  extended datatype rather than float?
> > > >
> > > > Where being defined:
> > > >      13 : ' x A. i.y'
> > > > [ A. [: i. ]
> > > >
> > > >  is to be taken as,
> > > >      13 : 'X_INPUTx A. y'     NB. 12345672345467x A. i.y
> > > >
> > > > How do I get the affect of catenating an 'x' to the end of a number
> in a
> > > > defined function?
> > > >
> > > > If you understand my question ignore below, otherwise I give an
> example.
> > > >
> > > > Thank you for your thoughts.
> > > >
> > > > Ak
> > > >
> > > >
> > > > My understanding of the Anagram operator (A.).
> > > > The vocabulary reference page (acapdot) gives the product of the
> Anagram
> > > > index function
> > > >     A. y
> > > > as datatype extended.
> > > >
> > > >
> > > > The Anagram function
> > > >     x A. y
> > > > applies the permutation map (x) on  ordered vector sequence (y) as
> below.
> > > >
> > > >
> > > > ]    vector_sequence =:      ?~30
> > > > 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25
> 19 0 5
> > > > 16 14
> > > >
> > > >
> > > > ]    vector_anagram =:     A. vector_sequence
> > > > 180548043269214561950911457875657
> > > >
> > > > The Noun, vector_anagram will have datatype extended, given by:
> > > >     datatype vector_anagram
> > > > extended
> > > >
> > > > Applying the vector_anagram on a vector using the command:
> > > >      vector_anagram A. i.30
> > > > 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25
> 19 0 5
> > > > 16 14
> > > >
> > > > The expected result.
> > > >
> > > > In a case where the digits are input on there own, the following
> fails
> > > with
> > > > 'domain error, executing dyad A.'
> > > >
> > > >      180548043269214561950911457875657 A. i.30
> > > >
> > > > One approach is to place 'x:' before the input.
> > > >      ( x:180548043269214561950911457875657 )A. i.30
> > > > 20 12 4 29 7 17 22 11 2 27 28 25 1 8 0 15 16 14 3 5 19 26 18 6 21 23
> 13
> > > 24
> > > > 9 10
> > > >
> > > > This is not the expected result.
> > > >
> > > > The input is treated as 180548043269214573494164592263168.
> > > >
> > > >      ( x:180548043269214561950911457875657 )
> > > > 180548043269214573494164592263168
> > > >
> > > > Not the input I thought I was applying.
> > > >
> > > > An alternative is to postfix an 'x' to the end of the input.
> > > >      180548043269214561950911457875657x A. i.30
> > > > 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25
> 19 0 5
> > > > 16 14
> > > >
> > > > The expected result. But how do I achieve this for a defined
> function.
> > > >
> > > > Does not work either.
> > > > ".@((":vector_anagram),x')"_     NB. same as x:
> > > >
> > > >
> > > > Maybe there is a symbol that 13 : can be recognize to trigger the
> > > extended
> > > > datatype.
> > > >
> > > >
> > > >
> > > > Thank you for your help.
> > > >
> > > > Ak
> > > >
> ----------------------------------------------------------------------
> > > > 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to