# How to simplify long number to exponent form?

**URL:** <https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514>\
**Category:** Questions about Thunkable X\
**Tags:** math\
**Created:** [May 1, 2020, 1:55pm UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514 "2020-05-01T13:55:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nzgswbzhcxbdysblek12](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@nzgswbzhcxbdysblek12](https://community.thunkable.com/u/nzgswbzhcxbdysblek12)\
**Post date:** [May 1, 2020, 1:55pm UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514/1 "2020-05-01T13:55:10Z")

</div>

I’m currently working on a calculator app and I’m facing a problem whereby the result of an operation can sometimes be too long to fit properly in the Label, especially since I set the label to have only one line for aesthetic purposes. My question is , how do I convert the number to exponent form, for example, 3.22e+5 or 6.55e-7 when the length of the number exceed a certain threshold ? Thanks

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [May 1, 2020, 2:48pm UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514/2 "2020-05-01T14:48:18Z")

</div>

Sounds like a job for an IF statement @nzgswbzhcxbdysblek12 - but you’ll need to write your own function to convert from integer to exponent form.

Do you have any screenshots for what you’ve tried so far?

---

<div class="post-metadata">

**Author:** ![nzgswbzhcxbdysblek12](https://avatars.discourse-cdn.com/v4/letter/n/a87d85/32.png) [@nzgswbzhcxbdysblek12](https://community.thunkable.com/u/nzgswbzhcxbdysblek12)\
**Post date:** [May 1, 2020, 3:07pm UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514/3 "2020-05-01T15:07:33Z")

</div>

@domhnallohanlon Actually I need to convert float number with infinite number of decimal places to the exponent form. I tried to manipulate the numbers with String operation but to no avail. For example, I first identify the index of the decimal point (the dot) using the find occurrence function. Then I would extract the substring starting from the decimal point up until the last number . Then I would find the length of that substring using the length function. If the length of the substring exceeds for example 7, I would convert it to exponent form. Problem is, it seems that String operation doesn’t work on this kind of numbers and undefined is returned when I tried to extract the substring.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [May 2, 2020, 10:54pm UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514/4 "2020-05-02T22:54:31Z")

</div>

Here’s a demo I made.

[https://x.thunkable.com/copy/085c225da346cbe8a16e997c85706b64](https://x.thunkable.com/copy/085c225da346cbe8a16e997c85706b64)

![Screen Shot 2020-05-02 at 4.02.38 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/8/e8249604559e9f7603899db8db627e6063c5bb38.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 2, 2020, 11:25pm UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514/5 "2020-05-02T23:25:58Z")

</div>

Nice workkkkk! @tatiang

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:29am UTC](https://community.thunkable.com/t/how-to-simplify-long-number-to-exponent-form/564514/6 "2024-11-08T11:29:32Z")

</div>


