Problems with the command cumSum and Workaround
|
05-11-2015, 07:50 PM
(This post was last modified: 05-11-2015 08:00 PM by Eddie W. Shore.)
Post: #1
|
|||
|
|||
Problems with the command cumSum and Workaround
Example: store {10, 20, 10} to L1
cumSum(L1): sometimes returns {10, 40, Nan} sometimes returns {10, 30, 40} (the right answer) sometimes causes the calcualtor to crash Software Version 6975 Here is a possible workaround: CSUM(list) BEGIN LOCAL k; FOR k FROM 2 TO SIZE(list) DO list[k]:=list[k]+list[k-1]; END; RETURN list; END; CSUM({10,20.10}) returns {10,30,40} |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Problems with the command cumSum and Workaround - Eddie W. Shore - 05-11-2015 07:50 PM
RE: Problems with the command cumSum and Workaround - Marcio - 05-11-2015, 08:42 PM
RE: Problems with the command cumSum and Workaround - JimS - 05-11-2015, 08:54 PM
RE: Problems with the command cumSum and Workaround - Terje Vallestad - 05-11-2015, 09:04 PM
RE: Problems with the command cumSum and Workaround - StephenG1CMZ - 12-30-2017, 05:17 PM
RE: Problems with the command cumSum and Workaround - parisse - 12-30-2017, 07:13 PM
|
User(s) browsing this thread: 1 Guest(s)