I guess this sounds easier than it is really.
The thing is, if you want to have exact calculations for things like roots you would have to implement some kind of symbolic calculation.
I don't know any of the source of this application but I'd guess it is all just numerical stuff like you would have in vanilla MATLAB or octave.
To cut it short: there is no solution to this without a great effort.