

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

from .haversine_distance import haversine_distance

_SCREAMING_SNAKE_CASE  :						str         =    6_3_7_8_1_3_7.0
_SCREAMING_SNAKE_CASE  :						str         =    6_3_5_6_7_5_2.3_1_4_2_4_5
_SCREAMING_SNAKE_CASE  :						Dict         =    6378137
def        UpperCAmelCase_     (		_A   ,	_A   ,	_A   ,	_A       ):





     '''simple docstring'''




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

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

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

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

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

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


if __name__ == "__main__":
       import doctest

       doctest.testmod()





from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Sequence, Value
from .base import TaskTemplate






@dataclass(frozen=A__ )
class  UpperCAmelCase__	( A__ ):






  """simple docstring"""


  a     =      field(default="question-answering-extractive"		,  metadata={"include_in_asdict_even_if_is_default": True} )
  a     =      Features({"question": Value("string" ), "context": Value("string" )} )
  a     =      Features(
      {
          "answers": Sequence(
              {
                  "text": Value("string" ),
                  "answer_start": Value("int32" ),
              } )
      } )
  a     =      "question"
  a     =      "context"
  a     =      "answers"






  @property
  def    lowercase_	(							self		:	Dict      )	->							Dict[str, str]:
       return {self.question_column: "question", self.context_column: "context", self.answers_column: "answers"}


