handle matlab float32=>single, float64=>double
increase test coverage and fix issue that matlab prefers float32=>single, float64=>double and handles either type specification.
increase test coverage and fix issue that matlab prefers float32=>single, float64=>double and handles either type specification.