Path: utzoo!attcan!uunet!lll-winken!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Playing with the bits of floats Message-ID: <9421@smoke.BRL.MIL> Date: 18 Jan 89 19:00:58 GMT References: <1825@dataio.Data-IO.COM> <9404@smoke.BRL.MIL> <1100@l.cc.purdue.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 21 In article <1100@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >Max wants to do in one or two instructions what the has not been provided >for in the language. As I read Doug's remarks, he feels that this is >inappropriate. I sure do. The actual test desired is merely some sort of tolerance test. When written in the usual way, a compiler should produce very good code for the test. Resorting to bit-twiddling not only should not produce a noticeable increase in overall program speed, but it will certainly degrade the reliability, portability, and maintainability of the program. As usual, Mr. Rubin maintains that high-level languages like C should allow him to do everything he can do in assembler, and as usual most software engineers I know of would disagree. I don't know how long it would take to port his, or other detailed bit-twiddling code, to a new environment, but I do know how long it takes to port mine (close to zero time). This frees up my time for other things such as working on new applications. I have trouble imagining why that is not an equally important criterion for others. Do they really LIKE to bit twiddle instead of work on new projects?