V3 PATCH: numeric_limits<> support, fix PR/3865

Richard Henderson rth@redhat.com
Sun Sep 1 15:56:00 GMT 2002


On Sun, Sep 01, 2002 at 11:50:06PM +0100, Nathan Sidwell wrote:
> surely something based on the following, culled from elsewhere
> would be more concise?
[...]
> #define digits10_for_int_type(TYPE) \
> 	(((sizeof (TYPE) * __CHAR_BIT__ - ((TYPE)-1 < 0)) * 1233) >> 12)

Yep, that works for all cases we care about up to 
(at least) 128 bits.  Thanks.


r~



More information about the Libstdc++ mailing list