Keepfloat is explicitly set to false in the solve program, and the comments in the source code say so. Also ratfac is set to false.
The usefulness of keepfloat in some circumstances is undeniable, though whether the behavior of floats in this particular case is a bug or not might be worth discussing. Perhaps there should be a comment to the effect that indefinite symbolic integration is an algorithm that in its full generality requires the application of exact rational arithmetic. In particular the integration program (or more particularly if the solve program is called by integration) the system temporarily sets keepfloat to false. My initial reaction is that the person supplying this command with keepfloat:true could be given more of a warning, e.g. "keepfloat is being reset to true by the solve program." The program is not, I think, in error. It would be an error if one could give a quadratic polynomial to solve and find there were not exactly 2 roots. This would presumably be possible with sufficiently nasty floats. Some people object to the "ratprint" messages, but (a) they are easily turned off and (b) Sage apparently doesn't convey them. So that is apparently not the issue. My view of a command like this one is that the system has to make the best sense it can as to what can be done with the input. Perhaps the user meant to convey the number 117/100, and was too lazy to type it that way, preferring 1.17. If the user meant to convey 1.17+-.005, then he could say that, though intervals are not really so well handled in this situation. OR the user could type a*x^2 instead of 1.17*x^2 if he wished to reserve judgment as to what 1.17 meant to him. Historically, we see people write x^.5 and we make a fuss over that, thinking about some esoterica like that 0.5 is a real number representing a floating-point interval (e.g. as in Mathematica) or a "machine number" etc. and not "just" a rational. Not realizing that this is merely the simplest way of typing something: sqrt(x) is 7 characters x^(1/2) is 7 characters x^.5 is 4 characters. RJF -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
