What is err:512

I am trying to create a time sheet, I started using excel, but it couldn’t handle the length of the formula, it has several variables(show,more than 5 hours, after 12 am before 8 am), so I programmed it in blocks(the different combinations of show calls in time slots). I found that Calc could handle longer formulas. While combining these blocks(19 of them), after combining the first 8 I received an err:512 code in the cell. The error code is not listed in the documentation. Have I reached the maximum formula length? If I have do you have any suggestions on how to proceed.

https://help.libreoffice.org/Calc/Error_Codes_in_Calc

Formula with too many token: Error Codes in LibreOffice Calc - LibreOffice Help

Very long formula is bad design because it make formula unreadable. You should use intermediate cells to calculate partial results.