--- ais/ai-00418.txt 2005/03/10 01:03:21 1.1 +++ ais/ai-00418.txt 2005/03/11 21:41:33 1.2 @@ -1,4 +1,4 @@ -!standard G.3.1(1) 05-03-09 AI95-00418-01/01 +!standard G.3.1(1) 05-03-11 AI95-00418-01/02 !standard G.3.2(1) !class amendment 05-03-09 !status work item 05-03-09 @@ -21,11 +21,8 @@ !proposal -Add "abs" operators implementing the L2-norm. +Add "abs" operators implementing the L2-norm. Specify their accuracy. -[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): @@ -35,9 +32,27 @@ Add after G.3.1(39): function "abs" (Right : Real_Vector) return Real'Base; + +This operation returns the L2-norm of Right (the square root of the inner +product of the vector with itself). -This operation returns the L2-norm of Right. This operation involves an inner -product. +AARM Note: Normalization of vectors is a frequent enough operation that it is +useful to provide the norm as a basic operation. Furthermore, implementing the +norm is not entirely straightforward, because the inner product might overflow +while the final norm does not. An implementation cannot merely return Sqrt (X * +X), it has to cope with a possible overflow of the inner product. + +Add after G.3.1(81): + +For the L2-norm, no accuracy requirements are specified in the relaxed mode. In +the strict mode the relative error on the norm shall not exceed: + + g / 2.0 + 3.0 * Real'Model_Epsilon + +AARM Note: This is simply the combination of the error on the inner product +with the error on Sqrt. A first order computation would lead to 2.0 * +Real'Model_Epsilon above, but we are adding an extra Real'Model_Epsilon to +account for higher order effects. Add after G.3.2(15): @@ -46,9 +61,18 @@ Add after G.3.2(73): function "abs" (Right : Complex_Vector) return Real'Base; + +This operation returns the Hermitian L2-norm of Right (the square root of the +inner product of the vector with its conjugate). + +Add after G.3.2(150): + +For the L2-norm, no accuracy requirements are specified in the relaxed mode. In +the strict mode the relative error on the norm shall not exceed: + + g / 2.0 + 3.0 * Real'Model_Epsilon -This operation returns the Hermitian L2-norm of Right. This operation involves -an inner product. +Where g has the definition appropriate for two complex operands. !discussion

Questions? Ask the ACAA Technical Agent