"Any Factor sequence can be used to represent a mathematical vector, however for best performance, the sequences defined by the " { $vocab-link "specialized-arrays" } " and " { $vocab-link "math.vectors.simd" } " vocabularies should be used."
"Saturated arithmetic may be performed on " { $link "specialized-arrays" } "; the results are clamped to the minimum and maximum bounds of the array element type, instead of wrapping around:"
{ $errors "Throws an error if an integer division by zero occurs." } ;
HELP:vmax
{ $values { "u""a sequence of real numbers" } { "v""a sequence of real numbers" } { "w""a sequence of real numbers" } }
{ $description "Creates a sequence where each element is the maximum of the corresponding elements from " { $snippet "u" } " andd " { $snippet "v" } "." }
{ $values { "u""a sequence of real numbers" } { "v""a sequence of real numbers" } { "w""a sequence of real numbers" } }
{ $description "Creates a sequence where each element is the minimum of the corresponding elements from " { $snippet "u" } " andd " { $snippet "v" } "." }
{ $values { "u""a sequence of real numbers" } { "v""a sequence of real numbers" } { "x""a real number" } }
{ $description "Computes the real-valued dot product." }
{ $notes
"This word can also take complex number sequences as input, however mathematically it will compute the wrong result. The complex-valued dot product is defined differently:"
{ $values { "v""a sequence of numbers" } { "x""a non-negative real number" } }
{ $description "Computes the squared length of a mathematical vector." } ;
HELP:norm
{ $values { "v""a sequence of numbers" } { "x""a non-negative real number" } }
{ $description "Computes the length of a mathematical vector." } ;
HELP:normalize
{ $values { "u""a sequence of numbers, not all zero" } { "v""a sequence of numbers" } }
{ $description "Outputs a vector with the same direction as " { $snippet "u" } " but length 1." } ;
HELP:set-axis
{ $values { "u""a sequence of numbers" } { "v""a sequence of numbers" } { "axis""a sequence of 0/1" } { "w""a sequence of numbers" } }
{ $description "Using " { $snippet "w" } " as a template, creates a new sequence containing corresponding elements from " { $snippet "u" } " in place of 0, and corresponding elements from " { $snippet "v" } " in place of 1." }