 ==================================================================
      LESSON 2: Multiplication and Division
 ==================================================================

The asterisk is the sign for multiplication

      a=. 3
      b=. 4
      a * b
12

      2*3*4
24

In J, expressions are evaluated from RIGHT to LEFT.  Watch:

      2+3*4
14
      (2+3)*4
20
      4*(2+3)
20
      4*2+3
20
      (4*2)+3
11

If you are uncertain about the evaluation order of your expression,
better use parentheses.

 Evaluate: 4+3*8-5+3*2
      3*2
6
      5+6
11
      8-11
_3
      _3*3
_9
      _9+4
_5

 The answer is minus 5.

 The symbol '*:' is the verb for 'square', i.e. a number times itself:

      *:5
25
      *:8
64
      *:0.5
0.25

      *: _1
1

 ==================================================================
      DIVISION
 ==================================================================

The same right to left evaluation rule applies to division:

      4%2
2

The percent sign '%' is used by J for the division verb.

      3%2
1.5
      _3%2
_1.5

      3+2%2
4
      (3+2)%2
2.5

The '%' sign with only one number indicates the reciprocal ofthat
number (i.e.) 1 divided by n, where n is any number.  This use of a verb
(%) with only one argument is called a MONADIC case.  If the verb takes
two arguments, it is said to be DIADIC.

      %5
0.2
      %10
0.1
      %.5
0.2
      %_2
_0.5
      %(2+3)
0.2

The symbol '%:' is the verb meaning 'square root':

      %:25
5
      %:64
8
      %:3.333
1.82565

Do you think we can take the square root of negative numbers?

      %: _9
0j3
      %: _1
0j1

These are called imaginary or complex numbers.

 ==================================================================
      END OF LESSON 2
 ==================================================================

