Loïc Grenié on Mon, 18 Nov 2024 15:13:07 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Is there a function for sum of square matrix antidiagonal like "trace()" for main diagonal? |
I used below code, is there something shorter?
assert(isprime(trace(ps)));
assert(isprime(vecsum([ps[i,#ps+1-i]|i<-[1..#ps]])));