How to use applescript to solve mathematical equations

Hi, folks. I’m totally new to applescripting but it seems wonderful and I would love to learn more about it.

Here is my question for you geniuses:

how should one write an applescript to solve an equation with three variables, two of which are known and are used to solve for the third?

:smiley: Thanks muy mucho in advance!

Maybe something like…

set F to 2
set G to 3
set S to ((1 / F) - 1) * (G) / (1 / F)
–>-3.0