lis_array_axpyz(3)

๐Ÿ“ฆ version 2.1.11, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

๐Ÿ’– lis_array_axpyz(3) ๐Ÿ’–

okay bestie, welcome to the Lis Library Functions corner of the manual, where we're about to do some extremely cute vector math. this one is lis_array_axpyz and she is serving โœจ addition โœจ


โœจ NAME โœจ

lis_array_axpyz โ€” calculate the sum of the vectors ๐Ÿงฎ๐Ÿ’ซ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include "lis.h"

LIS_INT lis_array_axpyz(LIS_INT n, LIS_SCALAR alpha, LIS_SCALAR x[],
LIS_SCALAR y[], LIS_SCALAR z[]);

like yes she takes five arguments and she eats every single time ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Calculate the sum of the vectors, and the sum in question is literally this:

z = alpha * x + y

so you take vector x, you scale it by the scalar alpha, you add vector y on top, and the whole vibe lands in z. no cap, that's the entire plot ๐ŸŽ€


๐ŸŒˆ INPUT ๐ŸŒˆ

  • n โ€” the size of the vectors. like, how many entries each one has, bestie ๐Ÿ“
  • alpha โ€” the scalar value. the little multiplier doing all the heavy lifting ๐Ÿ’โ€โ™€๏ธ
  • x, y โ€” the arrays that store the vectors. the source material, the main characters ๐Ÿ‘‘

โญ OUTPUT โญ

  • z โ€” alpha * x + y. that's it, that's the result, she's gorgeous ๐Ÿ˜ญ๐Ÿ’–

๐Ÿ”ฅ EXIT STATUS ๐Ÿ”ฅ

the following exit values are returned, so pay attention:

  • 0 โ€” the process is normally terminated. we love a clean exit, periodt โœจ
  • unspecified โ€” an error occurred. not the vibe, but it happens ๐Ÿ™ˆ

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


ngl if you're out here doing vector math and you didn't know about this one, now you know. iykyk ๐Ÿฆ‹

this page is part of the Lis Library Functions manual, dated 3 Dec 2014, and it's the one and only lis_array_axpyz(3). mwah, take care of her, she slays ๐Ÿ’…๐ŸŽ€๐Ÿ’–

๐Ÿ“ฆ where this page comes from