lis_array_sum(3)

πŸ“¦ version 2.1.11, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ lis_array_sum(3) ✨

okay bestie, welcome to the Lis Library Functions corner of the manual β€” this one's called lis_array_sum and it's literally the simplest lil glow-up in the whole library πŸ’–


🌸 NAME 🌸

lis_array_sum β€” calculate the sum of the elements of the vector

like... all of them. every single one. added together. that's it, that's the function 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include "lis.h"

LIS_INT lis_array_sum(LIS_INT n, LIS_SCALAR x[], LIS_SCALAR *value);

πŸ’… DESCRIPTION πŸ’…

Calculate the sum of the elements of vector x. she just... adds. and honestly? iconic. no notes πŸ‘‘

Here's the one thing she needs from you before she starts:

  • n β€” The size of the vector

🌈 INPUT 🌈

  • x β€” The array that stores the vector

πŸ¦‹ OUTPUT πŸ¦‹

  • value β€” The sum of the vector elements

so you hand her a vector, she hands you back one singular number that is everybody summed up. main character energy fr fr ✨


πŸ’œ EXIT STATUS πŸ’œ

The following exit values are returned:

  • 0 β€” The process is normally terminated πŸŽ‰
  • unspecified β€” An error occurred 😭
no cap, if you get unspecified something went sideways and you're on your own figuring out what. not me being vague, that's genuinely what the page says πŸ’€

⭐ SEE ALSO ⭐


that's the whole page, you ate it, go forth and sum some vectors 🧚

this lil masterpiece lives in the Lis Library Functions manual, dated 3 Dec 2014, and yes, the footer really does just say lis_array_sum(3) again like a signature sign-off πŸ’– mwah, bye bestie! 🌸

πŸ“¦ where this page comes from