






"""simple docstring"""





from math import factorial, pi



def     __lowercase					(    a :				float       ,		a :				int = 30 )					->					float:

      if not isinstance(a       ,		(int, float) ):
            raise ValueError('''maclaurin_sin() requires either an int or float for theta''' )

      if not isinstance(a       ,		a ) or accuracy <= 0:
            raise ValueError('''maclaurin_sin() requires a positive int for accuracy''' )

      __snake_case      :    List[str]  			=float(a )
      __snake_case      :    str  			=theta // (2 * pi)
      theta -= 2 * div * pi
      return sum(
          (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1 ) for r in range(a ) )



def     __lowercase					(    a :				float       ,		a :				int = 30 )					->					float:

      if not isinstance(a       ,		(int, float) ):
            raise ValueError('''maclaurin_cos() requires either an int or float for theta''' )

      if not isinstance(a       ,		a ) or accuracy <= 0:
            raise ValueError('''maclaurin_cos() requires a positive int for accuracy''' )

      __snake_case      :    Dict  			=float(a )
      __snake_case      :    int  			=theta // (2 * pi)
      theta -= 2 * div * pi
      return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r ) for r in range(a ) )


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    print(maclaurin_sin(10))
    print(maclaurin_sin(-10))
    print(maclaurin_sin(10, 15))
    print(maclaurin_sin(-10, 15))

    print(maclaurin_cos(5))
    print(maclaurin_cos(-5))
    print(maclaurin_cos(10, 15))
    print(maclaurin_cos(-10, 15))










"""simple docstring"""





from __future__ import annotations



def     __lowercase					(    a :				int       ,		a :				int )					->					list[str]:
      if partitions <= 0:
            raise ValueError('''partitions must be a positive number!''' )
      if partitions > number_of_bytes:
            raise ValueError('''partitions can not > number_of_bytes!''' )
      __snake_case      :    List[str]  			=number_of_bytes // partitions
      __snake_case      :    str  			=[]
      for i in range(a ):
            __snake_case      :    Optional[Any]  			=i * bytes_per_partition + 1
            __snake_case      :    Any  			=(
                number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
            )
            allocation_list.append(f'''{start_bytes}-{end_bytes}''' )
      return allocation_list


if __name__ == "__main__":
    import doctest

    doctest.testmod()


