The two attached examples demonstrate problems when using a ternary in a real expression when both of the expressions are not real. It appears that the argument that is not real should be evaluated in a self determined context and then converted to a real value. The width is currently being set to one which can give drastically incorrect result. The second example appears to have the same problems as well as possibly having some code generator problems.
Also is a better place for the short circuiting, etc. in eval_tree?
I did a quick check of +, -, *, / and ** and they mostly work correctly. I found one problem with / and % that I will take care of (the right argument must be real).
Log in to post a comment.