Version 1.1 of ais/ai-00418.txt

Unformatted version of ais/ai-00418.txt version 1.1
Other versions for file ais/ai-00418.txt

!standard G.3.1(1)          05-03-09 AI95-00418-01/01
!standard G.3.2(1)
!class amendment 05-03-09
!status work item 05-03-09
!status received 05-03-09
!priority High
!difficulty Easy
!subject Vector norm
!summary
(See proposal.)
!problem
While the packages Generic_Real_Arrays and Generic_Complex_Arrays provide inner product, they do not provide a related operation that is often used in practice, the norm. Normalizing a vector is common and it seems unfriendly to require the user to implement the norm based on the inner product (and conjugation), especially as intermediate overflows/underflows could occur.
!proposal
Add "abs" operators implementing the L2-norm.
[What the heck is an L2-norm? We can't have terms that poorly defined in the standard. - ED]
!wording
Add after G.3.1(9):
function "abs" (Right : Real_Vector) return Real'Base;
Add after G.3.1(39):
function "abs" (Right : Real_Vector) return Real'Base;
This operation returns the L2-norm of Right. This operation involves an inner product.
Add after G.3.2(15):
function "abs" (Right : Complex_Vector) return Real'Base;
Add after G.3.2(73):
function "abs" (Right : Complex_Vector) return Real'Base;
This operation returns the Hermitian L2-norm of Right. This operation involves an inner product.
!discussion
(See proposal.)
!example
--!corrigendum
!ACATS test
Test cases should be added to the ACATS tests created for AI-296.
!appendix

****************************************************************

Questions? Ask the ACAA Technical Agent