Scrub yuca or potatoes thoroughly with a stiff brush. Peel and cut into 2-inch pieces. If using yuca, remove fibrous string from the center.
In a medium saucepan cook yuca or potatoes, covered, in a small amount of boiling lightly salted water for 10 to 12 minutes or until tender; drain. Return to saucepan.
Meanwhile, in a small skillet cook garlic in margarine or butter over medium heat about 30 seconds. Remove from heat stir in rosemary. Pour rosemary mixture over yuca or potatoes, tossing gently to coat. Season to taste with salt and pepper. Makes 6 side-dish servings.