add fp translation functions

This is untested, may not compile. Need to eat breakfast right now.