I have been doing some experiments on classes of random matrices, and it seems (visually) that the distribution of eigenvalue spacings is consistent with GOE or GUE or GSE. Unfortunately, to test this, I would like to (a) be able to generate GOE/GUE/GSE spacing variates (I suppose I COULD generate very large Gaussian matrices and compute their eigenvalues, but this seems not very fast...), or even have some formula for the distribution function (there is the Wigner surmise, but it is not quite accurate). There are horriblelooking formulas in Mehta's book, but they don't seem usable, somehow. Algorithms/code must exist somewhere  any pointers would be appreciated.

I suggest you to take a look at the paper "How to Generate Random Matrices from the Classical Compact Groups" by F. Mezzadri, Notices AMS 54 (5), 592604 (2007). Can be downloaded freely from here: http://www.google.es/url?sa=t&source=web&cd=1&ved=0CBcQFjAA&url=http%3A%2F%2Fwww.ams.org%2Fnotices%2F200705%2Ffeamezzadriweb.pdf&rct=j&q=How%20to%20Generate%20Random%20Matrices%20from%20the%20Classical%20Compact%20Groups&ei=WBNTb6nFZaShAfS2bWTDw&usg=AFQjCNESHv00uIyATuY1NETwTfH5IO1fhQ&cad=rja 


If 2% accuracy is sufficient, then you can just use Wigner's surmise. It is unlikely you will be able to beat that accuracy by generating random matrices and sampling the eigenvalue spacing. If higher accuracy is needed, you can find the spacing distribution by numerical integration of a Painleve differential equation, see Forrester & Witte arXiv:mathph/0009023 A tabulated solution is in Haake's book "Quantum Signatures of Chaos", that is probably the easiest way to go. 

