ˆ Less than or equal


Compares each element in the left-hand argument with the corresponding element in the right-hand argument. If an element in the left-hand argument is less than, or equal to, the corresponding right-hand element, the result of that comparison is 1. Otherwise it is 0. (This operation is affected by ŒCT, the comparison tolerance)

             12 ˆ 1
       0
             2 ˆ 12
       1
             12 ˆ 12
       1
             11 7 2 5ˆ11 3 2 6       (Compares each element in a vector with
       1 0 1 1                        the corresponding element in a vector of
                                      equal length)
             ―3 ˆ ―4                 (Compares negative numbers. The number
       0                              nearer 0 is considered the greater.)
             8 ˆ 2+2+2+2             (The right argument is evaluated
       1                              before the comparison is made)
             TABLE „ 2 3 ½ 1 2 3 4 5 6
             MABLE „ 2 3 ½ 3 3 3 5 5 5
             TABLE ˆ MABLE           (Compares each element in a matrix
       1 1 1                          with the corresponding element in
       1 1 0                          a matrix of equal size and dimensions)
             3ˆTABLE
       0 0 1
       1 1 1
             3 ˆ TABLE MABLE         (Compares 3 with the elements of the
        0 0 1  1 1 1                  nested vector)
        1 1 1  1 1 1

Topic: APLX Help : Help on APL language : APL Primitives : ˆ Less than or equal
[ Previous | Next | Contents | Index ]