[Overview][Constants][Types][Classes][Procedures and functions] |
Return Euclidian norm
Source position: line 0
function norm( |
const data: array [] of float |
):float; |
const data: PFloat; |
const N: Integer |
):float; |
Norm calculates the Euclidian norm of the array of data. This equals sqrt(sumofsquares(data)).
The second form accepts a pointer to an array of N values.
None.
|
Return sum of squares of values |
Program Example33; { Program to demonstrate the norm function. } Uses math; Type TVector = Array[1..10] of Float; Var AVector : Tvector; I : longint; begin for I:=1 to 10 do Avector[i]:=Random; Writeln(Norm(AVector)); end.