Support #1188
Product of empty list: manual and code disagree
Status:
Closed
Priority:
Normal
Assignee:
Category:
Manual/documentation
Target version:
Description
What should CoCoA-5 do when asked to compute the product of the empty list?
/**/ product([]); 1
The manual is self-inconsistent. The text says that a second arg must be specified if the list might be empty, but the example shows what I've written above.
Decide what we want, and make sure that manual and code agree (impl. is in BuiltinFunctions.C:193
)
History
#1
Updated by John Abbott almost 6 years ago
- Status changed from New to Feedback
- Assignee set to John Abbott
- % Done changed from 0 to 90
We have decided for safety that sum/product of an empty list should give error (unless an initial value is given).
Implemented; manual corrected; package RealRoots
has been updated.
#2
Updated by John Abbott almost 6 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time set to 1.10 h
Have not really tested, but what can go wrong???