Is there a way to allow for a table output to my missing variable? For example I have an equation that gives 4 different angles, 2 of which are useful; however from looking at this code it restricts the solution to the max value in the table as well as only outputting as a number. Basically I'd just like to be able to put in a few inputs and get my solution out as if I had done solve. Inputs would not change from a single number for each input.

`function math.solve(formula, tosolve)`

local eq="max(exp" .. string.uchar(9654) .. "list(solve(" .. formula .. ", " .. tosolve ..")," .. tosolve .."))"

--local eq = "nsolve(" .. formula .. ", " .. tosolve .. ")"

local res = tostring(math.eval(eq)):gsub(utf8(8722), "-")

--print("-", eq, math.eval(eq), tostring(math.eval(eq)), tostring(math.eval(eq)):gsub(utf8(8722), "-"))

return tonumber(res)

end

Thanks for your time. This program has been a lifesaver.