I am trying to understand how to use the TI-Nspire CAS system through Lua. I am trying to emulate the
solve(x+5/3,x)
functionality found in the TI-Nspire CX CAS gui.
I looked through the API Docs found here : https://education.ti.com/download/en/ed-tech/59108CCE54484B76AF68879C217D47B2/7EFB09CED41C4190AFF8F60283B6727A/TI-NspireLuaScriptingAPIReferenceGuide.pdf
I believe what I am looking for is the eval
function on page 51 although I can't find much online to sample from. The examples provided are not concrete ones.
math.eval(math_expression) --apilevel = 2.0
math.eval(math_expression, [exact]) --apilevel = 1.0
local expr = "f1("..mx")"
return math.eval(expr)
Iv'e tried
require "math"
local answer
answer = math.eval("f1(x+3/4,x)")
answer = math.eval(x+3/4,x)
answer = math.eval("5+9")
I keep getting the error "cannot execute during initialization."
1) How do you fix the error
2) May I have some concrete examples of using the function