The nv value should be a valid version of the fv value.
Why the fv is a long double, not a NV, is a long (haha) story.
Short version: the printf code expects to be able to work with long
doubles, if long doubles are available, even without -Duselongdouble.
The problem became obvious in VMS which has true 128-bit long
(little-endian) doubles, and trying the signbit() on those did
not work.
#endif
if (fv < 0
- || Perl_signbit(fv)
+ || Perl_signbit(nv)
)
*p++ = '-';
else if (plus)