Negative part of a function

Hello everyone.
Today I would like to ask the following question:
How do you implement, in FreeFem++, the negative part of a function defined over the integration domain of your variational equations?

By definition,

NegativePart(f)=- min{f,0}.

How do I vode this nonlinear fuction?

Thanks in advance and best regards,

Paolo