Ptx math

Submitted for initial review. Test is included that verifies results of math functions for float and double. Per email discussion, this seems to work well enough to be considered for merge as currently very few of these functions are implemented on for the PTX target at all. Should be little risk to other targets.