lis_array_axpy(3f)

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

✨ lis_array_axpy β€” calculate the sum of the vectors ✨

okay bestie, welcome to the Lis Library Functions corner of the manual, page lis_array_axpy(3f), and no cap this one is a lil baby function that does one (1) thing and does it gorgeously πŸ’…


🌸 SYNOPSIS 🌸

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

like. look at her. five arguments, zero drama 🫢


πŸ’– DESCRIPTION πŸ’–

so the whole entire vibe here is: calculate the sum of the vectors. that's it, that's the tweet.

formally, she computes:

y = alpha * x + y

which is literally the classic axpy move (iykyk), and honestly? iconic. she takes your vector x, scales it by your scalar alpha, adds it onto your vector y, and just. leaves it there. no returns, no copies, no ceremony. main character energy, minimal effort, maximum results ✨


πŸŽ€ INPUT πŸŽ€

  • n β€” the size of the vectors. like, how many entries are we playing with, bestie.
  • alpha β€” the scalar value. the lil multiplier. the seasoning 🌈
  • x, y β€” the arrays that store the vectors. two cuties holding hands, fr fr.

πŸ¦‹ OUTPUT πŸ¦‹

  • y β€” holds alpha * x + y when all is said and done. heads up though: vector y is overwritten. she does not ask permission, she does not save a backup, she simply replaces your old y with the new one. so if you needed the old y?? too late babes πŸ’€ keep a copy first.

🌈 SEE ALSO 🌈


lowkey a public service announcement: y gets clobbered in place. that's not a bug, that's just her nature. plan accordingly πŸ’œ

and that's the whole page, periodt πŸ‘‘

this lil slice of manpage magic comes to you from the Lis Library Functions collection, dated 3 Dec 2014 β€” yeah she's vintage, she's still slaying, we love a timeless queen πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from