The actual function that runs the test. BayesianLR.test is a wrapper that runs this with ever-looser tolerances.
Useful links