{"id":1227,"date":"2009-08-24T11:37:05","date_gmt":"2009-08-24T09:37:05","guid":{"rendered":"https:\/\/wpethzprd.ethz.ch\/kowalski\/?p=1227"},"modified":"2024-02-20T13:40:55","modified_gmt":"2024-02-20T11:40:55","slug":"kloostermania-the-program","status":"publish","type":"post","link":"https:\/\/blogs.ethz.ch\/kowalski\/2009\/08\/24\/kloostermania-the-program\/","title":{"rendered":"Kloostermania, the program"},"content":{"rendered":"<p>While cleaning up a bit the files on my laptop recently, I &#8220;discovered&#8221; an old computer program that I had written some time in 2003 or so, to display the graphical evolution of the partial sums of exponential sums, and more precisely of Kloosterman sums.  In other words, given a prime number <i>p<\/i> and integers <i>a<\/i> and <i>b<\/i>, this program plots the points in the complex plane corresponding to the values<\/p>\n<p>$latex S_k=\\sum_{x=0}^{k}{\\exp(2i\\pi \\frac{ax+b\\bar{x}}{p})}$<\/p>\n<p>for <\/p>\n<p>$latex 0\\leq k\\leq p-1,$<\/p>\n<p>and draws the line segments joining each successive <i>S<sub>k<\/sub><\/i>. (As usual, the bar over <i>x<\/i> indicates the inverse modulo <i>p<\/i>). <\/p>\n<p>The resulting paths look fittingly psychedelic:<\/p>\n<p><a href=\"https:\/\/blogs.ethz.ch\/kowalski\/files\/2009\/08\/kl-10007.png\"><img decoding=\"async\" src=\"https:\/\/blogs.ethz.ch\/kowalski\/files\/2009\/08\/kl-10007.png\" alt=\"\" style=\"border: 1px solid black\" width=\"600\" class=\"aligncenter size-medium wp-image-1231\" \/><\/a><\/p>\n<p>The rather badly written code (for moderately modern Linux systems) can be downloaded <a href=\"http:\/\/www.math.ethz.ch\/~kowalski\/kloostermania.tar.gz\">here<\/a>; the compilation should be a straightforward<\/p>\n<p><code> .\/configure ; make <\/code><\/p>\n<p>the resulting executable <b>kloostermania<\/b> is then found in the <b>src<\/b> directory.<\/p>\n<p>Alternatively, still for pretty recent Linux systems (at least, Fedora on Intel machines), you can get the executable <a href=\"http:\/\/www.math.ethz.ch\/~kowalski\/kloostermania\">here<\/a>.<\/p>\n<p>(I should probably state formally that the license is GPL, not that there&#8217;s much danger of a proprietary software company deciding to make a fortune and deprive mathematicians of much freedom to play with the code by selling derivatives of this program; of course, if anyone decides to add features or to make the program work, e.g., on Mac, this would be much appreciated&#8230;)<\/p>\n<p>The program should be fairly easy to use; the <b>File<\/b> menu offers the possibility of saving the current picture as a PNG file or to print it to a PostScript file (the New and Open commands are just decoys). The <b>Edit<\/b> menu&#8217;s only interesting item is the Preference command, where the colors can be changed by clicking on the respective patches, and where the drawing of the axes can be disabled if desired. The <b>View<\/b> menu&#8217;s equally single item is used to enter the parameter for a new drawing; if the modulus <i>p<\/i> is not prime, the next prime will be selected (computed in a ridiculously inefficient way&#8230;)  Finally, the current parameters and the final value of the sum are displayed at the bottom of the window&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While cleaning up a bit the files on my laptop recently, I &#8220;discovered&#8221; an old computer program that I had written some time in 2003 or so, to display the graphical evolution of the partial sums of exponential sums, and more precisely of Kloosterman sums. In other words, given a prime number p and integers &hellip; <a href=\"https:\/\/blogs.ethz.ch\/kowalski\/2009\/08\/24\/kloostermania-the-program\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Kloostermania, the program<\/span><\/a><\/p>\n","protected":false},"author":625,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-1227","post","type-post","status-publish","format-standard","hentry","category-blogroll"],"_links":{"self":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/posts\/1227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/users\/625"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/comments?post=1227"}],"version-history":[{"count":0,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/posts\/1227\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/media?parent=1227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/categories?post=1227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ethz.ch\/kowalski\/wp-json\/wp\/v2\/tags?post=1227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}