Post Reply 
BUG[?]: ΣLIST, ΠLIST with verrrry short lists
12-24-2015, 03:08 AM
Post: #2
RE: BUG[?]: ΣLIST, ΠLIST with verrrry short lists
(12-23-2015 11:37 PM)chromos Wrote:  
  • ΣLIST doesn't work for lists with SIZE < 1. Does it work as intended? (ΣLIST of empty list should be 0);
  • ΠLIST doesn't work for lists with SIZE < 2. Does it work as intended? (ΠLIST of empty list should be 1 and ΠLIST of list with one value should be that value).

The first case is not a bug. Sum of an empty list is not defined, as the list could contain things other than numbers. Think of a list of strings, where the sum would concatenate them. In that case, an empty list should mean an empty string "", not the number zero.

In the second case, I agree the product of a 1-value list should be that value. An empty list is again a gray area. I think undefined answer is better than an arbitrary number 1.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: BUG[?]: ΣLIST, ΠLIST with verrrry short lists - Claudio L. - 12-24-2015 03:08 AM



User(s) browsing this thread: 3 Guest(s)