some bugs have been solve new have been discover!

This commit is contained in:
Lafrite 2015-04-06 17:57:57 +02:00
parent b1c3c3564e
commit 34d9cb1793

20
bugs
View File

@ -1,7 +1,5 @@
* Soustraction de Polynômes!!!! * Soustraction de Polynômes!!!!
* Expression importe mal 4x^2 * Expression importe mal 4x^2
In [9]: e = Expression("3x + 4x^2 - 1") In [9]: e = Expression("3x + 4x^2 - 1")
@ -69,11 +67,27 @@
TypeError: unsupported operand type(s) for +: 'type' and 'str' TypeError: unsupported operand type(s) for +: 'type' and 'str'
* Parenthèses abhérentes * (solved) Parenthèses abhérentes
In [7]: P = Polynom([-6, 12, -20]) In [7]: P = Polynom([-6, 12, -20])
In [8]: print(P) In [8]: print(P)
( - 20 x^{ 2 } + 12 x ) - 6 ( - 20 x^{ 2 } + 12 x ) - 6
* Chainer des opérations et sauvegarde des étapes
In [12]: R = P-Q - P
In [13]: R
Out[13]: < Polynom [-4, -5, 0]>
In [14]: for i in R.explain():
print(i)
....:
3 x^{ 2 } - 3 x - 3 - ( 3 x^{ 2 } + 2 x + 1 )
3 x^{ 2 } - 3 x - 3 - 3 x^{ 2 } - 2 x - 1
( 3 - 3 ) x^{ 2 } + ( -3 - 2 ) x - 3 - 1
- 5 x - 4