DNRM2(3)
π 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)for1 <= i <= nINCX < 0βX(1-(n-i)*INCX) = x(i)for1 <= i <= nINCX = 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 countx(1)in the vector normNtimes. 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
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms