[][src]Module numeric_array::impls

Implementation notes

For any method that returns a single element, like ToPrimitive methods and Float::integer_decode, the first element of the array will be used. If the array length is zero, None or zero is returned.

For any method that accepts a single value, the same value is used across the entire operation. For example, powi will raise the power of every element by the given value.

All floating point classification functions such as is_finite, is_nan, and classify, among others, follow a rule of highest importance. NaNs take precedence over Infinite, Infinite takes precedence over Subnormal, Subnormal takes precedence over Normal, Normal takes precedence over Zero

This means that classify and is_nan will return NaN/true if any values are NaN, and is_normal will only return true when ALL values are normal.

Additionally, similar rules are implemented for is_sign_positive/is_positive and is_sign_negative/is_negative, where is_sign_positive is true if all values are positive, but is_sign_negative is true when any value is negative.