Machine scalar casting that meets your expectations