From 34d9cb1793772a0555d3446b7fdd36438a06edb6 Mon Sep 17 00:00:00 2001 From: Lafrite Date: Mon, 6 Apr 2015 17:57:57 +0200 Subject: [PATCH] some bugs have been solve new have been discover! --- bugs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/bugs b/bugs index 553d1d1..f302e91 100644 --- a/bugs +++ b/bugs @@ -1,7 +1,5 @@ * Soustraction de Polynômes!!!! - - * Expression importe mal 4x^2 In [9]: e = Expression("3x + 4x^2 - 1") @@ -69,11 +67,27 @@ 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 [8]: print(P) ( - 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 +