






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


__magic_name__:	Any							=      {}

try:
		if not is_sentencepiece_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__magic_name__:	Union[str, Any]							=      ["""BartphoTokenizer"""]

if TYPE_CHECKING:
		try:
				if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_bartpho import BartphoTokenizer

else:
		import sys

		__magic_name__:	int							=      _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

_lowerCamelCase      :						Dict							=  6_378_137.0
_lowerCamelCase      :						Union[str, Any]							=  6_356_752.314_245
_lowerCamelCase      :						List[Any]							=  6378137







def SCREAMING_SNAKE_CASE							(			lowercase_					,							lowercase_					,							lowercase_					,							lowercase_		)  ->			float:



       """simple docstring"""

       A__ 					=       (AXIS_A - AXIS_B) / AXIS_A
       # Parametric latitudes
       # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
       A__ 					=       atan((1 - flattening) * tan(radians(lowercase_		)		)		)
       A__ 					=       atan((1 - flattening) * tan(radians(lowercase_		)		)		)

       # Compute central angle between two points
       # using haversine theta. sigma =  haversine_distance / equatorial radius
       A__ 					=       haversine_distance(lowercase_					,							lowercase_					,							lowercase_					,							lowercase_		) / EQUATORIAL_RADIUS

       # Intermediate P and Q values
       A__ 					=       (b_lata + b_lata) / 2
       A__ 					=       (b_lata - b_lata) / 2

       # Intermediate X value
       # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
       A__ 					=       (sin(lowercase_		) ** 2) * (cos(lowercase_		) ** 2)
       A__ 					=       cos(sigma / 2		) ** 2
       A__ 					=       (sigma - sin(lowercase_		)) * (x_numerator / x_demonimator)

       # Intermediate Y value
       # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
       A__ 					=       (cos(lowercase_		) ** 2) * (sin(lowercase_		) ** 2)
       A__ 					=       sin(sigma / 2		) ** 2
       A__ 					=       (sigma + sin(lowercase_		)) * (y_numerator / y_denominator)

       return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
  import doctest

  doctest.testmod()


