
'''simple docstring'''



def A (__lowerCamelCase :float						):
						return 10 - x * x


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

						_lowerCAmelCase    		=					a
						while (b - a) >= 0.01:
												# Find middle point
												_lowerCAmelCase    		=					(a + b) / 2
												# Check if middle point is root
												if equation(__lowerCamelCase						) == 0.0:
																		break
												# Decide the side to repeat the steps
												if equation(__lowerCamelCase						) * equation(__lowerCamelCase						) < 0:
																		_lowerCAmelCase    		=					c
												else:
																		_lowerCAmelCase    		=					c
						return c


if __name__ == "__main__":
						import doctest

						doctest.testmod()

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


'''simple docstring'''



from .testing import (
    are_the_same_tensors,
    execute_subprocess_async,
    require_bnb,
    require_cpu,
    require_cuda,
    require_huggingface_suite,
    require_mps,
    require_multi_gpu,
    require_multi_xpu,
    require_safetensors,
    require_single_gpu,
    require_single_xpu,
    require_torch_min_version,
    require_tpu,
    require_xpu,
    skip,
    slow,
)
from .training import RegressionDataset, RegressionModel, RegressionModelaXPU


from .scripts import test_script, test_sync, test_ops  # isort: skip
