
"""simple docstring"""





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

from .haversine_distance import haversine_distance

UpperCamelCase_					:						Tuple				= 637_8137.0
UpperCamelCase_					:						List[str]				= 635_6752.31_4245
UpperCamelCase_					:						Dict				= 637_8137
def 							A_     (__a				,   __a				,   __a				,   __a				):

					'''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(__a				)				)				)
					A_				 =						atan((1 - flattening) * tan(radians(__a				)				)				)

					# Compute central angle between two points
					# using haversine theta. sigma =  haversine_distance / equatorial radius
					A_				 =						haversine_distance(__a				,   __a				,   __a				,   __a				) / 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(__a				) ** 2) * (cos(__a				) ** 2)
					A_				 =						cos(sigma / 2				) ** 2
					A_				 =						(sigma - sin(__a				)) * (x_numerator / x_demonimator)

					# Intermediate Y value
					# Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
					A_				 =						(cos(__a				) ** 2) * (sin(__a				) ** 2)
					A_				 =						sin(sigma / 2				) ** 2
					A_				 =						(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"""





# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase_					:						str				= {'''configuration_timm_backbone''': ['''TimmBackboneConfig''']}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		UpperCamelCase_					:						Union[str, Any]				= ['''TimmBackbone''']


if TYPE_CHECKING:
		from .configuration_timm_backbone import TimmBackboneConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_timm_backbone import TimmBackbone

else:
		import sys

		UpperCamelCase_					:						List[Any]				= _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




