





'''simple docstring'''




import math
def 	UpperCAmelCase_							(					__lowercase							:      float			,     __lowercase							:      float       )		->       float:


     '''simple docstring'''



     return math.pow(__lowercase			,     2       ) - a
def 	UpperCAmelCase_							(					__lowercase							:      float       )		->       float:


     '''simple docstring'''



     return 2 * x
def 	UpperCAmelCase_							(					__lowercase							:      float       )		->       float:


     '''simple docstring'''



     _UpperCAmelCase     							=   2.0

     while start <= a:
          _UpperCAmelCase     							=   math.pow(__lowercase			,     2       )

     return start
def 	UpperCAmelCase_							(					__lowercase							:      float			,     __lowercase							:      int = 9999			,     __lowercase							:      float = 0.00_0000_0000_0001       )		->       float:


     '''simple docstring'''



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

     _UpperCAmelCase     							=   get_initial_point(__lowercase       )

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

     return value


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

  testmod()











'''simple docstring'''




import math
def 	UpperCAmelCase_							(					__lowercase							:      int       )		->       bool:


     '''simple docstring'''



     return math.sqrt(__lowercase       ) * math.sqrt(__lowercase       ) == num
def 	UpperCAmelCase_							(					__lowercase							:      int       )		->       bool:


     '''simple docstring'''



     _UpperCAmelCase     							=   0
     _UpperCAmelCase     							=   n
     while left <= right:
          _UpperCAmelCase     							=   (left + right) // 2
          if mid**2 == n:
               return True
          elif mid**2 > n:
               _UpperCAmelCase     							=   mid - 1
          else:
               _UpperCAmelCase     							=   mid + 1
     return False


if __name__ == "__main__":
  import doctest

  doctest.testmod()




