finding_sum_mod_partial_array
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
finding_sum_mod_partial_array [2023/01/06 15:53] – richardrussell | finding_sum_mod_partial_array [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 18: | Line 18: | ||
This prints 2.29128785, being the Standard Deviation of the values 2, 3, 4, 5, 6, 7, 8 and 9. | This prints 2.29128785, being the Standard Deviation of the values 2, 3, 4, 5, 6, 7, 8 and 9. | ||
- | Here are the functions. | + | Here are the functions; the parameters are the array, the index of the first element to include, and the total number of elements over which to perform the operation. Please be aware that the array is temporarily modified, so **do not** access it in a timer interrupt or other asynchronous event handler: |
<code bb4w> | <code bb4w> | ||
Line 35: | Line 35: | ||
= MOD(a()) | = MOD(a()) | ||
</ | </ | ||
+ | |||
+ | In a speed-critical application you may choose to omit the error-checking statements if you are sure that the parameters are valid. |
finding_sum_mod_partial_array.1673020401.txt.gz · Last modified: 2024/01/05 00:16 (external edit)