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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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