cleanup is_nan
cleanup decompose
cleanup clone