A generic interface for casting between machine scalars with the
as operator, which admits narrowing and precision loss.
Implementers of this trait AsPrimitive should behave like a primitive
numeric type (e.g. a newtype around another primitive), and the
intended conversion must never fail.
Float requires the in-place arithmetic operators (+=, -=, *=, /=) in
addition to the by-value ones from Num. Every real floating-point type supports
them, and they let the algebra tower derive AddMonoid/Field/Real/… for any
T: Float — so a new float type implements Float and inherits the whole tower
through the blanket impls (impl<T: Float> Real for T, etc.).