# Painless: exponential operator

**URL:** <https://discuss.elastic.co/t/painless-exponential-operator/114938>\
**Category:** Elasticsearch\
**Created:** [January 10, 2018, 7:22pm UTC](https://discuss.elastic.co/t/painless-exponential-operator/114938 "2018-01-10T19:22:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahtuag](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mahtuag](https://discuss.elastic.co/u/mahtuag)\
**Post date:** [January 10, 2018, 7:22pm UTC](https://discuss.elastic.co/t/painless-exponential-operator/114938/1 "2018-01-10T19:22:50Z")

</div>

Is there an exponential operator in painless? I see that both `**` and `^` don't work.

Also, is there a good collection of mathematical functions I can use with painless when I need to do non-trivial computations?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [January 11, 2018, 11:07pm UTC](https://discuss.elastic.co/t/painless-exponential-operator/114938/2 "2018-01-11T23:07:39Z")

</div>

Painless is essentially java syntax. The java `Math` library is available; I would start there.

---

<div class="post-metadata">

**Author:** ![mahtuag](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@mahtuag](https://discuss.elastic.co/u/mahtuag)\
**Post date:** [January 12, 2018, 5:30pm UTC](https://discuss.elastic.co/t/painless-exponential-operator/114938/3 "2018-01-12T17:30:32Z")

</div>

Wonderful! Thanks. the `Math` library from Java has pretty much everything I need 😀

---

<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:** [February 9, 2018, 5:30pm UTC](https://discuss.elastic.co/t/painless-exponential-operator/114938/4 "2018-02-09T17:30:36Z")

</div>

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