Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,22 @@
call testAverage .array~of(10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
call testAverage .array~of(10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, .11)
call testAverage .array~of(30, 10, 20, 30, 40, 50, -100, 4.7, -11e2)
::routine testAverage
use arg list
say "list =" list~toString("l", ", ")
say "root mean square =" rootmeansquare(list)
say
::routine rootmeansquare
use arg numbers
-- return zero for an empty list
if numbers~isempty then return 0
sum = 0
do number over numbers
sum += number * number
end
return rxcalcsqrt(sum/numbers~items)
::requires rxmath LIBRARY