Abnormal normalizations?

uunet!netcom.com!segfault!rfg uunet!netcom.com!segfault!rfg
Sat Nov 20 01:59:55 PST 1993


The following question was posted recently to the comp.lang.c++ newsgroup:

>>I have a question for language lawyers.  Is it required that the
>>following code
> 
>>double y=some_value;
>>double x=y;
>>if(x ==y)
>>  cout<<"TRUE";
> 
>>always prints TRUE?

This evoked the following interesting speculation from one contributor:

>It is best not to assume this.  While I would expect most compilers to
>copy the double value faithfully, some might throw a "normalize" in
>during the copy and lose a few insignificant bits...

I would like to ask the experts here assembled if there is any shread of
truth to this speculation.  May compilers normalize FP numbers during
the course of mere assignments?  If so, may these normalization operations
indeed cause the loss of some significant (presumably low-order) bits?


-- Ronald F. Guilmette, Sunnyvale, California -----------------------------
------ domain address: rfganetcom.com -------------------------------------
------ uucp address: ...!uunet!netcom.com!rfg -----------------------------



More information about the Numeric-interest mailing list