Bug converting unsigned to double in BSD 4.[23]

Roger Klorese roger at celtics.UUCP
Wed Nov 26 01:22:10 AEST 1986


In-Reply-To: <562 at mcgill-vision.UUCP>

Cc:

Bcc:


In article <562 at mcgill-vision.UUCP> you write:
>In article <295 at hao.UUCP>, woods at hao.UUCP (Greg Woods) writes:
>> On a VAX, and every machine I've worked on EXCEPT the ISI-68K, the
>> first 32 bits of a double form a float.
>And it has led to some of the *sloppiest* code, just because some
>machines will let you get away with it....
>> Not true on the 68000.  

Or on any other IEEE-conforming floating-point implementation.  The IEEE
formats call for eight bits of exponent on floats, and eleven on doubles.
Any piece of code depending on this silly coincidence on the VAX and other
very common but non-compliant architectures is askin' fer it.

-- 
===================================
"Speak for the company?!   Gee, I have a hard enough time speaking for myself!"

====================  Roger B.A. Klorese
|    ///==\\       |  Celerity Computing (Eastern Region)
|   ///            |  40 Speen St., Framingham, MA 01701  +1 617 872-1552
|   \\\            |  
|    \\\==//       |  celerity!rklorese at sdcsvax.ARPA (sdcsvax!celerity!rklorese)
====================  celtics!roger at seismo.CSS.GOV   (seismo!celtics!roger)



More information about the Comp.lang.c mailing list