Algorithm AS 29: The Runs Up and Down Test