Re: [sage-support] full_simplify() gets wrong answer

2018-11-13 Thread Daniel Krenn
On 2018-11-13 06:20, Michael Beeson wrote:
> def demo():
> var('N,x')
> test = ((N*(3*I*sqrt(3) + 9) + N*(3*I*sqrt(3) - 3)))*x
> print("test = ")
> print(test)
> print("test.full_simplify() = ")
> print(test.full_simplify())
> 
> Here is the output
> 
> sage: demo()
> 
> test = 
> 
> (N*(3*I*sqrt(3) + 9) + N*(3*I*sqrt(3) - 3))*x
> 
> test.full_simplify() = 
> 
> (36*I*sqrt(3)*N + 6)*x

I cannot repreduce this on 8.4:

sage: demo()
test =
-3*(N*(-I*sqrt(3) + 1) + N*(-I*sqrt(3) - 3))*x
test.full_simplify() =
-6*N*x*(-I*sqrt(3) - 1)

-- 
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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] full_simplify() gets wrong answer

2018-11-12 Thread Michael Beeson
def demo():
var('N,x')
test = ((N*(3*I*sqrt(3) + 9) + N*(3*I*sqrt(3) - 3)))*x
print("test = ")
print(test)
print("test.full_simplify() = ")
print(test.full_simplify())

Here is the output

sage: demo()

test = 

(N*(3*I*sqrt(3) + 9) + N*(3*I*sqrt(3) - 3))*x

test.full_simplify() = 

(36*I*sqrt(3)*N + 6)*x


The answer should have 6  where it has 36.  If you take the "*x" off the 
end of test,

then Sage answers correctly.


sage: version()

'SageMath version 8.0, Release Date: 2017-07-21'



-- 
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 https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.