<?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 Is there any documentation on what precision Splunk uses for arithmetic operations? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223854#M65923</link>
    <description>&lt;P&gt;When I execute the following search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="does not matter"
| stats count AS value
| eval value=123456.0
| eval x=value/(1024*1024*1024)
| eval y=(value*1.0)/(1024*1024*1024)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get results which do not quite meet my expectations:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value: 123456.0
x: 0.0001149774
y: 0.00011
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Seems like splunk truncates the value. But why? Multiplying by 1.0 should (could, might, ...)  transform the value into a floating point number but strangely this results in a less precise result. Is there any documentation on which precision splunk uses for arithmetic operations?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2015 13:50:32 GMT</pubDate>
    <dc:creator>krdo</dc:creator>
    <dc:date>2015-11-10T13:50:32Z</dc:date>
    <item>
      <title>Is there any documentation on what precision Splunk uses for arithmetic operations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223854#M65923</link>
      <description>&lt;P&gt;When I execute the following search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="does not matter"
| stats count AS value
| eval value=123456.0
| eval x=value/(1024*1024*1024)
| eval y=(value*1.0)/(1024*1024*1024)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get results which do not quite meet my expectations:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value: 123456.0
x: 0.0001149774
y: 0.00011
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Seems like splunk truncates the value. But why? Multiplying by 1.0 should (could, might, ...)  transform the value into a floating point number but strangely this results in a less precise result. Is there any documentation on which precision splunk uses for arithmetic operations?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 13:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223854#M65923</guid>
      <dc:creator>krdo</dc:creator>
      <dc:date>2015-11-10T13:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any documentation on what precision Splunk uses for arithmetic operations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223855#M65924</link>
      <description>&lt;P&gt;I think this helps:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/320265/why-is-splunk-sometimes-rounding-to-the-next-integ.html"&gt;https://answers.splunk.com/answers/320265/why-is-splunk-sometimes-rounding-to-the-next-integ.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 13:55:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223855#M65924</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2015-11-10T13:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any documentation on what precision Splunk uses for arithmetic operations?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223856#M65925</link>
      <description>&lt;P&gt;It seems like the documentation explaining how splunk handles precision has been removed; &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.5/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/Splunk/4.2.5/SearchReference/Eval&lt;/A&gt; is the last version containing the section &lt;EM&gt;Significant figures and precision&lt;/EM&gt; which is pretty important IMHO.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 14:14:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-documentation-on-what-precision-Splunk-uses-for/m-p/223856#M65925</guid>
      <dc:creator>krdo</dc:creator>
      <dc:date>2015-11-10T14:14:50Z</dc:date>
    </item>
  </channel>
</rss>

