# Limit of Math Is even function

**URL:** <https://community.thunkable.com/t/limit-of-math-is-even-function/3058227>\
**Category:** Questions about Thunkable X\
**Created:** [June 15, 2024, 2:42am UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227 "2024-06-15T02:42:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cc\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cc\_mindchamp](https://community.thunkable.com/u/cc_mindchamp)\
**Post date:** [June 15, 2024, 2:42am UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/1 "2024-06-15T02:42:30Z")

</div>

Hi all  
Please my observation below when I wanted to test an even number. Is there a limit on the numbers Thunkable can handle.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/0/f019d8faf8384b0f018212b2b7467b02771f7289.png)

![even2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/0/f0947cda7711993ef70f64dd1fd4bcb5168e51f5.jpeg)

---

<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:** [June 15, 2024, 5:34am UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/2 "2024-06-15T05:34:57Z")

</div>

You’re testing whether or not a text string is even.

You need to convert the text to a number first. The way to do that is to add zero to the text input’s text.

---

<div class="post-metadata">

**Author:** ![cc\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cc\_mindchamp](https://community.thunkable.com/u/cc_mindchamp)\
**Post date:** [June 16, 2024, 2:51am UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/3 "2024-06-16T02:51:33Z")

</div>

![image.png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/6/b6a10be27dbe03f3dc01728fcad374b6fea0a043.png)  
 ![image.png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6e2872b84343263951962bf94054cdd21e6f80db.png)

 ![image.png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/6/565f190ba2611acbce64598d7a817e3a12a617aa.png)

Hi Tatiang, Thanks for helping. I changed the settings as above, are they correct? It still gives the same.

---

<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:** [June 16, 2024, 5:02am UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/4 "2024-06-16T05:02:26Z")

</div>

No. Those are the exact same blocks.

You need to get the addition (+) block from the Math drawer and add zero (0) to Text\_Input3’s Text.

This is a slightly older project but a similar idea:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/3/73e36b07e3bd67282603e428c3bbf7635e94f916.png)

Another way to do this is to multiply by 1, as shown here: [How to check if text input is a number? - #3 by domhnallohanlon](https://community.thunkable.com/t/how-to-check-if-text-input-is-a-number/482221/3)

---

<div class="post-metadata">

**Author:** ![cc\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cc\_mindchamp](https://community.thunkable.com/u/cc_mindchamp)\
**Post date:** [June 16, 2024, 9:16am UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/5 "2024-06-16T09:16:25Z")

</div>

Actually forgot to tell you that it works properly for smaller numbers even if we don’t convert it to a number. I did the changes and it shows the output below. I am sceptical that it has some limit on the range of numbers it can check, What is your opinion? ![image.png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/3/f3b06db829d41ad9fd96dc4f42ad9d93da413794.png) ![image.png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/d/8d60b3dbcd6419977f7347c338d8884554e45467.png)  
 ![image.png](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/29daf9ad3144e3a8e8e2eb50f163068a10c35948.png)

---

<div class="post-metadata">

**Author:** ![marion.dorsett](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/marion.dorsett/32/175129_2.png) [@marion.dorsett](https://community.thunkable.com/u/marion.dorsett)\
**Post date:** [June 16, 2024, 12:15pm UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/6 "2024-06-16T12:15:02Z")

</div>

@cc_mindchamp I would guess you’re right, but it would be a max imposed by JavaScript in this case vs anything specifically related to Thunkable.

I did a search on “what is the largest number in javascript” and that comes back as: 9007199254740991

Testing proves this to be true.

![math-limit-00](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/9/19d92e128b36ea28e290b741c036309ccc65cd36.png)  
 ![math-limit-01](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/9/f9c11343176d2099b3e9e20a69d72813b2e081bc.png)  
 ![math-limit-02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/7/f75337e293afc4839ba2ebb0de09534d41d1d76d.png)  
 ![math-limit-03](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/c/5c03611f8e83b65be695d35b0e97f051fb5a93da.png)

However, validating user input is always best practice, and I would agree with @tatiang 's recommendation to multiply by 1 to ensure you’re dealing with a number.

JavaScript can sometimes misinterpret the operation because + is used for addition and concatenation (joining strings together). Here is a test I ran in the browser console that proves the point:

 ![math-limit-04](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b13e89a72649c0ce0e634d77bfb631b6751857a8.png)

---

<div class="post-metadata">

**Author:** ![cc\_mindchamp](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cc\_mindchamp](https://community.thunkable.com/u/cc_mindchamp)\
**Post date:** [June 16, 2024, 1:07pm UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/7 "2024-06-16T13:07:42Z")

</div>

Thank you both of you @marion.dorsett @tatiang

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [September 14, 2024, 1:07pm UTC](https://community.thunkable.com/t/limit-of-math-is-even-function/3058227/8 "2024-09-14T13:07:52Z")

</div>

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