general question about ring math function

21 views
Skip to first unread message

stefano cerbioni

unread,
Aug 2, 2022, 5:31:19 AM8/2/22
to The Ring Programming Language
i look inside of math function , and  i dont saw , but  exist  just cooked  a function for calculate avarage ? ( inside of  list ) ?

thanks

Ilir

unread,
Aug 2, 2022, 5:42:56 AM8/2/22
to The Ring Programming Language
Hello,

you have SumList function in stdlib, divide result by list length to get average

Example

load "stdlib.ring"

aList = [1,2,3,4,5]
? SumList(aList)/len(aList)


Azzeddine Remmal

unread,
Aug 2, 2022, 7:44:44 AM8/2/22
to The Ring Programming Language
Hello stifano
I was practicing building a neural network, and in an attempt to understand the mathematics under the hood, I built some mathematical functions to calculate the matrix.
  I hope to help youSketch.png
calcmatrix.ring
Reply all
Reply to author
Forward
0 new messages