






'''simple docstring'''







from math import loga





def 		_UpperCAmelCase   (							__A							:   int      ):
				if a < 0:
								raise ValueError('''Input value must be a positive integer'''      )
				elif isinstance(__A						,		__A      ):
								raise TypeError('''Input value must be a \'int\' type'''      )
				return 0 if (a == 0) else int(loga(a & -a      )      )


if __name__ == "__main__":
		import doctest

		doctest.testmod()












'''simple docstring'''







def 		_UpperCAmelCase   (							__A							:   str						,		__A							:   str      ):

				def get_matched_characters(__A							:   str						,		__A							:   str      ) -> str:
								a_		:  Union[str, Any]											=      []
								a_		:  int											=      min(len(_stra      )						,		len(_stra      )      ) // 2
								for i, l in enumerate(_stra      ):
												a_		:  Any											=      int(max(0						,		i - limit      )      )
												a_		:  Union[str, Any]											=      int(min(i + limit + 1						,		len(_stra      )      )      )
												if l in _stra[left:right]:
																matched.append(__A      )
																a_		:  Any											=      f'{_stra[0:_stra.index(__A      )]} {_stra[_stra.index(__A      ) + 1:]}'

								return "".join(__A      )

				# matching characters
				a_		:  Optional[Any]											=      get_matched_characters(__A						,		__A      )
				a_		:  int											=      get_matched_characters(__A						,		__A      )
				a_		:  Any											=      len(__A      )

				# transposition
				a_		:  List[Any]											=      (
				    len([(ca, ca) for ca, ca in zip(__A						,		__A      ) if ca != ca]      ) // 2
				)

				if not match_count:
								a_		:  Dict											=      0.0
				else:
								a_		:  Optional[int]											=      (
								    1
								    / 3
								    * (
								        match_count / len(__A      )
								        + match_count / len(__A      )
								        + (match_count - transpositions) / match_count
								    )
								)

				# common prefix up to 4 characters
				a_		:  List[str]											=      0
				for ca, ca in zip(stra[:4]						,		stra[:4]      ):
								if ca == ca:
												prefix_len += 1
								else:
												break

				return jaro + 0.1 * prefix_len * (1 - jaro)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		print(jaro_winkler('hello', 'world'))




