change name of mpz_next_likely_prime to mpz_next_prime_candidate
This commit is contained in:
parent
3b44e231b0
commit
48d48a58d3
@ -1,26 +1,26 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_core2", "dll_mpir_core2\dll_mpir_core2.vcxproj", "{22a25b06-1161-11e3-94a9-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_core2", "dll_mpir_core2\dll_mpir_core2.vcxproj", "{22A25B06-1161-11E3-94A9-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_core2", "lib_mpir_core2\lib_mpir_core2.vcxproj", "{22a73d7e-1161-11e3-b08d-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_core2", "lib_mpir_core2\lib_mpir_core2.vcxproj", "{22A73D7E-1161-11E3-B08D-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_cxx", "lib_mpir_cxx\lib_mpir_cxx.vcxproj", "{33151f1e-1161-11e3-ac27-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_cxx", "lib_mpir_cxx\lib_mpir_cxx.vcxproj", "{33151F1E-1161-11E3-AC27-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_k8", "dll_mpir_k8\dll_mpir_k8.vcxproj", "{2d4a2d36-1161-11e3-93c6-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_k8", "dll_mpir_k8\dll_mpir_k8.vcxproj", "{2D4A2D36-1161-11E3-93C6-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_k8", "lib_mpir_k8\lib_mpir_k8.vcxproj", "{2d4f0fb8-1161-11e3-b5c3-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_k8", "lib_mpir_k8\lib_mpir_k8.vcxproj", "{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_nehalem", "dll_mpir_nehalem\dll_mpir_nehalem.vcxproj", "{330ce100-1161-11e3-87ff-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_nehalem", "dll_mpir_nehalem\dll_mpir_nehalem.vcxproj", "{330CE100-1161-11E3-87FF-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_nehalem", "lib_mpir_nehalem\lib_mpir_nehalem.vcxproj", "{33119c70-1161-11e3-a0ef-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_nehalem", "lib_mpir_nehalem\lib_mpir_nehalem.vcxproj", "{33119C70-1161-11E3-A0EF-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_gc", "lib_mpir_gc\lib_mpir_gc.vcxproj", "{0A19FBDA-1160-11E3-8385-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_gc", "dll_mpir_gc\dll_mpir_gc.vcxproj", "{0A10AC58-1160-11E3-8A1A-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_p3", "dll_mpir_p3\dll_mpir_p3.vcxproj", "{16e7f3fa-1161-11e3-b682-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dll_mpir_p3", "dll_mpir_p3\dll_mpir_p3.vcxproj", "{16E7F3FA-1161-11E3-B682-24FD5238C490}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_p3", "lib_mpir_p3\lib_mpir_p3.vcxproj", "{16ecd674-1161-11e3-897c-24fd5238c490}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_p3", "lib_mpir_p3\lib_mpir_p3.vcxproj", "{16ECD674-1161-11E3-897C-24FD5238C490}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -30,50 +30,50 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EE2A1942-F156-11E2-8D07-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{EE2A1942-F156-11E2-8D07-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EE2A1942-F156-11E2-8D07-B8AC6F6D3C92}.Debug|x64.Build.0 = Debug|x64
|
||||
{EE2A1942-F156-11E2-8D07-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|x64
|
||||
{EE2A1942-F156-11E2-8D07-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|x64
|
||||
{EE2A1942-F156-11E2-8D07-B8AC6F6D3C92}.Release|x64.Build.0 = Release|x64
|
||||
{EE313C36-F156-11E2-B037-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{EE313C36-F156-11E2-B037-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EE313C36-F156-11E2-B037-B8AC6F6D3C92}.Debug|x64.Build.0 = Debug|x64
|
||||
{EE313C36-F156-11E2-B037-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|x64
|
||||
{EE313C36-F156-11E2-B037-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|x64
|
||||
{EE313C36-F156-11E2-B037-B8AC6F6D3C92}.Release|x64.Build.0 = Release|x64
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A21769C-1160-11E3-9F9D-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{F55C8588-F156-11E2-B490-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{F55C8588-F156-11E2-B490-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F55C8588-F156-11E2-B490-B8AC6F6D3C92}.Debug|x64.Build.0 = Debug|x64
|
||||
{F55C8588-F156-11E2-B490-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|x64
|
||||
{F55C8588-F156-11E2-B490-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|x64
|
||||
{F55C8588-F156-11E2-B490-B8AC6F6D3C92}.Release|x64.Build.0 = Release|x64
|
||||
{F563A69C-F156-11E2-8BDF-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{F563A69C-F156-11E2-8BDF-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F563A69C-F156-11E2-8BDF-B8AC6F6D3C92}.Debug|x64.Build.0 = Debug|x64
|
||||
{F563A69C-F156-11E2-8BDF-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|x64
|
||||
{F563A69C-F156-11E2-8BDF-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|x64
|
||||
{F563A69C-F156-11E2-8BDF-B8AC6F6D3C92}.Release|x64.Build.0 = Release|x64
|
||||
{FE096D88-F156-11E2-A196-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{FE096D88-F156-11E2-A196-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FE096D88-F156-11E2-A196-B8AC6F6D3C92}.Debug|x64.Build.0 = Debug|x64
|
||||
{FE096D88-F156-11E2-A196-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|x64
|
||||
{FE096D88-F156-11E2-A196-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|x64
|
||||
{FE096D88-F156-11E2-A196-B8AC6F6D3C92}.Release|x64.Build.0 = Release|x64
|
||||
{FE108EB6-F156-11E2-885D-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{FE108EB6-F156-11E2-885D-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FE108EB6-F156-11E2-885D-B8AC6F6D3C92}.Debug|x64.Build.0 = Debug|x64
|
||||
{FE108EB6-F156-11E2-885D-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|x64
|
||||
{FE108EB6-F156-11E2-885D-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|x64
|
||||
{FE108EB6-F156-11E2-885D-B8AC6F6D3C92}.Release|x64.Build.0 = Release|x64
|
||||
{22A25B06-1161-11E3-94A9-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{22A25B06-1161-11E3-94A9-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{22A25B06-1161-11E3-94A9-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{22A25B06-1161-11E3-94A9-24FD5238C490}.Release|Win32.ActiveCfg = Release|x64
|
||||
{22A25B06-1161-11E3-94A9-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{22A25B06-1161-11E3-94A9-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{22A73D7E-1161-11E3-B08D-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{22A73D7E-1161-11E3-B08D-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{22A73D7E-1161-11E3-B08D-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{22A73D7E-1161-11E3-B08D-24FD5238C490}.Release|Win32.ActiveCfg = Release|x64
|
||||
{22A73D7E-1161-11E3-B08D-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{22A73D7E-1161-11E3-B08D-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Release|Win32.Build.0 = Release|Win32
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{33151F1E-1161-11E3-AC27-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{2D4A2D36-1161-11E3-93C6-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{2D4A2D36-1161-11E3-93C6-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2D4A2D36-1161-11E3-93C6-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{2D4A2D36-1161-11E3-93C6-24FD5238C490}.Release|Win32.ActiveCfg = Release|x64
|
||||
{2D4A2D36-1161-11E3-93C6-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{2D4A2D36-1161-11E3-93C6-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}.Release|Win32.ActiveCfg = Release|x64
|
||||
{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{2D4F0FB8-1161-11E3-B5C3-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{330CE100-1161-11E3-87FF-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{330CE100-1161-11E3-87FF-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{330CE100-1161-11E3-87FF-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{330CE100-1161-11E3-87FF-24FD5238C490}.Release|Win32.ActiveCfg = Release|x64
|
||||
{330CE100-1161-11E3-87FF-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{330CE100-1161-11E3-87FF-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{33119C70-1161-11E3-A0EF-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|x64
|
||||
{33119C70-1161-11E3-A0EF-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{33119C70-1161-11E3-A0EF-24FD5238C490}.Debug|x64.Build.0 = Debug|x64
|
||||
{33119C70-1161-11E3-A0EF-24FD5238C490}.Release|Win32.ActiveCfg = Release|x64
|
||||
{33119C70-1161-11E3-A0EF-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{33119C70-1161-11E3-A0EF-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{0A19FBDA-1160-11E3-8385-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0A19FBDA-1160-11E3-8385-24FD5238C490}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0A19FBDA-1160-11E3-8385-24FD5238C490}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@ -90,18 +90,18 @@ Global
|
||||
{0A10AC58-1160-11E3-8A1A-24FD5238C490}.Release|Win32.Build.0 = Release|Win32
|
||||
{0A10AC58-1160-11E3-8A1A-24FD5238C490}.Release|x64.ActiveCfg = Release|x64
|
||||
{0A10AC58-1160-11E3-8A1A-24FD5238C490}.Release|x64.Build.0 = Release|x64
|
||||
{D993E8A8-F156-11E2-964E-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D993E8A8-F156-11E2-964E-B8AC6F6D3C92}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D993E8A8-F156-11E2-964E-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D993E8A8-F156-11E2-964E-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D993E8A8-F156-11E2-964E-B8AC6F6D3C92}.Release|Win32.Build.0 = Release|Win32
|
||||
{D993E8A8-F156-11E2-964E-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|Win32
|
||||
{D99B0982-F156-11E2-82AD-B8AC6F6D3C92}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D99B0982-F156-11E2-82AD-B8AC6F6D3C92}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D99B0982-F156-11E2-82AD-B8AC6F6D3C92}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D99B0982-F156-11E2-82AD-B8AC6F6D3C92}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D99B0982-F156-11E2-82AD-B8AC6F6D3C92}.Release|Win32.Build.0 = Release|Win32
|
||||
{D99B0982-F156-11E2-82AD-B8AC6F6D3C92}.Release|x64.ActiveCfg = Release|Win32
|
||||
{16E7F3FA-1161-11E3-B682-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{16E7F3FA-1161-11E3-B682-24FD5238C490}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{16E7F3FA-1161-11E3-B682-24FD5238C490}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{16E7F3FA-1161-11E3-B682-24FD5238C490}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{16E7F3FA-1161-11E3-B682-24FD5238C490}.Release|Win32.Build.0 = Release|Win32
|
||||
{16E7F3FA-1161-11E3-B682-24FD5238C490}.Release|x64.ActiveCfg = Release|Win32
|
||||
{16ECD674-1161-11E3-897C-24FD5238C490}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{16ECD674-1161-11E3-897C-24FD5238C490}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{16ECD674-1161-11E3-897C-24FD5238C490}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{16ECD674-1161-11E3-897C-24FD5238C490}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{16ECD674-1161-11E3-897C-24FD5238C490}.Release|Win32.Build.0 = Release|Win32
|
||||
{16ECD674-1161-11E3-897C-24FD5238C490}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
4
gmp-h.in
4
gmp-h.in
@ -1025,8 +1025,8 @@ __GMP_DECLSPEC void mpz_neg __GMP_PROTO ((mpz_ptr, mpz_srcptr));
|
||||
#define mpz_nextprime __gmpz_nextprime
|
||||
__GMP_DECLSPEC void mpz_nextprime __GMP_PROTO ((mpz_ptr, mpz_srcptr));
|
||||
|
||||
#define mpz_next_likely_prime __gmpz_next_likely_prime
|
||||
__GMP_DECLSPEC void mpz_next_likely_prime __GMP_PROTO ((mpz_ptr, mpz_srcptr, gmp_randstate_t));
|
||||
#define mpz_next_prime_candidate __gmpz_next_prime_candidate
|
||||
__GMP_DECLSPEC void mpz_next_prime_candidate __GMP_PROTO ((mpz_ptr, mpz_srcptr, gmp_randstate_t));
|
||||
|
||||
#define mpz_out_raw __gmpz_out_raw
|
||||
#ifdef _GMP_H_HAVE_FILE
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* mpz_next_likely_prime(p,t,rnd) - compute the next likely prime > t and store that in p.
|
||||
/* mpz_next_prime_candidate(p,t,rnd) - compute the next likely prime > t and store that in p.
|
||||
|
||||
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright 2009 Jason Moxham, Brian Gladman
|
||||
@ -27,7 +27,7 @@ Boston, MA 02110-1301, USA.
|
||||
#if 0
|
||||
|
||||
void
|
||||
mpz_next_likely_prime (mpz_ptr p, mpz_srcptr t, gmp_randstate_t rnd)
|
||||
mpz_next_prime_candidate (mpz_ptr p, mpz_srcptr t, gmp_randstate_t rnd)
|
||||
{
|
||||
mpz_add_ui (p, t, 1L);
|
||||
while (! mpz_likely_prime_p (p, rnd,0))
|
||||
@ -55,7 +55,7 @@ static unsigned short primes[] =
|
||||
#define NUMBER_OF_PRIMES (sizeof(primes) / sizeof(primes[0]))
|
||||
|
||||
void
|
||||
mpz_next_likely_prime (mpz_ptr p, mpz_srcptr n, gmp_randstate_t rnd)
|
||||
mpz_next_prime_candidate (mpz_ptr p, mpz_srcptr n, gmp_randstate_t rnd)
|
||||
{
|
||||
unsigned short *moduli;
|
||||
unsigned long difference;
|
||||
|
@ -30,7 +30,7 @@ void mpz_nextprime(mpz_ptr x, mpz_srcptr y)
|
||||
gmp_randstate_t rnd;
|
||||
|
||||
gmp_randinit_default (rnd);
|
||||
mpz_next_likely_prime(x,y, rnd);
|
||||
mpz_next_prime_candidate(x,y, rnd);
|
||||
gmp_randclear (rnd);
|
||||
|
||||
return;}
|
||||
|
@ -3,7 +3,7 @@
|
||||
Test all relevant functions except:
|
||||
mpz_bin_ui
|
||||
mpz_nextprime
|
||||
mpz_next_likely_prime
|
||||
mpz_next_prime_candidate
|
||||
mpz_mul_si
|
||||
mpz_addmul_ui (should this really allow a+=a*c?)
|
||||
|
||||
|
@ -58,7 +58,7 @@ main (int argc, char **argv)
|
||||
for( i = 0 ; i < sizeof(tests1) / sizeof(tests1[0]) ; ++i )
|
||||
{
|
||||
mpz_ui_pow_ui(x, 10, tests1[i].pow10);
|
||||
mpz_next_likely_prime(y, x, rnd);
|
||||
mpz_next_prime_candidate(y, x, rnd);
|
||||
mpz_sub(y, y, x);
|
||||
j = mpz_get_ui(y);
|
||||
if(j != tests1[i].np_off)
|
||||
@ -76,7 +76,7 @@ main (int argc, char **argv)
|
||||
s = j = 0;
|
||||
for( ; ; )
|
||||
{
|
||||
mpz_next_likely_prime(y, y, rnd);
|
||||
mpz_next_prime_candidate(y, y, rnd);
|
||||
mpz_sub(z, y, x);
|
||||
k = mpz_get_si(z);
|
||||
if(k >= 1000)
|
||||
|
Loading…
Reference in New Issue
Block a user