On Friday, March 13, 2015 at 11:32:11 AM UTC-7, M M wrote:
>
> I tried on a different machine with Sage Version 6.5, Release Date: 
> 2015-02-17   and I get the same behaviour described in the original post. 
> Where parsing a string and evaluating returns different results than using 
> the resulted sage expression.
>
>
Ah, right. Yes, evaluating a string representation of an object does 
necessarily result in the same object. We have already established that the 
expression in question is ill-conditioned for numerical purposes, so you 
probably end up with a subtly different internal representation of the 
object, which has huge numerical consequences. Indeed:

sage: A = integral(x/(x^3-x+1), x, 1, 2)
sage: B = eval(preparse(str(A)))
sage: (A-B).n()
0.894231297231034
sage: (A-B).simplify()
0

This is entirely consistent with float operations not being 
commutative/associative/etc. It's unfortunate, but if this is a bug then 
floating point is a bug.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to