


"""simple docstring"""







__a			 =   10_00






def 					a__ (       _UpperCamelCase ):





						"""simple docstring"""

						return x * x






def 					a__ (       _UpperCamelCase	,			_UpperCamelCase	,			_UpperCamelCase	,			_UpperCamelCase = 4 ):





						"""simple docstring"""

						assert callable(
						    _UpperCamelCase ), F"""the function(object) passed should be callable your input : {function}"""
						assert isinstance(_UpperCamelCase	,			(float, int) ), F"""a should be float or integer your input : {a}"""
						assert isinstance(function(_UpperCamelCase )	,			(float, int) ), (
						    "the function should return integer or float return type of your function, "
						    F"""{type(_UpperCamelCase )}"""
						)
						assert isinstance(_UpperCamelCase	,			(float, int) ), F"""b should be float or integer your input : {b}"""
						assert (
						    isinstance(_UpperCamelCase	,			_UpperCamelCase ) and precision > 0
						), F"""precision should be positive integer your input : {precision}"""

						# just applying the formula of simpson for approximate integration written in
						# mentioned article in first comment of this file and above this function

						UpperCAmelCase__		=    (b - a) / N_STEPS
						UpperCAmelCase__		=    function(_UpperCamelCase ) + function(_UpperCamelCase )

						for i in range(1	,			_UpperCamelCase ):
												UpperCAmelCase__		=    a + h * i
												result += function(_UpperCamelCase ) * (4 if i % 2 else 2)

						result *= h / 3
						return round(_UpperCamelCase	,			_UpperCamelCase )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



"""simple docstring"""







import safs
class 							lowerCamelCase       (			safs.SaFileSystem ):


							"""simple docstring"""