⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pollard.cal

📁 早期freebsd实现
💻 CAL
字号:
/* * Copyright (c) 1993 David I. Bell * Permission is granted to use, distribute, or modify this source, * provided that this copyright notice remains intact. * * Factor using Pollard's p-1 method. */define factor(N, B, ai, af){	local	a, k, i, d;	if (isnull(B))		B = 1000;	if (isnull(ai))		ai = 2;	if (isnull(af))		af = ai + 20;	k = lcmfact(B);	d = lfactor(N, B);	if (d > 1)		return d;	for (a = ai; a <= af; a++) {		i = pmod(a, k, N);		d = gcd(i - 1, N);		if ((d > 1) && (d != N))			return d;	}	return 1;}global lib_debug;if (lib_debug >= 0) {    print "factor(N, B, ai, af) defined";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -