mostly complete numeric_limits<>
Oleg Krivosheev
kriol@fnal.gov
Wed Feb 18 17:15:00 GMT 1998
Hi,
On Tue, 17 Feb 1998, Peeter Joot wrote:
> Hello,
>
> I noticed that a limits implementation was posted to this list. About a month
> back I did one up as well, but never posted it because some things weren't
> implemented (and some stuff is likely incorrect).
>
> Some of the fields/members are probably not correct, but I have made my best
> guesses. Of particular concern are the NaNs:
>
> I really don't know what the difference between a signalling NaN and a
> quiet NaN is. I took a guess that a signalling nan has all the mantissa
> bits set, and the quiet one has at least the high mantissa bit clear. This
> is quite possibly totally incorrect.
>
> The float denorm_min stuff may be wrong. I followed the example in the C++
> draft where numeric_limits<float>::has_denorm == false.
>
> I also took the easy way out for double and long double infinity and NaNs,
> where I have just cast the float versions. This is not likely the best
> way of doing things.
i was trying to make a point that numeric_limits contains
vital information about target architecture - therefore it
should be automatically generated after configure run.
We have to decide where num_limits generator will live
and what part of full header should be generated.
Also should generator itself be small C code or shell
script will be enough.
Without that the providing pieces of specialization for
char, short etc is, IMHO, a bit pointless.
regards
OK
More information about the Gcc
mailing list