<?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: Wrong results on stats sum or addcoltotals upon reaching 13th decimal value and beyond in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/517142#M145391</link>
    <description>&lt;P&gt;So it seems it's really a 'magical'&amp;nbsp; number then. Thank you sir for your reply.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2020 02:01:56 GMT</pubDate>
    <dc:creator>rajyah</dc:creator>
    <dc:date>2020-09-01T02:01:56Z</dc:date>
    <item>
      <title>Wrong results on stats sum or addcoltotals upon reaching 13th decimal value and beyond</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/514395#M144365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The screenshot presented below shows that there are 2 pairs that negates each other which should equal to 0 on column1, same with column2. With that in mind, the total value should be 0, right? But upon rounding it up to 13th decimal value and beyond, it no longer equates to 0.&lt;/P&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Negative.PNG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10303iECE6CF25FB3B1D2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Negative.PNG" alt="Negative.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached a search query that will replicate the said issue stated above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval column1=600.0000
| append
    [| makeresults
    | eval column1=390.0000]
| append
    [| makeresults
    | eval column1=355.0000]
| append
    [| makeresults
    | eval column1=575.0000]
| append
    [| makeresults
    | eval column1=355.0000]
| append
    [| makeresults
    | eval column1=590.0000]
| append
    [| makeresults
    | eval column1=600.0000]
| append
    [| makeresults
    | eval column1=355.0000]
| append
    [| makeresults
    | eval column1=-600.0000]
| append
    [| makeresults
    | eval column1=-590.0000]
| append
    [| makeresults
    | eval column1=-355.0000]
| append
    [| makeresults
    | eval column1=-575.0000]
| append
    [| makeresults
    | eval column1=-355.0000]
| append
    [| makeresults
    | eval column1=-390.0000]
| append
    [| makeresults
    | eval column1=-600.0000]
| append
    [| makeresults
    | eval column1=-355.0000]
| eval column2=round(column1/1.12,20) , column1=round(column1,20)
| addcoltotals&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 07:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/514395#M144365</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2020-08-17T07:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong results on stats sum or addcoltotals upon reaching 13th decimal value and beyond</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/514440#M144384</link>
      <description>&lt;P&gt;My first guess would be that this is the magic of floating point numbers at work. If you're having real life issues like the example you shared, you might want to look at using the sigfig() function:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/MathematicalFunctions#sigfig.28X.29" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/MathematicalFunctions#sigfig.28X.29&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 12:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/514440#M144384</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2020-08-17T12:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong results on stats sum or addcoltotals upon reaching 13th decimal value and beyond</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/517142#M145391</link>
      <description>&lt;P&gt;So it seems it's really a 'magical'&amp;nbsp; number then. Thank you sir for your reply.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 02:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Wrong-results-on-stats-sum-or-addcoltotals-upon-reaching-13th/m-p/517142#M145391</guid>
      <dc:creator>rajyah</dc:creator>
      <dc:date>2020-09-01T02:01:56Z</dc:date>
    </item>
  </channel>
</rss>

