<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 快速进行素数测试</title>
	<atom:link href="http://shellex.info/do-check-prime-quickly/feed/" rel="self" type="application/rss+xml" />
	<link>http://shellex.info/do-check-prime-quickly/</link>
	<description>Hola, 欢迎来到shellex的部落格</description>
	<lastBuildDate>Fri, 27 Aug 2010 18:29:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: dustman</title>
		<link>http://shellex.info/do-check-prime-quickly/comment-page-1/#comment-939</link>
		<dc:creator>dustman</dc:creator>
		<pubDate>Thu, 15 Jan 2009 02:56:59 +0000</pubDate>
		<guid isPermaLink="false">http://shellex.info/index.php/?p=113#comment-939</guid>
		<description>奶奶滴 你写的代码让我脑袋都大了

(define (exp_e a n)
  (exp-iter a n 1))
(define (exp-iter product n a)
  (cond ((= n 0) a)
       ((even? n) (exp-iter (square product) (/ n 2) a))
       (else (exp-iter product (- n 1) (* product a)))))
(define (exp-mod a n)
  (if(= (remainder (exp_e  a (- n 1)) n) 1)
     1
     0))
(define (prime-test n)
  (exp-mod (random n) n))
(define (prime? n times)
  (cond ((= (prime-test n) 0) 0)
       ((= times 0) 1)
       (else (prime? n (- times 1)))))


这是迭代版 能迭代的部分我都迭代了</description>
		<content:encoded><![CDATA[<p>奶奶滴 你写的代码让我脑袋都大了</p>
<p>(define (exp_e a n)<br />
  (exp-iter a n 1))<br />
(define (exp-iter product n a)<br />
  (cond ((= n 0) a)<br />
       ((even? n) (exp-iter (square product) (/ n 2) a))<br />
       (else (exp-iter product (- n 1) (* product a)))))<br />
(define (exp-mod a n)<br />
  (if(= (remainder (exp_e  a (- n 1)) n) 1)<br />
     1<br />
     0))<br />
(define (prime-test n)<br />
  (exp-mod (random n) n))<br />
(define (prime? n times)<br />
  (cond ((= (prime-test n) 0) 0)<br />
       ((= times 0) 1)<br />
       (else (prime? n (- times 1)))))</p>
<p>这是迭代版 能迭代的部分我都迭代了</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dustman</title>
		<link>http://shellex.info/do-check-prime-quickly/comment-page-1/#comment-938</link>
		<dc:creator>dustman</dc:creator>
		<pubDate>Thu, 15 Jan 2009 01:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://shellex.info/index.php/?p=113#comment-938</guid>
		<description>尾递归英文是什么 我看SICP里好像没提到过 

iterative 就是迭代 可能也是尾递归吧

老哥质数没有递推公式 你能把他转化成迭代形式 你就是神...(或许是我理解错误?)</description>
		<content:encoded><![CDATA[<p>尾递归英文是什么 我看SICP里好像没提到过 </p>
<p>iterative 就是迭代 可能也是尾递归吧</p>
<p>老哥质数没有递推公式 你能把他转化成迭代形式 你就是神&#8230;(或许是我理解错误?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustman</title>
		<link>http://shellex.info/do-check-prime-quickly/comment-page-1/#comment-584</link>
		<dc:creator>Dustman</dc:creator>
		<pubDate>Sat, 01 Nov 2008 22:46:09 +0000</pubDate>
		<guid isPermaLink="false">http://shellex.info/index.php/?p=113#comment-584</guid>
		<description>&quot;所以，如果你不愿意去记录Carmichael数表的话，我们可以加强我们的素数测试方法。&quot;
		
我怎么觉得这句话有问题</description>
		<content:encoded><![CDATA[<p>&#8220;所以，如果你不愿意去记录Carmichael数表的话，我们可以加强我们的素数测试方法。&#8221;</p>
<p>我怎么觉得这句话有问题</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shellex</title>
		<link>http://shellex.info/do-check-prime-quickly/comment-page-1/#comment-291</link>
		<dc:creator>shellex</dc:creator>
		<pubDate>Sun, 27 Jul 2008 00:53:43 +0000</pubDate>
		<guid isPermaLink="false">http://shellex.info/index.php/?p=113#comment-291</guid>
		<description>[quote comment=&quot;290&quot;]递归的反汇编码,读起来可是非常费劲的..
普通的循环求解,我觉得更容易理解啊,不知道是不是习惯问题

话说LISP这种括号匹配,你眼睛不花吗?[/quote]

递归的高级语言代码和汇编代码都很好理解。相反，很多时候是循环不好理解。
对于Lisp这种东东，你知道我们都很依赖NB的编辑器</description>
		<content:encoded><![CDATA[<p>[quote comment="290"]递归的反汇编码,读起来可是非常费劲的..<br />
普通的循环求解,我觉得更容易理解啊,不知道是不是习惯问题</p>
<p>话说LISP这种括号匹配,你眼睛不花吗?[/quote]</p>
<p>递归的高级语言代码和汇编代码都很好理解。相反，很多时候是循环不好理解。<br />
对于Lisp这种东东，你知道我们都很依赖NB的编辑器</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustman</title>
		<link>http://shellex.info/do-check-prime-quickly/comment-page-1/#comment-290</link>
		<dc:creator>Dustman</dc:creator>
		<pubDate>Sat, 26 Jul 2008 20:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://shellex.info/index.php/?p=113#comment-290</guid>
		<description>递归的反汇编码,读起来可是非常费劲的..
普通的循环求解,我觉得更容易理解啊,不知道是不是习惯问题

话说LISP这种括号匹配,你眼睛不花吗?</description>
		<content:encoded><![CDATA[<p>递归的反汇编码,读起来可是非常费劲的..<br />
普通的循环求解,我觉得更容易理解啊,不知道是不是习惯问题</p>
<p>话说LISP这种括号匹配,你眼睛不花吗?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
