Android Question formatting numbers

Discussion in 'Android Questions' started by Roberto P., May 4, 2015.

  1. Roberto P.

    Roberto P. Well-Known Member Licensed User

    Hello everyone,
    someone help me understand why I can not format this number?

    Here example:

    Number: 2.220446049250313E-16

    Format 1: NumberFormat (Number, 2.3) result = 00,000

    Format 2: NumberFormat2 (Number, 2, 3, 5, True) result = 00.00000

    where am I wrong?

    thanks
     
  2. klaus

    klaus Expert Licensed User

    Your number 2.220446049250313E-16 is equal to 0.0000000000000002220....
    So if you round it to 3 or 5 decimals it shows 0 !
     
    Erel and NJDude like this.
  3. Roberto P.

    Roberto P. Well-Known Member Licensed User

    oops, I missed the value of numbers
    thanks
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice