Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Keeping only one digit after the dot.

  1. Mar 31, 2005 #1

    Is there a mathematical way to get rid of all the digits after the dot except one? 10.292288.. how do i just make it 10.2?
  2. jcsd
  3. Mar 31, 2005 #2
    floor(10x)/10, perhaps?

    See this for information on the floor function if it is unfamiliar.
  4. Mar 31, 2005 #3


    User Avatar
    Science Advisor
    Homework Helper

    U mean rounding...?BTW,oif u mean rounding,then your example could go both ways:rounding a decimal more which would mean 10.3,or less,which would mean 10.2

    If u mean "significative digits",then the whole mechanism is not that simple as rounding decimals.In your case,u gave a # with 8 sign.digits and u want it with 3 only.In this case,the answer is correct.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?