<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://dynamo.iro.umontreal.ca/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;feed=atom&amp;action=history</id>
		<title>Programming language shootout: pidigits - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;action=history"/>
		<updated>2013-05-20T00:01:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.4</generator>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;diff=71&amp;oldid=prev</id>
		<title>Bjlucier: correct link to alioth</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;diff=71&amp;oldid=prev"/>
				<updated>2008-02-22T22:02:47Z</updated>
		
		<summary type="html">&lt;p&gt;correct link to alioth&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:02, 22 February 2008&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;gp4&lt;/del&gt;/benchmark.php?test=pidigits&amp;amp;lang=all pidigits] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;gp4sandbox&lt;/ins&gt;/benchmark.php?test=pidigits&amp;amp;lang=all pidigits] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==The program==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==The program==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;diff=57&amp;oldid=prev</id>
		<title>Bjlucier: Pidigits benchmark for alioth</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_pidigits&amp;diff=57&amp;oldid=prev"/>
				<updated>2008-02-22T21:27:27Z</updated>
		
		<summary type="html">&lt;p&gt;Pidigits benchmark for alioth&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/gp4/benchmark.php?test=pidigits&amp;amp;lang=all pidigits] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;br /&gt;
&lt;br /&gt;
==The program==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!gsi-script&lt;br /&gt;
&lt;br /&gt;
;; The Computer Language Benchmarks Game&lt;br /&gt;
;; http://shootout.alioth.debian.org/&lt;br /&gt;
;;&lt;br /&gt;
;; Derived by Bradley Lucier from the Ikarus variant&lt;br /&gt;
;; derived by Michael D. Adams from the MzScheme variant&lt;br /&gt;
&lt;br /&gt;
(declare (standard-bindings)(extended-bindings)(block)(mostly-fixnum)(not safe))&lt;br /&gt;
&lt;br /&gt;
(define-macro (let-values bindings . body)&lt;br /&gt;
  ;; good enough for our purposes here&lt;br /&gt;
  `(call-with-values&lt;br /&gt;
       (lambda () ,(cadar bindings))&lt;br /&gt;
     (lambda ,(caar bindings)&lt;br /&gt;
       ,@body)))&lt;br /&gt;
&lt;br /&gt;
(define (floor_ev q r s t x)&lt;br /&gt;
  (quotient (+ (* q x) r) (+ (* s x) t)))&lt;br /&gt;
&lt;br /&gt;
(define (comp q r s t  q2 r2 s2 t2)&lt;br /&gt;
  (values (+ (* q q2) (* r s2))&lt;br /&gt;
          (+ (* q r2) (* r t2))&lt;br /&gt;
          (+ (* s q2) (* t s2))&lt;br /&gt;
          (+ (* s r2) (* t t2))))&lt;br /&gt;
&lt;br /&gt;
(define out (current-output-port))&lt;br /&gt;
(define (next q r s t) (floor_ev q r s t 3))&lt;br /&gt;
(define (safe? q r s t n) (= n (floor_ev q r s t 4)))&lt;br /&gt;
(define (prod q r s t n) (comp 10 (fx* -10 n) 0 1  q r s t))&lt;br /&gt;
(define (mk q r s t k) (comp q r s t k (fx* 2 (fx+ 1 (fx* 2 k))) 0 (fx+ 1 (fx* 2 k))))&lt;br /&gt;
&lt;br /&gt;
(define (digit k q r s t n row col)&lt;br /&gt;
  (if (&amp;gt; n 0)&lt;br /&gt;
      (let ([y (next q r s t)])&lt;br /&gt;
        (if (safe? q r s t y)&lt;br /&gt;
            (let-values ([(q r s t) (prod q r s t y)])&lt;br /&gt;
                        (if (= col 10)&lt;br /&gt;
                            (let ([row (fx+ row 10)])&lt;br /&gt;
                              (display &amp;quot;\t:&amp;quot; out) (display row out)&lt;br /&gt;
                              (display &amp;quot;\n&amp;quot; out) (display y out)&lt;br /&gt;
                              (digit k q r s t (fx- n 1) row 1))&lt;br /&gt;
                            (begin&lt;br /&gt;
			      (display y out)&lt;br /&gt;
                              (digit k q r s t (fx- n 1) row (fx+ 1 col)))))&lt;br /&gt;
            (let-values ([(q r s t) (mk q r s t k)])&lt;br /&gt;
                        (digit (fx+ 1 k) q r s t n row col))))&lt;br /&gt;
      (begin&lt;br /&gt;
        (display (make-string (fx- 10 col) #\space) out) (display &amp;quot;\t:&amp;quot; out)&lt;br /&gt;
        (display (+ row col) out) (write-char #\newline out))))&lt;br /&gt;
&lt;br /&gt;
(define (digits n)&lt;br /&gt;
  (digit 1 1 0 0 1 n 0 0))&lt;br /&gt;
&lt;br /&gt;
(define (main . args)&lt;br /&gt;
  (digits (string-&amp;gt;number (car args)))&lt;br /&gt;
  (force-output out))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Compiling==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gsc pidigits&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Running==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gsi -:m10000 pidigits 2500 &amp;gt; output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we give a minimum heap of 10MB.&lt;/div&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	</feed>