'''simple docstring'''
from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

a=  6_378_137.0
a=  6_356_752.314_245
a=  6_3_7_8_1_3_7







def  _UpperCamelCase (     _a	:	float				,     _a	:	float				,     _a	:	float				,     _a	:	float			):




    """simple docstring"""



    __UpperCamelCase	:	Optional[Any]		    =  (AXIS_A - AXIS_B) / AXIS_A
    # Parametric latitudes
    # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
    __UpperCamelCase	:	Union[str, Any]		    =  atan((1 - flattening) * tan(radians(_a			)			)			)
    __UpperCamelCase	:	List[str]		    =  atan((1 - flattening) * tan(radians(_a			)			)			)

    # Compute central angle between two points
    # using haversine theta. sigma =  haversine_distance / equatorial radius
    __UpperCamelCase	:	Any		    =  haversine_distance(_a				,     _a				,     _a				,     _a			) / EQUATORIAL_RADIUS

    # Intermediate P and Q values
    __UpperCamelCase	:	Optional[Any]		    =  (b_lata + b_lata) / 2
    __UpperCamelCase	:	Tuple		    =  (b_lata - b_lata) / 2

    # Intermediate X value
    # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
    __UpperCamelCase	:	Tuple		    =  (sin(_a			) ** 2) * (cos(_a			) ** 2)
    __UpperCamelCase	:	Dict		    =  cos(sigma / 2			) ** 2
    __UpperCamelCase	:	List[str]		    =  (sigma - sin(_a			)) * (x_numerator / x_demonimator)

    # Intermediate Y value
    # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
    __UpperCamelCase	:	Any		    =  (cos(_a			) ** 2) * (sin(_a			) ** 2)
    __UpperCamelCase	:	Union[str, Any]		    =  sin(sigma / 2			) ** 2
    __UpperCamelCase	:	Union[str, Any]		    =  (sigma + sin(_a			)) * (y_numerator / y_denominator)

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


if __name__ == "__main__":
  import doctest

  doctest.testmod()




'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


a=  {}

try:
  if not is_sentencepiece_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  ['''NllbTokenizer''']

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  ['''NllbTokenizerFast''']


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

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_nllb_fast import NllbTokenizerFast

else:
  import sys

  a=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



