Draw the MandelBrot Set in LibreOffice Calc, using only formulae

Error occurs when entering (Ctrl+Shift+Enter) the following formulae in LibreOffice 24.8 Dev:

Err:539:
=ArrayFormula(UNIQUE({ MOD(SEQUENCE(1681,1,0,1),41)/20, ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20; -MOD(SEQUENCE(1681,1,0,1),41)/20, ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20; MOD(SEQUENCE(1681,1,0,1),41)/20, -ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20; -MOD(SEQUENCE(1681,1,0,1),41)/20, -ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20 }))

Err:539:
=UNIQUE({ MOD(SEQUENCE(1681,1,0,1),41)/20, ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20; -MOD(SEQUENCE(1681,1,0,1),41)/20, ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20; MOD(SEQUENCE(1681,1,0,1),41)/20, -ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20; -MOD(SEQUENCE(1681,1,0,1),41)/20, -ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20 })

Err:509:
=MOD(SEQUENCE(1681,1,0,1),41)/20, ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20, -MOD(SEQUENCE(1681,1,0,1),41)/20, ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20, MOD(SEQUENCE(1681,1,0,1),41)/20, -ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20, -MOD(SEQUENCE(1681,1,0,1),41)/20, -ROUNDDOWN(SEQUENCE(1681,1,0,1)/41)/20

Can you please advise how to enable LibreOffice Calc to draw the MandelBrot Set in LibreOffice Calc using only formulae?

Thank you

  1. Bug 126573 - Add array functions in Calc: FILTER, SORT, SORTBY, UNIQUE, SEQUENCE, RANDARRAY implements SEQUENCE and UNIQUE functions in LibreOffice Calc 24.8.
  2. How To Draw The MandelBrot Set In Google Sheets, Using Only Formulas.

(you may reopen tdf#126573 with your .ods attached, if you think your exemple should work)

Please do not reopen bug tdf#126573 but write a new bugreport. The problem seems to be not directly related to the new functions. Please add in the bugreport, a description, about the intended meaning of the outer structure of the formulas. Separated calculations of the inner parts work for me. And please add, which decimal separator do you use and which are your settings of the separators for function parameters and inline arrays in Tools > Options > Calc > Formula.

When I download the Google sheet mentioned in your link “2.” as xlsx file and open it in LibreOffice, then there is not problem. Only its needs some time to calculate all the values.

2 Likes

Err:539 means this: In LibreOffice, an inline array can only be build from constant values. LibreOffice is not able to use expressions that need a calculation. The ODF specification is in section 5.13 Inline Array, part 4, ODF 1.3.
There you find the Note
“Note: Expression authors should be aware that use of Expression other than constant Number or constant String may impair interoperability.”

So the problem with these examples seems to be, that the values of the inline array are not constant. An enhancement request exists already, tdf#105683.

1 Like

Open the Google spreadsheet, download as xlsx, open with LibreOffice.

Bug 161841 - Add ARRAYFORMULA function

Bug 105683 - Allow expressions with references in inline arrays, not only constants