Addition of m3d_ts
Fixed m3d_rand

gf3 has not definition of 01, or units 0, sign 1.  m3d_rand had
allowed that to be assigned  happen.