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!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...