Ruby codes for caluculation of Magnus expansions.