def iseia(r, valid_types=(E6, E12, E24)):
 if ((not isinstance(r, numbers.Number)) or (r < 0) or math.isnan(r) or math.isinf(r)):
  return False
 if (r == 0):
  return True
 while (r < 100):
  r = (r * 10)
 while (r >= 1000):
  r = (r / 10)
 if (abs((r - round(r))) > 0.01):
  return False
 r = int(round(r))
 for type_list in valid_types:
  if (r in type_list):
   return True
  if ((int((r / 10.0)) in type_list) and ((r % 10) == 0)):
   return True
 return False

def iseia ( r , valid_types = ( E6 , E12 , E24 ) ) : if ( ( not isinstance ( r , numbers . Number ) ) or ( r < 0 ) or math . isnan ( r ) or math . isinf ( r ) ) : return False if ( r == 0 ) : return True while ( r < 100 ) : r = ( r * 10 ) while ( r >= 1000 ) : r = ( r / 10 ) if ( abs ( ( r - round ( r ) ) ) > 0.01 ) : return False r = int ( round ( r ) ) for type_list in valid_types : if ( r in type_list ) : return True if ( ( int ( ( r / 10.0 ) ) in type_list ) and ( ( r % 10 ) == 0 ) ) : return True return False
check if a component is a valid eia value .