


def    a__    (		snake_case__					:							float     ):
  return 10 - x * x




def    a__    (		snake_case__					:							float						,   snake_case__					:							float     ):
  # Bolzano theory in order to find if there is a root between a and b
  if equation(snake_case__     ) * equation(snake_case__     ) >= 0:
    raise ValueError("""Wrong space!"""     )

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


if __name__ == "__main__":
 import doctest

 doctest.testmod()

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









def    a__    (		snake_case__					:							int						,   snake_case__					:							int     ):
  return 1 if input_a == input_a else 0




def    a__    (		):
  assert xnor_gate(0						,   0     ) == 1
  assert xnor_gate(0						,   1     ) == 0
  assert xnor_gate(1						,   0     ) == 0
  assert xnor_gate(1						,   1     ) == 1


if __name__ == "__main__":
 print(xnor_gate(0, 0))
 print(xnor_gate(0, 1))
 print(xnor_gate(1, 0))
 print(xnor_gate(1, 1))





