added tests and fixes for choosedouble, choosefloat, chooseint. fixes #2