There are two issues here. One, which I was addressing, is how J internally
handles nouns, which I would think is the way nouns should be taught if
teaching J.

In mathematical terms I would still think that a complex number is still a
scalar. That a complex number is represented by a pair of rational numbers
is in our notation. 3j4 for example. Likewise, when we express a rational
number in scientific notation it is actually a pair of numbers separated by
the letter "E". Would you call that a scalar or an array? Internally in the
computer a floating point number is actually a pair of integers within a
computer word.

I suspect that "array" is another one of those terms like "operator" and
"function" with ambiguous and conflicting definitions. Intuitively obvious?
Some definitions exclude scalars. Others do not.



On Tue, Oct 26, 2010 at 10:03 AM, Donna Y <[email protected]> wrote:

> Sorry - I am thinking in terms of mathematics where a complex number or
> Imaginary number is not a scalar
>
> numbers in an array have a position while a scalar is just a magnitude -
> however it seems from what Roger is saying that all numbers in APL and J are
> in arrays - there is no other way provided to express a scalar number
>
> Donna
> [email protected]
>
>
> On 2010-10-26, at 10:54 AM, Don Guinn wrote:
>
> >   3!:3]99j1
> > e1000000
> > 10000000
> > 01000000
> > 00000000
> > 00000000
> > 00c05840
> > 00000000
> > 0000f03f
> >
> > J still treats a complex number as a zero rank array.
> >
> >   3!:3]99r2
> > e1000000
> > 80000000
> > 01000000
> > 00000000
> > 18000000
> > 30000000
> > e1000000
> > 04000000
> > 01000000
> > 01000000
> > 01000000
> > 63000000
> > e1000000
> > 04000000
> > 01000000
> > 01000000
> > 01000000
> > 02000000
> >
> > Same for rationals.
> >
> > On Tue, Oct 26, 2010 at 8:50 AM, Raul Miller <[email protected]>
> wrote:
> >
> >> On Mon, Oct 25, 2010 at 9:34 PM, Donna Y <[email protected]> wrote:
> >>> An array can have one element but it is not a scalar number.
> >>> If it is an array it has not only magnitude but also direction.
> >>>
> >>> A scalar number by definition scales - it has magnitude - it
> >>> is not a vector or an array.  It has rank 0.
> >>
> >> I did not follow all of what you wrote, but consider:
> >>
> >> scalar:  1j2 (has magnitude and direction, and is an array)
> >> array: i.0 1 2 3 4  (has no magnitudes and no directions, but still is
> an
> >> array)
> >>
> >> --
> >> Raul
> >> ----------------------------------------------------------------------
> >> 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