(OT) floating-point numbers

M

Mantorok Redgormor

What have some of you guys read to have a solid understanding of how
floating-point numbers are represented or handled by the processor and
what the difference between single and double precision is?

I found this: http://docs.sun.com/source/806-3568/ncg_goldberg.html

Not sure if this is what I should be reading? Maybe a more authoritive
document exists?
 
G

Glen Herrmannsfeldt

Mantorok Redgormor said:
What have some of you guys read to have a solid understanding of how
floating-point numbers are represented or handled by the processor and
what the difference between single and double precision is?

I found this: http://docs.sun.com/source/806-3568/ncg_goldberg.html

Not sure if this is what I should be reading? Maybe a more authoritive
document exists?

Kahan's "What every computer scientist should know about floating point" is
probably a good start.

-- glen
 
R

Randy Howard

Kahan's "What every computer scientist should know about floating point" is
probably a good start.

Actually, the above link is to that article (actually a reprint of it),
but it was written by David Goldberg, not Kahan.

Perhaps you were thinking of his "How JAVA's Floating-Point Hurts Everyone
Everywhere" instead?
 
G

Glen Herrmannsfeldt

Randy Howard said:
Actually, the above link is to that article (actually a reprint of it),
but it was written by David Goldberg, not Kahan.

Perhaps you were thinking of his "How JAVA's Floating-Point Hurts Everyone
Everywhere" instead?

Well, first, please forgive me for the mistake in authorship.

It seems that there is some connection between that paper and Kahan, but
yes, he didn't write it.

So then I had to go and read "How JAVA's Floating-Point Hurts Everyone
Everywhere" to find out. (Also, note that this paper includes much more
than Java's floating point in its examples.)

I believe it is a different paper than I was remembering, but it includes
results from many of Kahan's papers.

Among those are the effects of doing floating point arithmetic in higher
precision than specified.

To get back to discussing C, the paper comments that the original K&R C
would promote float variables to double before all calculations, where ANSI
C allows calculations on float variables to be done in float precision. He
considers that a mistake.

So, I would say that both are good reading materials for users of floating
point arithmetic.

-- glen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top