"""simple docstring"""






def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase )  ->  Optional[Any]:
   return 1_0 - x * x



def SCREAMING_SNAKE_CASE__			(   __UpperCAmelCase       ,    __UpperCAmelCase )  ->  str:
   # Bolzano theory in order to find if there is a root between a and b
   if equation(UpperCAmelCase_ ) * equation(UpperCAmelCase_ ) >= 0:
      raise ValueError('''Wrong space!''' )

   lowercase__:   Optional[Any]					=      a
   while (b - a) >= 0.0_1:
      # Find middle point
      lowercase__:   List[str]					=      (a + b) / 2
      # Check if middle point is root
      if equation(UpperCAmelCase_ ) == 0.0:
         break
      # Decide the side to repeat the steps
      if equation(UpperCAmelCase_ ) * equation(UpperCAmelCase_ ) < 0:
         lowercase__:   Optional[int]					=      c
      else:
         lowercase__:   Union[str, Any]					=      c
   return c


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       print(bisection(-2, 5))
       print(bisection(0, 6))




'''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



