Adding float and double constraint