






import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset



@pytest.mark.parametrize('dataset_size'    ,    [None, 400 * 2**20, 600 * 2**20]      )
@pytest.mark.parametrize('input_in_memory_max_size'    ,    ['default', 0, 100 * 2**20, 900 * 2**20]      )
def 					_lowerCamelCase(			lowerCAmelCase__				:		int    ,    lowerCAmelCase__				:		List[str]    ,    lowerCAmelCase__				:		Optional[Any]      ):





				'''simple docstring'''







				if input_in_memory_max_size != "default":
								monkeypatch.setattr(datasets.config    ,    'IN_MEMORY_MAX_SIZE'    ,    lowerCAmelCase__      )
				SCREAMING_SNAKE_CASE_   :	List[Any]													=   datasets.config.IN_MEMORY_MAX_SIZE
				if input_in_memory_max_size == "default":
								assert in_memory_max_size == 0
				else:
								assert in_memory_max_size == input_in_memory_max_size
				if dataset_size and in_memory_max_size:
								SCREAMING_SNAKE_CASE_   :	List[str]													=   dataset_size < in_memory_max_size
				else:
								SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   False
				SCREAMING_SNAKE_CASE_   :	List[str]													=   is_small_dataset(lowerCAmelCase__      )
				assert result == expected










import math



def 					_lowerCamelCase(			lowerCAmelCase__				:		float    ,    lowerCAmelCase__				:		float      ):





				'''simple docstring'''







				return math.pow(lowerCAmelCase__    ,    2      ) - a



def 					_lowerCamelCase(			lowerCAmelCase__				:		float      ):





				'''simple docstring'''







				return 2 * x



def 					_lowerCamelCase(			lowerCAmelCase__				:		float      ):





				'''simple docstring'''







				SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   2.0

				while start <= a:
								SCREAMING_SNAKE_CASE_   :	str													=   math.pow(lowerCAmelCase__    ,    2      )

				return start



def 					_lowerCamelCase(			lowerCAmelCase__				:		float    ,    lowerCAmelCase__				:		int = 9999    ,    lowerCAmelCase__				:		float = 0.00_000_000_000_001      ):





				'''simple docstring'''







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

				SCREAMING_SNAKE_CASE_   :	Optional[int]													=   get_initial_point(lowerCAmelCase__      )

				for _ in range(lowerCAmelCase__      ):
								SCREAMING_SNAKE_CASE_   :	Tuple													=   value
								SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   value - fx(lowerCAmelCase__    ,    lowerCAmelCase__      ) / fx_derivative(lowerCAmelCase__      )
								if abs(prev_value - value      ) < tolerance:
												return value

				return value


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

				testmod()