std.math: added frexp for double and float

For speed.
For example `isNaN` is template.