Error 522 in Libre Office Calc when using IF function

I am trying to do the following simple task. I have a two column with possitive and negative numbers. I want all negative numbers to be equal to 0. So I am using in the 1st cell (E1 that is) the following “code”

=IF(E1<0, 0, E1)

I also tried with semicolumn instead of comma but in either way I get a 522 error.
What am I doing wrong?

From the help file, Error 522:

Formula refers directly or indirectly to itself and the Iterations option is not set under Tools - Options - LibreOffice Calc - Calculate.

Are your calculations, by any chance, point back to the cell your are having the IF-function in? Or are your numbers in a separate column, say D, only?

Thank you very much for your answer! I am using the aforementioned code, on E1 cell. So I be;ieve that this is the problem…

I suggest enter the formula in another column. I always like to keep data and formulas separated.