home
e-commerce
monetary policy
nonlinear dynamics
programming
course links
Gerald P. Dwyer, Jr.

programming

This part of my site gets down in the trenches.  You can use the information in this section to include various random number generators in your programs or to test generators.  I also have a preliminary working paper on open-source software that is available here. 

Open Source Software

I have written a preliminary paper on “The Economics of Open-Source Software” (27K).  Open source software is an intriguing issue.  This paper is more of a discussion piece than a research paper.  It is a work in progress and I am working on a revision.

The bottom line of my analysis is that open-source software does not rely on altruistic or starving programmers to succeed, and open-source software will succeed for certain kinds of software.  Open-source software is not going to be the only way that software ever is written though.

Open-source software is a heated subject, with talk of revolutions and returns to the glory days of prior, supposedly altruistic days instead of the rampant greed today.  It makes great prose and fun reading. In the end, though, there is one thing that can be said: anyone who is seriously inclined to think this should read and absorb a good principles of economics book like Paul Heyne's The Economic Way of Thinking.  (And no, there's no link to amazon.com for you to buy it and for me to get a check.)

Random Number Generators

The articles on random number generators focus on explaining and implementing the commonly used congruential generators.  Code in C is included that you use, or you can translate the code into other languages.

Some of the articles focus on tests of generators.  These tests examine properties of generators that are important to users.  Failure almost surely means that the output will be inadequate to a user.  Correctly implemented, common generators pass these tests.

I have written some articles on random number generators for C/C++ Users Journal.  These articles are available in some libraries.

Quick and Portable Random Number Generators. C/C++ Users Journal 13 (June 1995), 33-44.

Testing Random Number Generators. (with K. B. Williams.) C/C++ Users Journal 14 (June 1996), 39-48.

Testing Random Number Generators: Part 2. (with K. B. Williams.) C/C++ Users Journal 14 (August 1996), 55-66.

The C/C++ Users Journal web site is   http://www.cuj.com/.  The code from the articles is no longer available at their website but it is available in the zip file random.zip (591KB).

The ThinAir C++ class library defines a simple, powerful interface to a set of pseudo-random number generators, including the DwyerRandGen.  The home page for G. Wade Johnson's ThinAir pseudo-random number generator library is http://www.anomaly.org/ThinAir/.

Someone who proposes a new generator wants a better generator, not just one as good as those already available.  The “Testing ...” papers in C/C++ Users Journal discuss many tests that are designed to trip up generators. 

K.B. and I have written two other papers that are more of research papers.  Anyone who can read the C/C++ articles should be able to read these papers also.

One working paper is a short summary of our research on finding better combination congruential generators. This paper “Portable Random Number Generators” is available as the pdf file randomsh.pdf (26KB). This is a draft of the paper that appeared in the Journal of Economic Dynamics and Control in January 2003.

The second paper, “Portable Random Number Generators: An Exposition”, is an expository paper for economists available here in two parts.  The first part is all of the text, tables and code. This part is random.pdf (113KB).  The second part consists of the three figures, as randfigs.pdf (2.5MB).  Sorry about the size of the figures but the figures convey a lot of information that wouldn't be there if they were smaller.

The zip file random.zip (591KB) contains code for combined generators in C and C++ with the best parameters from the most recent calculations that are summarized in the Journal of Economic Dynamics and Control article.


 |  home  |  e-commerce  |  monetary policy  |  nonlinear dynamics  | 
 |  programming  |  course links  |  about Gerald P. Dwyer, Jr.  | 


Contact Gerald P. Dwyer, Jr. at gdwyer@dwyerecon.com.
E-mail webmaster@dwyerecon.com with comments about the web site.
Web site created by Tamara Dwyer.

First installed:  10/01/1999
Last updated:  03/18/2003