Math Extension to parse a mathematical expression

Please find my latest extension here App Inventor Extensions: Math Parser | Pura Vida Apps. Enjoy!

This extension uses the mXparser library Version 4.1. Thank you Mariusz Gromada for the library. The functionality of this library is overwhelming, for details see the documentation…


Version 1a is now available to download here App Inventor Extensions: Math Parser | Pura Vida Apps
I had to rebuild the extension to avoid the same problem as discussed here

here is another screenshot of how to use the extension


1 Like

hi taifun,
When I creates a string called 5 x 4.It gives answer NAN .when i use this operator “X-multiply”.
Is there any way overcome this problem.

X is a letter, try using this symbol: ×

Use an asterisk (*) instead.
Example: 5 * 4.

1 Like

@Conor is correct…
btw. see also the documentation at App Inventor Extensions: Math Parser | Pura Vida Apps and the simple example


when I use speech recognizer to get calculation.
for example : when I tell 5 multiply by 5.its takes as operator-"X"
Is there any way to over come

what about using the replace all block to replace the X by *?


I already replaced but resulted in “nan *”

It would really help if you provided a screenshot of your relevant blocks including Do it result, so we can see what you are trying to do, and where the problem may be.


Good afternoon everyone, Taifun in this extension I can not perform the percentage calculations, you can help me, I’m making an application on finance, and when I want to make a calculation about it the extension does not return the result.

help me please.

See the details of the mXparser built-in math collection here…
in case percentage is not available (I don’t know, you might want to check yourself), then what about just dividing by 100?


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

so I tried this too, but as with the equal button I put the extension to do the calculations, I do not know how I can divide by 100 on the same button. does it even like using the extension it returns me the exact value?

use the replace all block and replace % by /100
then in case you do not get it running like this, you might want to provide a screenshot of your relevant blocks…



As you can see in the image, I modified the command according to the suggestion, but I did not understand how to replace the blocks, so I do not work right. I made a sum of 100 + 50%, the result was 100.5. Is there something I’m doing wrong?

Thank you very much for your help Taifun.

1 Like

This is the missing image.

That is an expected result. Probably you calculated something yourself wrong. Procents are numbers divided by 100. So 50 is 0.5 because 50/100=0.5

does it support complex numbers?

As @Taifun said, look over in the documentation.

1 Like