Select to view content in your preferred language

How does one stop ArcMap from rounding numbers?

4572
3
09-13-2017 04:55 PM
MarkHotz
Frequent Contributor

I'm using ArcGIS 10.5.1 and I have created a simple file geodatabase with elevation ranges (polygons).  These ranges have construction costs estimates associated with them based on those elevations.  There are only 4 different cost associated with elevation ranges.  I created a float type field and have entered these costs manually into the attribute table.  I have also set the number of decimals for this field to be 2 in the attribute table properties.

However, whenever I enter a dollar value (to 2 decimals), the number is automatically rounded up; hence, if I enter 1,247,119.96, as soon as I hit <ENTER> it changes to 1,247,120.00.  I have also tried setting this right using the properties of that field in the attribute table, but this does nothing.

  

Obviously, I'm doing something wrong...but what is it?  I'm praying that this is not a bug as I need to calculate costs per acre throughout this data set and if the numbers are in error then none of this work will be accepted.

Thoughts, Ideas, Suggestions?

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

I presume, you increased the number of decimals to show and the number of characters from 12, and dump the commas to see if that makes any difference?  Since you say you are entering values, this shouldn't be a case of integer division

Why are you using float? make a double field and try it as a test

MarkHotz
Frequent Contributor

Dan:

I think I initially used float because the large decimal range wasn't really required.  However, having said that using "double" does work, so thanks for that advice.  Such a small thing to stop a project LOL...I would have been oblivious to that for a few days for sure :-).

0 Kudos
DanPatterson_Retired
MVP Emeritus

Glad it worked out at least

0 Kudos