Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Strange behaviour with distributivity of multiplication

I got the following code wich is not consistent. There should be a bug in there. The priority of the parenthesis is not respected in the first case.

 sage: version()                                                                                                                                                                                                                               
'SageMath version 9.0, Release Date: 2020-01-01'
sage: ....: Qpart(x) =5*( unit_step(x)   
....: ....:     * sin(x )  -  
....: ....:     sin(x))                                                                                                                                                                                                                       
sage: Qpart                                                                                                                                                                                                                                   
x |--> 5*sin(x)*unit_step(x) - sin(x)
sage: ....:5*( unit_step(x)   
....: ....:     * sin(x )  -  
....: ....:     sin(x))                                                                                                                                                                                                                       
5*sin(x)*unit_step(x) - 5*sin(x)