Long double versions of math functions

Import long double versions of a bunch of stuff from openbsd.