add support for tera and peta units

fixes #4640
closes #4641