-4

I retrieve some data from a database but the number has a lot of digits and I want to round it. The thing is I do not want the whole number to be rounded. Example : I draw number 4.1010359882326385E10 which is of type long. I want to round it to 4.10103598823264.

That is to round the number after the 15th digit.

Any way I can do this?

  • That number doesn't have a comma, it's a potency (E10 at the end). I fear you might not be rounding it, you're coming up with a totally different number. – Fritz Mar 06 '13 at 14:28

1 Answers1

0

E10 in your number is a scientific notation, that says you number is actually 41010359882.326385. If you transform it to 4.10103598823264, you are not doing a rounding, you are doing something else.

Cyrille Ka
  • 15,328
  • 5
  • 38
  • 58