Created attachment 151798 [details] Err. for combina(2,3) which should otherwise be 4. combina(n,r), i. e., combination with repetition should work even when r>n, For example combina(2,3)=4 because consider the combinations 000, 001, 011, 111 are the combinations of {0,1} i.e., two items (n=2) r=3 (here) with repetitions has four possibilities. General formula ((n,r))= (n+r-1, r) should work when both n and r are non zero.
Please upload the sample file.
Comment on attachment 151798 [details] Err. for combina(2,3) which should otherwise be 4. I am attaching the file.
Created attachment 151802 [details] error for combina(n,r) when r>n
I'm not sure here since: - https://help.libreoffice.org/6.3/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3150284 (for LO) - https://support.office.com/en-us/article/combina-function-efb49eaa-4f4c-4cd2-8179-0ddfcf9d035d?ui=en-US&rs=en-US&ad=US (for Excel) indicate the first number must greater or equal to the second number. Winfried: any thoughts here?
Hi all, As found by Julien in - https://support.office.com/en-us/article/combina-function-efb49eaa-4f4c-4cd2-8179-0ddfcf9d035d?ui=en-US&rs=en-US&ad=US The first number must be an integer greater than or equal to the second one. Have a fine day, Jacques.
(In reply to Julien Nabet from comment #4) > I'm not sure here since: > - > https://help.libreoffice.org/6.3/en-US/text/scalc/01/04060106. > html?DbPAR=CALC#bm_id3150284 (for LO) > - > https://support.office.com/en-us/article/combina-function-efb49eaa-4f4c-4cd2- > 8179-0ddfcf9d035d?ui=en-US&rs=en-US&ad=US (for Excel) > indicate the first number must greater or equal to the second number. > > Winfried: any thoughts here? COMBINA is a function defined in ODFF1.2: http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018494_715980110 , which uses o.a. the constraint that in COMBINA(N, M) N>=M. So, COMBINA(2,3) should return an error, which it does. So I close the bug report as the behaviour is compliant with the ODFF1.2 standard. (I know that Excel returns 4 for COMBINA(2,3) _and_ that Excel's help states that the first argument must be greater than or equal to the second argument. Don't expect me to explain that.)
Thank you Winfried for your feedback. It's great to see we follow an open Standard instead of blindly following MS compatibility at any price even by reproducing their bugs!! :-)