×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Floting point

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

RE: Floting point

Floating point data is stored as sign, mantissa and exponent.  It is base10 arithmetic, although the method of storing the actual numbers is base2 (binary).  Binary storage doesn't change the essence of the floating point number being represented--base10.  

(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

(OP)
Hi PL1Rocks and Thanks,
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

Most computers use a binary type of logic to store data ( including floating point numbers ).  As already pointed out, there are several parts to store... sign, exponent and mantissa.   Characters are not used to store this data though.  Generally, bits are.

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

A brief summary of one of the many floating point representations is here:

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources