numerical recipes in scala