






from math import cos, sin, sqrt, tau

from audio_filters.iir_filter import IIRFilter
def      a_ (      _A      ,   _A      ,   _A = 1 / sqrt(2  )  )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)

				snake_case__									=     (1 - _cos) / 2
				snake_case__									=     1 - _cos

				snake_case__									=     1 + alpha
				snake_case__									=     -2 * _cos
				snake_case__									=     1 - alpha

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([aa, aa, aa]      ,   [ba, ba, ba]  )
				return filt
def      a_ (      _A      ,   _A      ,   _A = 1 / sqrt(2  )  )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)

				snake_case__									=     (1 + _cos) / 2
				snake_case__									=     -1 - _cos

				snake_case__									=     1 + alpha
				snake_case__									=     -2 * _cos
				snake_case__									=     1 - alpha

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([aa, aa, aa]      ,   [ba, ba, ba]  )
				return filt
def      a_ (      _A      ,   _A      ,   _A = 1 / sqrt(2  )  )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)

				snake_case__									=     _sin / 2
				snake_case__									=     0
				snake_case__									=     -ba

				snake_case__									=     1 + alpha
				snake_case__									=     -2 * _cos
				snake_case__									=     1 - alpha

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([aa, aa, aa]      ,   [ba, ba, ba]  )
				return filt
def      a_ (      _A      ,   _A      ,   _A = 1 / sqrt(2  )  )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)

				snake_case__									=     1 - alpha
				snake_case__									=     -2 * _cos
				snake_case__									=     1 + alpha

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([ba, ba, ba]      ,   [ba, ba, ba]  )
				return filt
def      a_ (      _A      ,   _A      ,   _A      ,   _A = 1 / sqrt(2  )      ,   )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)
				snake_case__									=     10 ** (gain_db / 40)

				snake_case__									=     1 + alpha * big_a
				snake_case__									=     -2 * _cos
				snake_case__									=     1 - alpha * big_a
				snake_case__									=     1 + alpha / big_a
				snake_case__									=     -2 * _cos
				snake_case__									=     1 - alpha / big_a

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([aa, aa, aa]      ,   [ba, ba, ba]  )
				return filt
def      a_ (      _A      ,   _A      ,   _A      ,   _A = 1 / sqrt(2  )      ,   )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)
				snake_case__									=     10 ** (gain_db / 40)
				snake_case__									=     (big_a + 1) - (big_a - 1) * _cos
				snake_case__									=     (big_a + 1) + (big_a - 1) * _cos
				snake_case__									=     (big_a - 1) - (big_a + 1) * _cos
				snake_case__									=     (big_a - 1) + (big_a + 1) * _cos
				snake_case__									=     2 * sqrt(UpperCAmelCase__  ) * alpha

				snake_case__									=     big_a * (pmc + aaa)
				snake_case__									=     2 * big_a * mpc
				snake_case__									=     big_a * (pmc - aaa)
				snake_case__									=     ppmc + aaa
				snake_case__									=     -2 * pmpc
				snake_case__									=     ppmc - aaa

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([aa, aa, aa]      ,   [ba, ba, ba]  )
				return filt


def      a_ (      _A      ,   _A      ,   _A      ,   _A = 1 / sqrt(2  )      ,   )			->			IIRFilter:







				"""simple docstring"""
				snake_case__									=     tau * frequency / samplerate
				snake_case__									=     sin(UpperCAmelCase__  )
				snake_case__									=     cos(UpperCAmelCase__  )
				snake_case__									=     _sin / (2 * q_factor)
				snake_case__									=     10 ** (gain_db / 40)
				snake_case__									=     (big_a + 1) - (big_a - 1) * _cos
				snake_case__									=     (big_a + 1) + (big_a - 1) * _cos
				snake_case__									=     (big_a - 1) - (big_a + 1) * _cos
				snake_case__									=     (big_a - 1) + (big_a + 1) * _cos
				snake_case__									=     2 * sqrt(UpperCAmelCase__  ) * alpha

				snake_case__									=     big_a * (ppmc + aaa)
				snake_case__									=     -2 * big_a * pmpc
				snake_case__									=     big_a * (ppmc - aaa)
				snake_case__									=     pmc + aaa
				snake_case__									=     2 * mpc
				snake_case__									=     pmc - aaa

				snake_case__									=     IIRFilter(2  )
				filt.set_coefficients([aa, aa, aa]      ,   [ba, ba, ba]  )
				return filt












from __future__ import annotations
def      a_ (      _A      ,   _A  )			->			str:







				"""simple docstring"""
				# Checks if the entire collection has been sorted
				if len(_A  ) <= 1 or n <= 1:
								return

				insert_next(_A      ,   n - 1  )
				rec_insertion_sort(_A      ,   n - 1  )
def      a_ (      _A      ,   _A  )			->			Tuple:







				"""simple docstring"""
				# Checks order between adjacent elements
				if index >= len(_A  ) or collection[index - 1] <= collection[index]:
								return

				# Swaps adjacent elements since they are not in ascending order
				snake_case__							,						snake_case__									=     (
				    collection[index],
				    collection[index - 1],
				)

				insert_next(_A      ,   index + 1  )


if __name__ == "__main__":
							__UpperCamelCase					:		Optional[int]	  =						input("""Enter integers separated by spaces: """)
							__UpperCamelCase					:		list[int]	  =						[int(num) for num in numbers.split()]
							rec_insertion_sort(number_list, len(number_list))
							print(number_list)




