lis_array_axpyz(3f)

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

✨ lis_array_axpyz β€” the "add two vectors but make one of them ✨spicy✨" function πŸ’…

okay bestie, so you know how lis(3f) has a whole lil family of array math routines? this is one of them, and she is lowkey iconic. the manual page calls herself lis_array_axpyz(3f), and she lives in the Lis Library Functions section. very demure, very mindful. let's get into it 🫢


🌸 SYNOPSIS 🌸

subroutine lis_array_axpyz(LIS_INTEGER n, LIS_SCALAR alpha, LIS_SCALAR
x(), LIS_SCALAR y(), LIS_SCALAR z(), LIS_INTEGER ierr);

that's the whole signature, no cap. six arguments, one ierr for the drama (we'll get to her) πŸ’€


πŸ’– DESCRIPTION πŸ’–

she calculates the sum of the vectors. that's it, that's the job. the formula is giving:

z = alpha * x + y

so basically: take vector x, glow it up by multiplying by the scalar alpha, then toss vector y on top. the result lands in z. it's the classic axpy move but with a z on the end to catch the output β€” hence the extra letter, iykyk 🌈


πŸŽ€ INPUT πŸŽ€

  • n β€” the size of the vectors. like, how many entries are we even working with, bestie πŸ¦‹
  • alpha β€” the scalar value. she's the multiplier, the main character energy that scales x up (or down, or to zero, we don't judge) πŸ’…
  • x, y β€” the arrays that store the vectors. these two are the besties going in 🫢

⭐ OUTPUT ⭐

  • z β€” and out comes alpha * x + y. periodt. that's the result array, freshly served 🌸
also there's that ierr argument chillin' in the signature β€” she's the integer error flag, so keep an eye on her after the call, fr fr πŸ‘€

πŸ‘‘ SEE ALSO πŸ‘‘

go poke around the site, the whole library is there and she's thriving ✨


and that's the page, bestie!! this lil writeup came from the Lis Library Functions source, dated 3 Dec 2014, and the original footer tagged it as the man page for lis_array_axpyz(3f). go forth and axpyz responsibly πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from