Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!uflorida!gatech!udel!princeton!phoenix!rjchen From: rjchen@phoenix.Princeton.EDU (Raymond Juimong Chen) Newsgroups: comp.lang.c Subject: Re: Playing with the bits of floats Message-ID: <5586@phoenix.Princeton.EDU> Date: 18 Jan 89 20:06:14 GMT References: <1100@l.cc.purdue.edu> Organization: Princeton University, NJ Lines: 34 [as is my wont, I put quoted material at the END.] Harumph. To emphasize that the code is inherently non-portable, why not just code the test in question in assembly language? This would certainly point out to anyone trying to (heaven forbid!) port the code that something amiss is up. (I mean, the code is so blatantly non-portable, one wonders how one could possibly code it in a language which was designed with portability in mind.) There seems to be this great movement to make C the One True Programming Language That Lets You Do Anything You Want. I don't think it is. If you want to get ``under the hood'' and play dirty tricks, then use assembly language. And for those of you who missed last week's episode... Max Rible wants to treat a float as an int-like bit pattern. ``I'm interested in speed, not portability.'' Herman Rubin agrees that ``every language should make it easy for the knowledgeable programmer to do these things.'' Doug Gwyn disagress, maintaining that ``Generating efficient code for routine floating-point operations of the job of the compiler, not the high-level programmer.'' Herman Rubin concedes that ``the particular situation may be highly non- portable. Note that Max has stated that he wants speed, and not necessarily portability.'' -- Raymond Chen UUCP: ...allegra!princeton!{phoenix|pucc}!rjchen BITNET: rjchen@phoenix.UUCP, rjchen@pucc ARPA: rjchen@phoenix.PRINCETON.EDU, rjchen@pucc.PRINCETON.EDU "Say something, please! ('Yes' would be best.)" - The Doctor