hermann on Mon, 19 Jun 2023 02:33:48 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: void mpz_set_GEN(mpz_ptr z, GEN x) and GEN mpz_get_GEN(mpz_srcptr z) |
On 2023-06-19 02:15, hermann@stamm-wilbrandt.de wrote:
Thank you. After adding missing semicolon, variable declaration and return statement, g++ compiled. I did some more changes to make cpplimt happy, as gist for investigating the unmap() error: https://gist.github.com/Hermann-SW/6abf2866af5446a4b01ca0af7a45d99b While it works, there is an unmap error on freeing resources. How to fix that?
Just compiled on Intel Linux, and there no munmap error happens ... stammw:c++$ f=sqrtm1.smallest_known_1million_digit_prime stammw:c++$ g++ $f.cc -lgmp -lgmpxx -O3 -o $f -lpari -DPARI stammw:c++$ ./sqrtm1.smallest_known_1million_digit_prime a = y^(-1) (mod p) [powm]; a *= x; a %= p 0.253261s [M,V] = halfgcdii(sqrtm1, p) 0.274745s [x,y] = [V[2], M[2,1]] 9.1e-05s done stammw:c++$