On Thu Aug 04 13:51:17 2016, zefram@fysh.org wrote: > $ perl -lwe 'printf "%a\n", 3e-320' > 0x1.00000000017b8p-1062 > > This output is numerically incorrect. This happens for any subnormal > floating-point value. The output is a mixture of two ways of > correctly > describing the value: it is 0x0.00000000017b8p-1022 (displaying > the physical structure of a subnormal) or 0x1.7b8p-1062 (consistent > scientific style). The handling of the implicit one bit is incorrect too. > $ perl -MData::Float=float_hex -lwe 'print float_hex(3e-320, > {subnormal_strategy=>$_}) for qw(SUBNORMAL NORMAL)' > +0x0.00000000017b8p-1022 > +0x1.7b80000000000p-1062 It looks like subnormals simply weren't implemented: /* XXX Inf/NaN/denormal handling in the HEXTRACT_IMPLICIT_BIT, * and elsewhere. */ Tony --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=128843Thread Previous