




'''simple docstring'''







import math





def 						snake_case_							(_a	:							float    ,   _a	:							float     ):
    return math.pow(_a    ,   2     ) - a





def 						snake_case_							(_a	:							float     ):
    return 2 * x





def 						snake_case_							(_a	:							float     ):
    UpperCAmelCase			       =		2.0

    while start <= a:
        UpperCAmelCase			       =		math.pow(_a    ,   2     )

    return start





def 						snake_case_							(_a	:							float    ,   _a	:							int = 9_9_9_9    ,   _a	:							float = 0.00_0000_0000_0001     ):

    if a < 0:
        raise ValueError('''math domain error'''     )

    UpperCAmelCase			       =		get_initial_point(_a     )

    for _ in range(_a     ):
        UpperCAmelCase			       =		value
        UpperCAmelCase			       =		value - fx(_a    ,   _a     ) / fx_derivative(_a     )
        if abs(prev_value - value     ) < tolerance:
            return value

    return value


if __name__ == "__main__":
   from doctest import testmod

   testmod()






from typing import TYPE_CHECKING

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


__a  			=					{
    'configuration_trocr': ['TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TrOCRConfig'],
    'processing_trocr': ['TrOCRProcessor'],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a  			=					[
						    'TROCR_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'TrOCRForCausalLM',
						    'TrOCRPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
						from .processing_trocr import TrOCRProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
						import sys

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




