29 Mar
2007
29 Mar
'07
3:34 p.m.
Dear Alexei, On Thu, 29 Mar 2007, Sheplyakov Alexei wrote:
Yes, but not from a string. In normal code you can type
sin(sin(sin(sin(log(-0.760).hold()))))
I used to think that GiNaC does not evaluate expressions numerically unless evalf() is called. Apparently this is not true. I think this is a bug which should be fixed.
I do not see a problem with it. I think it is almost always the right thing to do. This behaviour was intended as is clear from this code fragment from exp_eval // exp(float) -> float if (x.info(info_flags::numeric) && !x.info(info_flags::crational)) return exp(ex_to<numeric>(x)); I am afraid that changing this behaviour would break quite a lot of code out there. Best wishes, Chris