This page lists some software I’ve written or written about.

Stand-alone numerical software

Software for numerical computing, primarily special functions and random number generation. Code available in C++, C#, and Python.

Statistical utilities

How to test a random number generator, Chapter 10 of the O’Reilly book Beautiful Testing.

I have worked a lot with on random inequalities, and Inequality Calculator often comes in handy. Parameter Solver is also popular, used for determining distribution parameters based on quantiles or mean and variance.

If you’d like help with biostatistics or randomization, please contact me.

CodeProject articles

I’ve posted a few articles along with source code on CodeProject.

Update: Apparently CodeProject has deleted a lot of their older articles. Here are a couple that are still on their site:

Five tips for floating point programming gives five of the most important things someone needs to know when working with floating point numbers.

Numerical integration with Simpson’s rule

Other articles that were once on CodeProject:

Simple Random Number Generation is a random number generator written in C# based on George Marsaglia’s WMC algorithm.

PowerShell Script for Reviewing Text Show to Users is a tool for finding errors in prose displayed to users that might not be exposed during testing.

Avoiding Overflow, Underflow, and Loss of Precision explains why the most obvious method for evaluating mathematical functions may not work. The article includes C++ source code for evaluating some functions that come up in statistics (particularly logistic regression) that could have problems if naïvely implemented.

Automated Extract and Build from Team System using PowerShell explains a PowerShell script to automatically extract and build Visual Studio projects from Visual Studio Team System (VSTS) version control.

Calculating percentiles in memory-bound applications gives an algorithm and C++ code for calculating percentiles of a list too large to fit into memory.

Quick Start for C++ TR1 Regular Expressions answers 10 of the first questions that are likely to come to mind when someone wants to use the new regular expression support in C++.

Monitoring unreliable scheduled tasks describes a simple program for monitoring legacy processes.

Pitfalls in Random Number Generation includes several lessons learned the hard way.

Filling in the gaps: simple interpolation discusses linear interpolation and inverse interpolation, and gives some suggestions for what to do next if linear interpolation isn’t adequate.

Optimizing a function of one variable with Brent’s method.

Fast numerical integration using the double-exponential transform method. Optimally efficient numerical integration for analytic functions over a finite interval.

Computing normal probabilities in IronPython explains why you can’t use SciPy from IronPython easily (yet) and gives code for computing the normal CDF in stand-alone Python that will work from IronPython.

Getting started with the SciPy (Scientific Python) library

Finding probability distribution parameters from percentiles

Three methods for root-finding in C#

An introduction to numerical programming in C#


Clinical trial software

CRMSimulator is used to design CRM trials, dose-finding based only on toxicity outcomes.

BMA-CRMSimulator is a variation on CRMSimulator using Bayesian model averaging.

EffTox is used for dose-finding based on toxicity and efficacy outcomes.

TTEConduct and TTEDesigner are for safety monitoring of single-arm trials with time-to-event outcomes.

Multc Lean monitors two binary outcomes, efficacy and toxicity.

Adaptive Randomization is for multiple-arm trials using outcome-adaptive randomization.

If you’d like help with adaptive clinical trials, software or design, please contact me.


PowerShell is a new shell for Windows. After decades of having a wimpy command line compared to Unix, Microsoft produced a shell more powerful than its Unix counterparts. The biggest difference is that while Unix shells pipe text, PowerShell pipes objects.

PowerShell gotchas lists the top five features a new users might find frustrating and gives a justification for each.

PowerShell Cookbook is a set of things I found useful while learning to use PowerShell.

Regular Expressions in PowerShell and Perl explains how to use regular expressions in PowerShell, comparing PowerShell’s syntax to Perl’s syntax. A similar page compares Regular Expressions in Python and Perl.

Learn PowerShell as a shell first

PowerShell script to report catch blocks


R for programmers

Five kinds of subscripts in R

Moving data between R, Excel, and the Windows clipboard


Notes on how to use LaTeX on Windows.

Unicode resources

Getting started with C++ TR1 regular expressions

Comparing various implementations of math.h

Greek letters and math symbols in Unicode, (X)HTML, and LaTeX

Accented letters in HTML, (La)TeX, and Microsoft Word

Working with statistical distributions in Mathematica, R/S-PLUS, and Python


If you would be interested in consulting help with scientific software development, please call or email to discuss how I can help.