error:invalid operands to binary % (have 'float' and 'double