View Single Post
  #10  
Old July 1st 03, 11:57 PM
Jonathan Kirwan
external usenet poster
 
Posts: n/a
Default

On Tue, 01 Jul 2003 13:03:19 GMT, Jack Crenshaw
wrote:

Jonathan Kirwan wrote:

On Fri, 27 Jun 2003 17:58:50 GMT, Jonathan Kirwan
wrote:

Hmm. Are you *THE* Jack Crenshaw? The "Let's Build A Compiler"
and "Math Toolkit for Real-Time Programming" Jack _W._ Crenshaw?


Actually, I think I've answered my own question, here. You
really *are* that Jack.


Grin! Yep, I really am.


Hehe. Nice to know one of my antennas is still sharp.

What clues me in is your use of "phantom" he

mantissa -- 23 bits + phantom bit in bit 24.


The same term used on page 50 in "Math toolkit..."

In my own experience, even that predating the Intel 8087 or the
IEEE standardization, it was called a "hidden bit" notation. I
don't know where "phantom" comes from, as my own reading managed
to completely miss it.

So, a hearty "Hello" from me!


Hello. Re the term, phantom bit: I've been using that term since I can
remember -- and that's a looooonnnngggg time.


I think my first exposure to hidden-bit as a term dates to about
1974. But I could be off, by a year, either way.

Then again, I still sometimes catch myself saying "cycles" or
"kilocycles," or "B+".


Hehe. Now those terms aren't so "hidden" to me. I learned my
early electronics on tube design manuals. One sticking point I
remember bugging me for a long time was exactly, "How do they
size those darned grid leak resistors?" I just couldn't figure
out where they got the current from which to figure their
magnitude. So even B+ is old hat to me.

I first heard the term in 1975.


Well, that's about the time for "hidden bit," too. Probably, at
that time the term was still in a state of flux. I just got my
hands on different docs, I imagine.

Not sure when it became Politically Incorrect.


Oh, it's fine to me, anyway. I knew what was meant the moment I
saw the term. It's pretty clear. I just think time has settled
more on one term than another.

But to take your allusion and run with it a bit... I don't know
of anyone part of some conspiracy to set the term -- in any
case, setting terms usually is propagandistic, designed for
setting agendas in peoples' minds and here is a case where
everyone would want the same agenda.

Maybe someone objected to the implied occult nature of the term,
"phantom"?


Oh, geez. I've never known a geek to care about such things. I
suppose they must exist, somwhere. I've just never met one
willing to let me know they thought like that. But that's an
interesting thought. It would fit the weird times in the US we
live in, with about 30% aligning themselves as fundamentalists.

Nah... it just can't be.

Who knows?


I really think it was more the IEEE settling on a term. But
then, this isn't my area so I could be dead wrong about that --
I'm only guessing.

but as far as I'm concerned the term "hidden bit" is a
Johnny-come-lately on the scene.


Hehe. I've no problem if that's true.

Back to the point. I want to thank you and everyone else who responded
(except the guy who said "stop it") for helping to straighten out my
warped brain.


No problem. It was really pretty easy to recall the details.
Like learning to ride a bicycle, I suppose.

It's nice that you have my book. Thanks for buying it.


Oh, there was no question. I've a kindred interest in physics
and engineering, I imagine. I'm currently struggling through
Robert Gilmore's books, one on lie groups and algebras and the
other on catastrophe theory for engineers as well as polytropes,
packing spheres, and other delights. There were some nice
insights in your book, which helped wind me on just enough of a
different path to stretch me without losing me.

By the way!! I completely agree with you about MathCad! What a
piece of *&!@&$^%$^ it is, now. I went through several
iterations, loved at first the slant or approach in using it,
but absolutely hate it now because, frankly, I can't run it for
more than an hour before I don't have any memory left and it
crashes out. Reboot time every hour is not my idea of a good
thing. And that's only if I don't type and change things too
fast. When I work quick on it, I can go through what's left
with Win98 on a 256Mb RAM machine in a half hour! No help from
them and two versions later I've simply stopped using it. I
don't even want to hear from them, again. Hopefully, I'll be
able to find an old version somewhere. For now, I'm doing
without.

As a matter of fact, I first ran across this
"peculiarity" three years ago, when I was writing it. I needed to
twiddle the components of the
floating-point number -- separate the exponent from mantissa -- to write
the fp_hack structure for
the square root algorithm. I looked at the formats for float, double,
and long double, and found the
second two formats easy enough to grok. But when I looked at the format
for floats, I sort of went,
"Gag!" and quickly decided to use doubles for the book.


Yes. But that's fine, I suspect. I've taught undergrad classes
and most folks just go "barf" when confronted with learning
floating point. In class evaluations, I think having to learn
floating point was the bigger source of complaints about the
classes. You probably addressed everything anyone "normal"
could reasonably care about and more.

It's funny how an idea, once formed, can persist. Lo those many years
ago, I didn't have a lot of time
to think about it -- had to get the chapter done. I just managed to
convince myself that the format
used this peculiar convention, what with base-4 exponents, and all. I
had no more need of it at the time,
so never went back and revisited the impression. It's persisted ever
since.


No problem.

All of the folks who responded are absolutely right. Once I got my head
screwed on straight, it was
quite obvious that the format has no mysteries. It is indeed the IEEE
754 format, plain and simple.
The thing that had me confused was the exponents: 3f8, 400, 408, etc.
With one bit for the sign and
eight for the exponent, it's perfectly obvious that the exponent has to
bleed down one bit into the next
lower hex digit. That's what I was seeing, but somehow in my haste, I
didn't recognize it as such, and
formed this "theory" that it was using a base-4 exponent.


In any case, it's clear that your imagination is able to work
overtime, here! Maybe that's a good thing.

Wanna hear the funny part? After tinkering with it for awhile, I worked
out the rules for my imagined
format, that worked just fine. At work, I've got a Mathcad file that
takes the hex number, shifts it
two bits at a time, diddles the "phantom" bit, and produces the right
results. I can go from integer to
float and back nicely, using this cockamamie scheme.


Hmm. Then you should be able to construct a function to map
between these, proving the consistent results. I've a hard time
believing there is one. But who knows? Maybe this is the
beginning of a new facet of mathematics, like the investigation
into fractals or something!

Needless to say, the conversion is a whole lot easier if one uses the
real format! My Mathcad file just
got a lot shorter.


Hehe!! When you get things right, they *do* tend to become a
little more prosaic, too. Good thing for those of us with
feeble minds, too.

Thanks again to everyone who responded, and my apologies for bothering
y'all with this imaginary problem.


hehe. Best of luck. In the process, I did notice that you are
entertaining thoughts on a revised "Let's build a compiler."
Best of luck on that and if you feel the desire for unloading
some of the work, I might could help a little. I've written a
toy C compiler before, an assembler, several linkers, and a
not-so-toy BASIC interpreter. I can, at least, be a little bit
dangerous. Might be able to shoulder something, if it helps.

Jon