





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

snake_case_           =     6378137.0
snake_case_           =     6356752.314245
snake_case_           =     6378137






def lowerCamelCase__       (				snake_case_      :    Any			, snake_case_      :    List[Any]			, snake_case_      :    Union[str, Any]			, snake_case_      :    List[Any]			) ->							Union[str, Any]:
   __snake_case							=  (AXIS_A - AXIS_B) / AXIS_A
   __snake_case							=  atan((1 - flattening) * tan(radians(snake_case__			)			)			)
   __snake_case							=  atan((1 - flattening) * tan(radians(snake_case__			)			)			)
   __snake_case							=  radians(snake_case__			)
   __snake_case							=  radians(snake_case__			)
   # Equation
   __snake_case							=  sin((phi_a - phi_a) / 2			)
   __snake_case							=  sin((lambda_a - lambda_a) / 2			)
   # Square both values
   sin_sq_phi *= sin_sq_phi
   sin_sq_lambda *= sin_sq_lambda
   __snake_case							=  sqrt(sin_sq_phi + (cos(snake_case__			) * cos(snake_case__			) * sin_sq_lambda)			)
   return 2 * RADIUS * asin(snake_case__			)


if __name__ == "__main__":
    import doctest

    doctest.testmod()




"""simple docstring"""




A_				:      Any           =			"0.21.0"

from .accelerator import Accelerator
from .big_modeling import (
    cpu_offload,
    cpu_offload_with_hook,
    disk_offload,
    dispatch_model,
    init_empty_weights,
    init_on_device,
    load_checkpoint_and_dispatch,
)
from .data_loader import skip_first_batches
from .launchers import debug_launcher, notebook_launcher
from .state import PartialState
from .utils import (
    DeepSpeedPlugin,
    DistributedDataParallelKwargs,
    DistributedType,
    FullyShardedDataParallelPlugin,
    GradScalerKwargs,
    InitProcessGroupKwargs,
    find_executable_batch_size,
    infer_auto_device_map,
    is_rich_available,
    load_checkpoint_in_model,
    synchronize_rng_states,
)


if is_rich_available():
						from .utils import rich


