Friday, February 6, 2009

Solve 1st degree equations

Although this does the same thing as the solver before, it does it the direct way. Put your equation in the form ax+b=0 and insert a and b into the variables, and it spits out X:

to solve.first :a :b
show (word "x "= "(-:b/:a))  setx (-:b/:a)
end

No comments: