New submission from Марат Нагаев <sidorovmarat1...@gmail.com>:

Hello.
I want to implement pow2 function special for powers of 2.
pow2 works 110 times faster if we pow 4 to 10**6
pow2 implementaion on Python:
def pow2(a,b):
p=log2(a)*b
if not p.isinteger():
raise TypeError('a isn't power of 2!')
return 1«p

----------
components: Library (Lib)
messages: 338728
nosy: nagayev
priority: normal
severity: normal
status: open
title: [math] Implement pow2 function
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36415>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to