mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   GwNum in Python (https://www.mersenneforum.org/showthread.php?t=27111)

moytrage 2021-08-30 16:33

GwNum in Python
 
Hi! Is there any gwnum-based long-integer-arithmetics library in Python?

There exists [url=https://gmpy2.readthedocs.io/en/latest/]gmpy2[/url] library but it is only GMP based, and I don't know if this GMP version is using gwnum or not.

I heard that GMP can be compiled using gwnum support. Does anyone know if GMPY2 has this gwnum-based ready-made builds anywhere available for download?

I need both Windows and Linux versions. Windows is of higher priority.

If not GMPY2 then maybe some other gwnum-based library exists? Or maybe some C-bindings (or Cython) of gwnum for Python?

First of all I need ability to modular square a huge number. Or just powmod(a, b, c), raising a to b modulus c.

Why I want gwnum? I expect gwnum to be faster than regular GMP (without gwnum support). And I need fastest solution for my task in Python.

paulunderwood 2021-08-30 19:20

[QUOTE=moytrage;586870]Hi! Is there any gwnum-based long-integer-arithmetics library in Python?
[/QUOTE]

Search for embedding C in Python

:google:

moytrage 2021-08-31 03:50

[QUOTE=paulunderwood;586880]Search for embedding C in Python[/QUOTE]

Thanks for reply! As I understand you suggest me to write my own C-binding library for Python using gwnum?

I understand that it is possible. But the only reason I posted this thread because I wanted to check if somebody already did this effort.

Also there might exist not just plain bindings but some advanced and beautiful Python library based on gwnum. Of cause I would prefer to use such instead of regular bindings written in few hours.

Basically I wanted to check if something ready made out-of-the-box already exists.

Of cause otherwise I will write my C-bindings if nothing exists.

kriesel 2021-08-31 08:06

[url]https://ielts.studyhorror.com/d/cause-or-course[/url]


All times are UTC. The time now is 13:53.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.