# Double Multi-field Loses Precision

**URL:** <https://discuss.elastic.co/t/double-multi-field-loses-precision/380561>\
**Category:** Elasticsearch\
**Tags:** aggregations\
**Created:** [July 30, 2025, 12:38am UTC](https://discuss.elastic.co/t/double-multi-field-loses-precision/380561 "2025-07-30T00:38:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [August 8, 2025, 1:54pm UTC](https://discuss.elastic.co/t/double-multi-field-loses-precision/380561/3 "2025-08-08T13:54:20Z")

</div>

On ES9 the output is missing the scientific notation. But I cut and paste exactly what you gave into kibana 9's DevTools and I get

```auto
  "aggregations": {
    "float": {
      "value": 3424999936
    },
    "float.d": {
      "value": 3425000000
    }

```

This looks correct to me.

double precision is able to maintain all the precision, and clearly 4\* 856250000 is indeed 3425000000.

The single precision is unable to retain the precision of "856250000", usually get 7/8 significant digits, so the IEEE bit representation of "856250000" is the same as the IEEE bit representation of 856249984 (and a range of other integers/floats around that point on the number line). sum of 4 856249984s (in single or double precision) is 3424999936, which is what is given.

So, ES9 seems to give right answer. Which specific 8.x version are you (@dna01) using ?

see also similar discussion in [this](https://discuss.elastic.co/t/wrong-returned-values-on-simple-sum-aggregation-and-scale-up-down/375960) thread.

---

_[View the full topic](https://discuss.elastic.co/t/double-multi-field-loses-precision/380561)._
