Next: if Up: MacAnova Help File Previous: htoc()   Contents

hypot()

Usage:
hypot(x,y), x and y REAL of the same size and shape, or structures with
  matching REAL components



Keywords: transformations
hypot(x,y) is mathematically equivalent to sqrt(x^2 + y^2) but can
provide answer when either (i) x^2 + y^2 is too big to be represented in
the computer; or (ii) x^2 + y^2 is smaller than the smallest non-zero
value representable in the computer and thus evaluates to 0.  x and y
must be REAL vectors, matrices, or arrays with the same dimensions.

hypot(x,y) is also defined when x and y are structures of the same
shape.  The result is a structure whose i-th component is hypot(xi,yi),
where xi and yi are the i-th components of x and y.

hypot(x,y) can be used when both x and y are CHARACTER variables with
matching dimensions.  In that case the result is a CHARACTER variable
describing the transformation of the arguments.  For example,
hypot(vector("X1","X2"),vector("Y1","Y2")) returns
vector("hypot(X1,Y1)", "hypot(X2,Y2)").  This feature may be useful in
creating new labels for a transformed variable.

See also topics atan(), 'transformations', 'structures', 'labels'.


Gary Oehlert 2003-01-15