Playing with the bits of floats

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Jan 19 05:00:58 AEST 1989


In article <1100 at l.cc.purdue.edu> cik at 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?



More information about the Comp.lang.c mailing list