# Scientific Notation Auto Rounding

**URL:** <https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496>\
**Category:** Logstash\
**Created:** [October 8, 2020, 6:30pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496 "2020-10-08T18:30:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [October 8, 2020, 6:30pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496/1 "2020-10-08T18:30:29Z")

</div>

I am using ruby and BigDecmial to convert a scientific notation number to decimal, but it's automatically getting rouded to the nearest thousandth. How can I prevent this? I want the full number or at least n^-6 not n^-3.

I have already tried .round(3) and .round(6) at the end of the bigdecimal number, that doens't seem to make any different at all.

Here's my code:

```
> if [source] =~ "table" {
> csv{ columns => ["TIME", "DATE", "START_TIMESTAMP", "STOP_TIMESTAMP", "ELAPSED_TIME", "MVS_SYSTEM_ID", "CICS_SPEC_APPLID", "CICS_GEN_APPLID", "JOB_NAME", "PGM_NAME", "TRANSACTION_ID", "TRANSACTION_NUM", "ORIG_ABEND_CODE", "CURR_ABEND_CODE", "CICS_USER", "SYNCPOINTS", "TERM_WAIT", "DISPATCH_TIME", "CPU_TIME", "RLS_CPU_TIME", "SUSP_TIME", "SYNCTIME", "DISP_CICS_USER", "JAVA_CPU_TIME", "L8_TCB_DISP_TIME", "S8_TCB_DISP_TIME", "RMI_TIME", "RMI_SUSP_TIME"]
> separator => "," }
> ruby {
> code => "event.set('[CPU_TIME_SECONDS]',BigDecimal(event.get('[CPU_TIME]')))"
> }
> }

```

Here's a screen shot of what is happening:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b65e8ab2e8fc079f10259e741057df343a7a8da.png)

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 8, 2020, 7:15pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496/2 "2020-10-08T19:15:04Z")

</div>

I think this is presentation issue in Kibana. If you expand one of those events and switch to the JSON tab what is the value of CPU\_TIME\_SECONDS?

---

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [October 8, 2020, 8:37pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496/3 "2020-10-08T20:37:27Z")

</div>

Oh wow, yea the numbers are all there. How do I change that in Kibana?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 8, 2020, 9:50pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496/4 "2020-10-08T21:50:46Z")

</div>

I do not run Kibana, but the documentation is [here](https://www.elastic.co/guide/en/kibana/current/field-formatters-numeric.html).

---

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [October 9, 2020, 2:04pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496/5 "2020-10-09T14:04:21Z")

</div>

Thanks! Documentation had what I needed. But if anyone else sees this: search the doc above for `duration` and then in kibana go to `management > index patterns > edit <your field>`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 6, 2020, 2:04pm UTC](https://discuss.elastic.co/t/scientific-notation-auto-rounding/251496/6 "2020-11-06T14:04:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
