def num_ok_for_type(number, proposed_type):
 if (proposed_type == 'long'):
  return True
 if (proposed_type == 'float'):
  return True
 if ((number >= eval((proposed_type + '.MinValue'))) and (number <= eval((proposed_type + '.MaxValue')))):
  return True
 if ((eval((proposed_type + '.MinValue')) <= number) and (eval((proposed_type + '.MaxValue')) >= number)):
  return True
 return False

def num_ok_for_type ( number , proposed_type ) : if ( proposed_type == 'long' ) : return True if ( proposed_type == 'float' ) : return True if ( ( number >= eval ( ( proposed_type + '.MinValue' ) ) ) and ( number <= eval ( ( proposed_type + '.MaxValue' ) ) ) ) : return True if ( ( eval ( ( proposed_type + '.MinValue' ) ) <= number ) and ( eval ( ( proposed_type + '.MaxValue' ) ) >= number ) ) : return True return False
helper function returns true if the number param is within the range of valid values for the proposed type .