Double factorial algorithm changes