Splunk Search

Math function return only 17 most significant digits

jeromesauve
Engager

Hello everyones,

Every math operations or functions seem to round the number to the 17th most significants digits.

To showcase the problem, I have made a test lookup table that look like that:

id, long_numbers
1, 12345678901234567894
2, 12345678901234567814
3, 12345678901234567826

If I run this :

|inputlookup test_long_numbers.csv
|eval should_be_the_same=(long_numbers*1)

The results in the new column are automaticly rounded like that:

id long_numbers should_be_the_same
1 12345678901234567894 12345678901234567000
2 12345678901234567814 12345678901234567000
3 12345678901234567826 12345678901234567000

The min(), max(), avg() used with stats all have the same behaviour.
Does someone know why it's acting like that and
if there a way to prevent this behaviour?

Thanks,

Jérôme-A. Sauvé

Tags (1)
0 Karma

jplumsdaine22
Influencer

I'm guessing thats because the data type is a 64 bit signed doubles , so theres a maximum amount of precision.

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...