<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error with decimal places in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520360#M29583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using GDB. I'm still waiting for our department to install the latest service pack to see if that fixes the issue or not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2012 22:36:40 GMT</pubDate>
    <dc:creator>DamianMilne</dc:creator>
    <dc:date>2012-03-26T22:36:40Z</dc:date>
    <item>
      <title>Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520353#M29576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, I have a table in a geodatabase. Several of the values in one of my numeric fields is 15.099999999999. I'm want to change it to 15.1. I've tried everything but the value refuses to change. I've tried manual editing, rounding with field calculator, changeing between floating and double formats. Nothing works. Is this a glitch in ArcGIS 10?? Please help. Cheers, Damian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 00:04:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520353#M29576</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2012-03-01T00:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520354#M29577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Damian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the data type of the field? Float? Do you store this table in a file geodatabase?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd suggest to try the following. Create a new field with the Double data type and then use Field Calculator to calculate this field with the values of the one you struggle with. This should give you 15.1 written to the Double field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What regional settings do you have? ArcMap "likes" English regional settings (go to the Region and Language settings of your operating system to see what symbol is used as the Decimal symbol). What is it?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 08:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520354#M29577</guid>
      <dc:creator>AlexeyTereshenkov</dc:creator>
      <dc:date>2012-03-01T08:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520355#M29578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi tereshenkov, thank you for getting back to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My field datatype is Double. The table is stored in a file geodatabase. I did exactly as you said, created a new field (type Double) and used field caculator to round the field value. Nothing changed. I have attached a print screen so you can see exactly what I did, as well as my field values (original values 'SpeciesID', calculated values 'SpeciesID3). I re-ran the field calculator with another formular to make sure it was working and it does. My Regional settings are English (Australia) and under 'Customize Regional Options' my decimal symbol is "."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other thoughts? Cheers, Damian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 22:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520355#M29578</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2012-03-01T22:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520356#M29579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Damian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see. Could you please try to do what I've outlined earlier but in the field calculator window, just use the [SpeciesID] field without any additional calculations? If you've created a field with the default settings, then it should round up this for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 06:25:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520356#M29579</guid>
      <dc:creator>AlexeyTereshenkov</dc:creator>
      <dc:date>2012-03-02T06:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520357#M29580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There seems to be no error at all. The problem is the representation of float/double. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a closer look to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Floating_point"&gt;http://en.wikipedia.org/wiki/Floating_point&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will learn, that there is not for all numbers a representation. That means the number 753.1 does not exists for your computer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You cannot avoid this problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Mar 2012 08:30:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520357#M29580</guid>
      <dc:creator>FabianBlau</dc:creator>
      <dc:date>2012-03-02T08:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520358#M29581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi tereshenkov, i created the new field (double), with the default settings, and did the calculation you suggested. No joy, still the same issue. Fabl seems to have the correct answer at the moment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Damian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2012 23:24:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520358#M29581</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2012-03-04T23:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520359#M29582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What data format are you working with? SHP, GDB, MDB, SDE, ETC?&amp;nbsp; I ran into a similar issue when calculating records stored in SDE.&amp;nbsp; If you are try running the calc in a gdb or mdb featureclass.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Turned out to be a known issue back then; don't know if the latest sp fixes it or not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 18:29:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520359#M29582</guid>
      <dc:creator>TiffanyPuett</dc:creator>
      <dc:date>2012-03-26T18:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520360#M29583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using GDB. I'm still waiting for our department to install the latest service pack to see if that fixes the issue or not.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2012 22:36:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520360#M29583</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2012-03-26T22:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520361#M29584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All you have to do is change the &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;display&lt;/SPAN&gt;&lt;SPAN&gt; to round to one decimal place. Leave the values as a double type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can right-click on the table column to alter the number of decimal places shown, and the values will be nicely rounded.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As others point out floating numbers are always approximately converted from binary to decimal except for some edge cases where they have exact equivalents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some databases support a decimal type where the digits are stored as characters and decimal arithmetic is performed. Only needed for traditional money calculations. I think its a bit odd because even those are rounded if you allow division, but I suppose accountants don't do division! They don't even allow negative numbers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 06:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520361#M29584</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2012-03-27T06:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520362#M29585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Changing the display doesn't solve my problem. I need to round the values for analysis purposes. Changing the display doesn't change the underlying value when performing analysis (and yes, i've tried.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 22:37:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520362#M29585</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2012-03-27T22:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520363#M29586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, well then just use the built-in rounding functions in Python and do the calculation using an UpdateCursor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the round values are a result of floating point storage rather than proper variability then you could use integers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to do real decimal arithmetic there is a Decimal class in the decimal module.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The way to store the data would be to use integers and an implied decimal point. Then you use integer arithmetic or convert the integers to decimal type to do the arithmetic and then convert them back again to store.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 08:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520363#M29586</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2012-03-28T08:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520364#M29587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kim, could I trouble you to give me the nuts &amp;amp; bolts of how to use "intergers with an implied decimal point" and "interger arithmetic...to decimal type...and back again to store" please?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 23:09:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520364#M29587</guid>
      <dc:creator>DamianMilne</dc:creator>
      <dc:date>2012-03-28T23:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error with decimal places</title>
      <link>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520365#M29588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is a lot of help in the Python documentation on the Decimal module. Numbers are stored as strings and converted to a Decimal datatype.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically you avoid binary arithmetic by storing all numbers as decimal strings and using the Decimal datatype which has some basic arithmetic operations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import decimal
&amp;gt;&amp;gt;&amp;gt; a = decimal.Decimal("1234.12")
&amp;gt;&amp;gt;&amp;gt; be = decimal.Decimal("2.0")
&amp;gt;&amp;gt;&amp;gt; a / be
Decimal('617.06')
&amp;gt;&amp;gt;&amp;gt; x = 1234.12
&amp;gt;&amp;gt;&amp;gt; y = 2.0
&amp;gt;&amp;gt;&amp;gt; x/y
617.05999999999995&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use integers offset and scaled by the number of decimal places you want to keep, then you can do integer arithmetic and round off correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how Esri handles floating point coordinates in SDE because databases do not have a true floating point type, or it is too slow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The disadvantage is that there are limits to the range (extents) if you only use 32 bit integers and there is still some rounding or 'creep' after processing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With 'high precision' 64 bit it is no longer an issue for users. For more details look up "Choosing the resolution and domain of a low-precision spatial reference" in the help for obsolete 9.1 formats to see how you will need to set up your scale and precision to do your own arithmetic with integers and convert back and forth. The Decimal module looks more suitable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:41:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-with-decimal-places/m-p/520365#M29588</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2021-12-11T22:41:28Z</dc:date>
    </item>
  </channel>
</rss>

