[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua-test failure help on Vxworks 7?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 11 Apr 2019 10:02:14 -0300
> d= 10^308 == -0x8.e679c2f5e45200p+1020
> d2= strtod(10^308) == -0x8.e679c2f5e45280p+1020
> [...]
> printf( "\nd= 10^308 == %.14a ", d);
> [...]
A small digression: by the C standard, we should not use '.14' with
'%a': "the [default] precision is sufficient for an exact representation
of the value". In correct systems, they even ensure that all bits
presented are significative, by adjusting the number of bits in the
integer part. So, we do not get those extra non-significative zero bits
in '280p+...'. Instead, we get 0x1.1ccf385ebc8ap+1023. However, I am
not sure the Windows libc respects the standard here...
-- Roberto