List Commands Library for 50g
|
04-04-2018, 03:56 AM
Post: #324
|
|||
|
|||
RE: List Commands Library for 50g
<< <<MAX>>Stream>> and the corresponding MIN work very well except that they fail with lists of a single element, lists of no elements, non-list variables, and an empty stack. None of these are a particular problem but for a general purpose code, they are insufficient. What does happen is that in the small cases, 0, one, or null elements, one spends much more time testing than in taking extrema. I try to code around this on the HP50g by special-casing small cases. I'm not sure what the MAX of an empty list should return. The smallest value representable is the "identity" of the MAX function as 0 is for addition and 1 for multiplication.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)