_8^%3
 

    Den 20:37 mandag den 31. juli 2017 skrev Skip Cave 
<s...@caveconsulting.com>:
 

 1 j. %:3    NB. I Should have looked at the bottom part of the dictionary
closer!

Roger said: " j. plays the same role for complex numbers as - for integers
and % for rational numbers.
​"​


Hmmm... "% for rational numbers"  What does that mean? Let's see...

    %2r3

3r2


    %123456r78901

78901r123456            NB. Cool! I didn't know that!


Skip

Skip Cave
Cave Consulting LLC

On Mon, Jul 31, 2017 at 1:22 PM, Roger Hui <rogerhui.can...@gmail.com>
wrote:

> Ken Iverson invented j. and IMO is a masterstroke which separates him from
> mere mortals.  j. plays the same role for complex numbers as - for integers
> and % for rational numbers.
>
> See section 8 of *Some Exercises in APL Language Design
> <http://www.jsoftware.com/papers/APLDesignExercises.htm>*.
>
>
>
>
> On Mon, Jul 31, 2017 at 11:13 AM, Kenneth Lettow <klet...@thomasnet.com>
> wrote:
>
> > 1 j. %:3
> >
> > On Mon, Jul 31, 2017 at 2:10 PM, Skip Cave <s...@caveconsulting.com>
> > wrote:
> >
> > > How can I create the complex number  1 i (sqrt 3)  in J
> > >
> > > Several tries didn't work:
> > >
> > >
> > >
> > >    1j%:3
> > >
> > > |ill-formed number
> > >
> > >    a =: %:3
> > >
> > >    1ja
> > >
> > > |ill-formed number
> > >
> > >    1j(%:3)
> > >
> > > |ill-formed number
> > >
> > >      %:3
> > >
> > > 1.73205
> > >
> > >    1j1.73205
> > >
> > > 1j1.73205      NB. This works, but it isn't very elegant.
> > >
> > >                    NB.  I have to copy/paste the square root as text.
> > >
> > >
> > >
> > >
> > > Skip Cave
> > > ----------------------------------------------------------------------
> > > 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