Use Perl_frexp, and cast arg to NV as appropriate.