Topic: `APLX Help` : `Help on APL language` : `APL Primitives` : `÷ Divide`
[ Previous | Next | Contents | Index | APL Home ] # `÷` Divide

Divides the number(s) in the left-hand argument by the number(s) in the right- hand argument.

```             9÷3                     (One number is divided by another)
3
0÷0                     (This is a special case)
1
21 15 75 13÷5           (Division of each number in a vector by
4.2 3 15 2.6                   a single number)
12 8 24÷2 8 6           (Each number in one vector is divided by the
6 1 4                          corresponding number in another vector)
TABLE ← 2 5 ⍴ ⍳ 10      (Numbers 1 to 10 assigned to TABLE.
TABLE÷10                (Each number in TABLE is divided by 10
0.1  0.2  0.3  0.4  0.5
0.6  0.7  0.8  0.9  1
TABLE÷TABLE             (Each number in one matrix is divided by the
1 1 1 1 1                      corresponding number in another of the same
1 1 1 1 1                      size and dimensions)
1 ÷5 (⍳5)               (1 divided by each element on the right)
0.2  1 0.5 0.3333333333 0.25 0.2
2  3÷5 (⍳4) (⍳5)        (Arguments must be the same length)
LENGTH ERROR
2 3÷5(⍳4)(⍳5)
^
(⍳4) 10 (⍳3)÷ 5 (2 2 ⍴⍳4) (⍳3)
0.2 0.4 0.6 0.8       10                 5               1 1 1
3.333333333       2.5
(Corresponding elements divided)
```

If the right argument contains a zero, APLX will generate a DOMAIN ERROR.

Topic: `APLX Help` : `Help on APL language` : `APL Primitives` : `÷ Divide`
[ Previous | Next | Contents | Index | APL Home ]