If you want to find a solution to prevent a formula field from being referenced by a Roll-Up summary field, check this out. For example, you are considering a situation whereby you record the cost of a product by adding a custom field to the product object.
You want the sum of all the costs added to be displayed on an opportunity. If you want the product cost to be displayed, then you will have to add the product to an opportunity. Here comes the solution! The cost field has to be copied to a custom currency field located on the opportunity product record so as to rollup the value.
This solution, however, may not really work in all situations. When we are talking about Roll-Up summary fields, they are very useful features in the Salesforce. But sometimes in some situations, you may need to rollup the formula field value.