<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I am not familiar with your subject matter, or your point. Without a set of inputs and outputs, I cannot discern if I succeeded.<div><br></div><div><div>#lang racket</div><div><br></div><div>(define (make-f n-bits k1 k2)</div><div> (define limit (expt 2 n-bits))</div><div> (define m (- limit k1))</div><div> (define a (- limit k2))</div><div> (lambda (i x) (modulo (* a x) m)))</div><div><br></div><div>(define (g n f lox)</div><div> (cond ((<= n 0) lox)</div><div> (else (g (sub1 n) f (cons (f n (car lox)) lox)))))</div><div><br></div><div>(g 4 (make-f 32 5 333333333) '(123456789)</div><div><br></div><div><br></div><div>'(3864819999 806650895 1510242424 1116891036 123456789)</div><div><br></div><div>rac</div><div><br></div><div><br></div><div><div>On Nov 17, 2012, at 5:24 AM, Hugh Aguilar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Well, if by "examples" you mean valid values for X, any 32-bit number other than 0 will work.</span></div><div><br></div> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Richard Cleis <<a href="mailto:rcleis@me.com">rcleis@me.com</a>><br> <b><span style="font-weight: bold;">To:</span></b> Hugh Aguilar <<a href="mailto:hughaguilar96@yahoo.com">hughaguilar96@yahoo.com</a>> <br><b><span style="font-weight: bold;">Cc:</span></b> "<a href="mailto:users@racket-lang.org">users@racket-lang.org</a>" <<a href="mailto:users@racket-lang.org">users@racket-lang.org</a>> <br> <b><span style="font-weight: bold;">Sent:</span></b> Saturday, November 17, 2012 4:59 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [racket]
LC53<br> </font> </div> <br>
<div id="yiv1473710582"><div>Only excessively brave Racketeers would attempt that without a good set of examples. :-)<div><br></div><div>rac</div><div><br></div></div></div> </div> </div> </div></div>____________________<br> Racket Users list:<br> <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br></blockquote></div><br></div></body></html>