[Next] [Up] [Previous] [Contents]
Next: Arithmetic on vectors Up: Vectors and vector operators Previous: Extension of operators to

Vector coersion operator

When combining vectors of different length with a binary operator, the shorter vector is prepended with a vector of zeros to make the vectors the same length. Thus, for example,

        [a,b,c,d] * [e,f]
is equivalent to

        [a,b,c,d] * [0,0,e,f]

In general, if x and z are booleans, then

        (w :: x) * z = (w * 0) :: (x * z)
        x * (y :: z) = (0 * y) :: (x * z)

The exceptions to the above rule are



Ken McMillan
Sat Jun 6 21:41:59 PDT 1998