DNRM2(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… DNRM2(3) β€” bestie, it's the euclidean norm

okay so first thing, the manual name for this one is Library Functions Manual, and the whole page lives at /home/abui...C/dnrm2.f90(3). yes the path is cursed, we don't talk about it πŸ’€. anyway. the "function name" in the NAME section is literally just the file:

/home/abuild/rpmbuild/BUILD/lapack-
static-3.12.0-build/lapack-3.12.0/BLAS/SRC/dnrm2.f90

that's it. that's the name. slay.


✨ SYNOPSIS ✨

Functions/Subroutines

  • real(wp) function DNRM2 (n, x, incx) β€” DNRM2 🫢

🌸 Function/Subroutine Documentation 🌸

real(wp) function DNRM2 (integer n, real(wp), dimension(*) x, integer incx)

DNRM2. iconic behavior. πŸ‘‘

πŸŽ€ Purpose:

!>
!> DNRM2 returns the euclidean norm of a vector via the function
!> name, so that
!>
!>    DNRM2 := sqrt( x'*x )
!>

so like, DNRM2 := sqrt( x'*x ). that's the whole vibe check right there. it's giving "length of a vector" but fancy. no cap. ✨

πŸ’– Parameters

  • N
!>          N is INTEGER
!>         number of elements in input vector(s)
!>

it's an INTEGER and it's literally how many elements are in your input vector(s). the count. the headcount. n. 🧚

  • X
!>          X is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
!>

DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ). note the abs( INCX ) bestie, it's doing the absolute value thing bc INCX can be negative. character development.

  • INCX
!>          INCX is INTEGER, storage spacing between elements of X
!>          If INCX > 0, X(1+(i-1)*INCX) = x(i) for 1 <= i <= n
!>          If INCX < 0, X(1-(n-i)*INCX) = x(i) for 1 <= i <= n
!>          If INCX = 0, x isn't a vector so there is no need to call
!>          this subroutine.  If you call it anyway, it will count x(1)
!>          in the vector norm N times.
!>

INCX is INTEGER, and it's the storage spacing between elements of X. the stride. the skip. okay so:

🚨 listen up on this one:
  • INCX > 0 β†’ X(1+(i-1)*INCX) = x(i) for 1 <= i <= n
  • INCX < 0 β†’ X(1-(n-i)*INCX) = x(i) for 1 <= i <= n
  • INCX = 0 β†’ okay so x isn't a vector so there is no need to call this subroutine. periodt. but if you call it anyway, it will count x(1) in the vector norm N times. yes literally. it just eats the same element N times, not me finding new ways to break math πŸ™ˆ

πŸ¦‹ Author

Edward Anderson, Lockheed Martin πŸ‘‘

🌈 Date

August 2016

πŸ“ Contributors:

Weslley Pereira, University of Colorado Denver, USA 🫢

⭐ Further Details:

!>
!>  Anderson E. (2017)
!>  Algorithm 978: Safe Scaling in the Level 1 BLAS
!>  ACM Trans Math Softw 44:1--28
!>  https://doi.org/10.1145/3061665
!>
!>  Blue, James L. (1978)
!>  A Portable Fortran Program to Find the Euclidean Norm of a Vector
!>  ACM Trans Math Softw 4:15--23
!>  https://doi.org/10.1145/355769.355771
!>
!>

the receipts, bestie. we cite our sources. πŸ“šβœ¨

πŸ’œ Definition at line 88 of file dnrm2.f90.

line 88. go look. iykyk.


πŸ‘‘ Author (the meta one)

Generated automatically by Doxygen for LAPACK from the source code. so nobody hand-wrote this page, a robot did, and honestly? it ate. πŸ”₯


okay that's the whole page bestie, mwah πŸ’…


signed off with love by LAPACK β€” Version 3.12.0 β€” from /home/abui...C/dnrm2.f90(3), the cursed path, the one and only πŸ«ΆπŸ’–

πŸ“¦ where this page comes from