fixed possible NaN result in str_similarity
added set and variable args init for dynamic array