generalized double to type_t, added translate_comm script i used, added scripts/tests