SRC/zdrscl.f(3)

πŸ’… SRC/zdrscl.f(3) πŸ’…

okay so bestie, this page is from the Library Functions Manual and it's all about a Fortran subroutine that's lowkey a math icon. No cap, it does one job and does it cute: multiply a vector by the reciprocal of a real scalar. The subroutine is zdrscl, and yes, the file is literally SRC/zdrscl.f. Periodt. ✨


πŸŽ€ NAME πŸŽ€

SRC/zdrscl.f β€” home of zdrscl, the subroutine whose whole vibe is ZDRSCL multiplies a vector by the reciprocal of a real scalar. πŸ’–

🌈 SYNOPSIS 🌈

🌸 Functions/Subroutines 🌸

  • subroutine zdrscl (n, sa, sx, incx) β€” ZDRSCL multiplies a vector by the reciprocal of a real scalar. πŸ’«

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine zdrscl (integer n, double precision sa, complex*16, dimension( *
       ) sx, integer incx)

ZDRSCL multiplies a vector by the reciprocal of a real scalar. That's the whole main-character energy of this routine, and honestly? Obsessed. 🫢

✨ Purpose ✨

From the source comments, bestie:

!>
!> ZDRSCL multiplies an n-element complex vector x by the real scalar
!> 1/a.  This is done without overflow or underflow as long as
!> the final result x/a does not overflow or underflow.
!>

So the tea is: it multiplies an n-element complex vector x by the real scalar 1/a, and it's built to dodge overflow and underflow β€” as long as the final result x/a does not overflow or underflow. That caveat is doing important work, so don't ignore it. πŸ’€βœ¨

🧚 Parameters 🧚

  • N β€” N is INTEGER. It's the number of components of the vector x. Basically the headcount of the vector. πŸ’…
  • SA β€” SA is DOUBLE PRECISION. It's the scalar a which is used to divide each component of x. SA must be >= 0, or the subroutine will divide by zero. Ma'am, that is a real warning, not a drill. 😭
  • SX β€” SX is a COMPLEX*16 array, dimension (1+(N-1)*abs(INCX)). It's the n-element vector x. The exact dimension is right there, so keep it cute and keep it correct. πŸŽ€
  • INCX β€” INCX is INTEGER. It's the increment between successive values of the vector SX. For the > 0 case, the source says:
> 0:  SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i),     1< i<= n

That's the indexing map, and yes, the spacing and symbols matter. iykyk. 🌟

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

These are the credited authors. Respect the whole squad. πŸ«‘πŸ’–

Definition at line 83 of file zdrscl.f.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for LAPACK from the source code.


okay bestie, that's the whole page. Cute sign-off: LAPACK Version 3.12.0, source file SRC/zdrscl.f(3) β€” that's the footer energy, and we're honoring it with a little sparkle. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from