Results 1 to 3 of 3

Math Help - floating point representation

  1. #1
    Member
    Joined
    Feb 2008
    Posts
    184

    floating point representation

    For each of the following expressions state the minimum number of digits your floating point representation must have in order to obtain the correct result.
    i) (1/{100}+100)-100
    ii) 1/{100}+(100-100)
    I know this is something very simple but I am stuck. Is not the answer just 0.01
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    14,997
    Thanks
    1133
    Quote Originally Posted by charikaar View Post
    For each of the following expressions state the minimum number of digits your floating point representation must have in order to obtain the correct result.
    i) (1/{100}+100)-100
    ii) 1/{100}+(100-100)
    I know this is something very simple but I am stuck. Is not the answer just 0.01
    Well, for one thing, the answer cannot possibly be "0.01" because the question asks for "number of digits", an integer. If you meant "2 digits", that is not correct for both problems- there are two different answers here.

    How many digits are required to accurately represent 1/100+ 100? The point of this exercise is that the order in which you do operations can affect the accuracy on a machine with limited storage.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Feb 2008
    Posts
    184
    I think we need 5 digits for i) to get the correct answer. I am not sure about part ii) so can you please help. thanks
    Last edited by charikaar; April 28th 2010 at 06:47 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. help with floating point error
    Posted in the Math Topics Forum
    Replies: 0
    Last Post: October 17th 2011, 08:27 PM
  2. Floating Point Format
    Posted in the Advanced Math Topics Forum
    Replies: 5
    Last Post: December 13th 2010, 07:27 PM
  3. Floating Point Representation
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: March 29th 2010, 02:40 AM
  4. Floating point operations
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: February 24th 2010, 12:32 PM
  5. Floating Point Notation
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: July 4th 2007, 11:15 AM

Search Tags


/mathhelpforum @mathhelpforum