Protect against division by zero

If all values are the same they will be treated as "minimal value"