Floting point
Floting point
(OP)
I'm wondering about how floting point datas stors in the computer storage and what is the relation between these types of datas and logarithmic calculation.
ofcourse, as i know we have a storage of 1 charachter for sign, the other for exponent and the last for mantessa.
but, i don't know the relation between floting point type of data and logarithmic calculation.
Thanks in advance
ofcourse, as i know we have a storage of 1 charachter for sign, the other for exponent and the last for mantessa.
but, i don't know the relation between floting point type of data and logarithmic calculation.
Thanks in advance





RE: Floting point
(The mantissa can get you into trouble though, depending on what you are trying to use it for. Try printing float variable 1.234 as an int, 6 digits long. It is slightly inaccurate, but that's due to binary to decimal storage differences.)
I'm not sure what you mean about how it relates to logarithmic computation unless you are interested in base e arithmetic. Please clarify.
RE: Floting point
In fact this statment has written in an IT book:
"the computer stores a floating point number as a logarithm using binery numbers"
could you please explaine about above?
RE: Floting point
Hi
In my opinion the form of the number is exponential and not logarithmic.
example number: (16 bit)
1 0101 01000100101
the sign, exponent, and the mantissa
Kim
RE: Floting point
On many computers, a single byte consist of 8 bits. Each bit can be on or off ( hence, binary ). You really only need a single bit to indicate a positive or negative number. Other bits are used to indicate values ( generally to a power of 2 ).
One major point to note is that different computers store this data in different ways. There is no universal standard ( not even close ).
I suggest that you do a web search for floating point arithmetic and storage methods. I'm very sure that you will find several sites which will give you insight into how a "typical" computer handles floating point values. Be warned though... this really is not as simple of a subject as many people assume.
Dan
www.dtware.com
RE: Floting point
http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html
This is only one of many. You will need to look at your operating system manual and programming language manual to find which representation they are using.
You will also notice that many standards use 2 or 3 different levels of precision, each defined differently