Commit Graph

307 Commits

Author SHA1 Message Date
Lafrite
108c794a04 solve bug with expression like [2, op.sub1] 2014-12-21 19:03:44 +01:00
Lafrite
cd6e8c5ca3 docstring of __str__ in Expression 2014-12-21 18:26:05 +01:00
Lafrite
a4a58f05a0 solve bug in polynom with Expression.set_render 2014-12-21 18:22:33 +01:00
Lafrite
2bbe6eca7d eval polynom but does not work with constant polynoms. Need unittest 2014-12-21 18:03:22 +01:00
Lafrite
a38ba53577 sove bug with negative fractions display 2014-12-21 16:04:44 +01:00
Lafrite
e3d1870d33 Add exception for invalid expression 2014-12-21 16:03:53 +01:00
Lafrite
027a3ac57a solve bug with simplify fraction (which has not be simplified) 2014-12-21 15:03:56 +01:00
Lafrite
2425a2dfca solve issue wit - and polynoms 2014-12-21 08:53:10 +01:00
Lafrite
8f4d63595d solve issue with - and polynoms 2014-12-20 20:36:15 +01:00
Lafrite
a77d779a22 no expression with last elem of Expression.simplify 2014-12-20 18:48:51 +01:00
Lafrite
dbe382f892 postfix in postfix change + to - 2014-12-20 17:42:31 +01:00
Lafrite
096e025302 Merge branch 'dev' into polynom 2014-12-20 17:26:49 +01:00
Lafrite
9dbe971cd1 add __getitem__ and __setitem__ to Expression 2014-12-20 16:52:45 +01:00
Lafrite
1acf73c598 Change set_df_render to set_default_render 2014-12-20 16:43:58 +01:00
Lafrite
6ca79a4e69 random classmethod for polynoms 2014-12-19 17:29:12 +01:00
Lafrite
adce8e1348 Random classmethod for polynom 2014-12-19 17:17:25 +01:00
Lafrite
d817002430 random expression is now a Expression classmethod 2014-12-19 16:45:22 +01:00
Lafrite
5df17b4779 dd simplified method for Expression 2014-12-19 15:42:37 +01:00
lafrite
edae08d3bc add doctest operator 2014-12-03 16:25:02 +01:00
lafrite
ffd2a55b65 add doctest in random_expression 2014-12-03 15:52:08 +01:00
lafrite
ff605c87cb okfor doctest 2014-12-02 14:31:27 +01:00
lafrite
543af69979 Doctest and bugs in str2tokens 2014-12-02 12:37:23 +01:00
lafrite
e1da8d2453 operator selector 2014-12-02 11:32:59 +01:00
lafrite
cecf06e082 inside doctest works not unittest 2014-12-02 11:06:29 +01:00
Lafrite
cccfb9e90b does not work.. 2014-12-02 10:05:02 +01:00
lafrite
8485890fdf test with no * between number and letter - doctest in operator 2014-11-25 10:46:00 +01:00
Lafrite
6d8d72cdff start particularising operators 2014-11-24 07:17:51 +01:00
Lafrite
39cc36869c change parse in random_expression 2014-11-23 10:45:13 +01:00
Lafrite
7be7f82ba9 set default render for random_expression 2014-11-21 17:21:12 +01:00
Lafrite
3b5583bd61 Nice way for setting render <3 2014-11-21 15:49:43 +01:00
Lafrite
12bcf7214a solve stupid bug in spe_zip 2014-11-15 10:03:29 +01:00
lafrite
1fac2cc29e Poly works! Everything was fraction fault!! 2014-11-14 17:01:30 +01:00
lafrite
057cbaeab7 debug fraction hope it's last bug... 2014-11-14 17:00:26 +01:00
lafrite
c30fd89282 add operation for expression 2014-11-14 16:48:38 +01:00
lafrite
895408109d mod fraction to work with operations and fix render in Expression 2014-11-14 16:20:02 +01:00
lafrite
e93e14133d reduce give list (not generator any more) big issue with render!! 2014-11-11 21:51:03 +01:00
lafrite
c82e6c9a44 Calculus for poly is ok need to adapt test and there is big bug with
unify render!
2014-11-11 21:45:24 +01:00
lafrite
2b67fc682c Reduce and print poly ok! 2014-11-11 21:00:45 +01:00
lafrite
693c982cbe create a list of operator 2014-11-11 20:35:30 +01:00
lafrite
4920bbd27d start adapting polynom 2014-11-11 16:52:30 +01:00
lafrite
73e6c74c72 import old polynom and test_polynom from polynom branch 2014-11-11 11:06:17 +01:00
lafrite
80261d97d3 expression and test 2014-11-11 09:58:47 +01:00
lafrite
9c868b4e79 Add list of operators in operator.py (may need to change the form 2014-11-11 09:44:39 +01:00
lafrite
633e6b4e2c debug str2tokens 2014-11-11 09:33:31 +01:00
lafrite
d615214c35 replace renders to render in every files 2014-11-11 08:29:19 +01:00
lafrite
2132c2ba59 New render seems to be ok some debuging still have to be done 2014-11-09 12:06:31 +01:00
lafrite
41aa8dfb11 switch op1 and op2 to respect operand order 2014-11-09 11:23:02 +01:00
lafrite
6618e9d85d Forgot to save mainOp 2014-11-09 10:39:24 +01:00
lafrite
3d7018c2c7 Operator knows how to be printed 2014-11-09 10:35:49 +01:00
lafrite
565a4d3632 adapt Expression with the split. tests achieved 2014-11-08 18:15:04 +01:00
lafrite
6a6070d3d7 str2tokens seems to works 2014-11-08 17:40:02 +01:00
lafrite
a32fc4b892 Merge branch 'arity' into rewrite
Conflicts:
	pymath/expression.py
2014-11-08 16:46:38 +01:00
lafrite
825e861366 Start spliting exp 2014-11-08 16:43:04 +01:00
Lafrite
a3c84d6eab ok Operator well included need to use them correctly now! 2014-11-02 11:17:12 +01:00
Lafrite
9b1ad5c14a Adapt unit test to Operator. Still have to includ fractions 2014-11-02 11:12:47 +01:00
Lafrite
6e99dadd39 Create real class Operator and include it into expression (need to fix
render now)
2014-11-02 08:19:31 +01:00
Lafrite
4630d0de74 Definively finished arity setup 2014-10-23 13:13:28 +02:00
Lafrite
cdf5a552b2 arity is fine now! 2014-10-23 12:59:21 +02:00
Lafrite
62549d2e10 new class for operator and include it into expression.in2post_fix 2014-10-18 19:04:40 +02:00
Lafrite
eb1088d31f Solve bug with simplification of fractions 2014-09-02 11:44:04 +02:00
Lafrite
412149f22d Finish unify_render! :D and even mod the doc 2014-08-29 17:15:29 +02:00
Lafrite
71b4c987ec Change to unify renders between Expression and random_expression 2014-08-29 16:35:38 +02:00
lafrite
b0ca85a029 forgot to mod rmul 2014-06-27 11:01:44 +02:00
lafrite
369c2cd77a improve add and mul fraction (special cases) 2014-06-27 10:31:10 +02:00
Lafrite
f04d926031 change tex_render into tex and same for txt 2014-05-28 20:42:19 +02:00
Lafrite
7568b42fcc improve __mul__ in fraction: simplification inside mul 2014-05-28 20:00:39 +02:00
Lafrite
5f16cf7b62 debug simplify: issue when sign changes and need to make simplifications 2014-05-28 19:00:23 +02:00
Lafrite
43973a0039 simplify > < etc in fraction 2014-05-28 18:52:46 +02:00
Lafrite
2e80eabb33 simplify __r*__ in fraction 2014-05-28 18:49:19 +02:00
Lafrite
900bad53a3 create convert2fraction 2014-05-28 18:39:08 +02:00
Lafrite
193b050a09 Random_expression accept calc in conditions 2014-02-28 13:17:12 +01:00
Lafrite
bdad59ef8a Forgot to remove a isalpha 2014-02-28 13:16:57 +01:00
Lafrite
1aaecd4b84 Do not accept floating numbers 2014-02-28 11:34:31 +01:00
Lafrite
ae6664b7cf new unittest for expression 2014-02-28 10:31:56 +01:00
Lafrite
09bbb04ab2 remove expressions with letters 2014-02-28 09:45:19 +01:00
Lafrite
ab83751e57 remove everything about polynoms 2014-02-28 09:43:54 +01:00
Lafrite
f444a58a2b Add abs method for Fraction 2014-02-28 08:49:03 +01:00
Lafrite
8631cfd349 add __all__ 2014-02-27 18:02:34 +01:00
Lafrite
232368fd75 bug and unittests for renders 2014-02-26 12:48:41 +01:00
Lafrite
1ecc25b9bf add last_elem 2014-02-26 12:39:38 +01:00
Lafrite
c420ef980b solve (-2) * ... parenthesis issue 2014-02-25 17:02:15 +01:00
Lafrite
c8261eb642 add str in render 2014-02-25 16:52:18 +01:00
Lafrite
d393e1e794 debug texrenders but need unittest 2014-02-25 15:59:22 +01:00
Lafrite
3786bd5cf6 move formal to polynom and solve (I hope) consequences 2014-02-22 10:38:57 +01:00
Lafrite
2e417f3bef thanks to gcd beggug now tests on fractions work 2014-02-22 10:13:12 +01:00
Lafrite
c3a6628ae3 gcd works with negatives numbers and it is now tested 2014-02-22 10:12:05 +01:00
Lafrite
ceab817c28 new methods for Fraction __radd__ __rsub__ __r*__ 2014-02-22 07:23:42 +01:00
Lafrite
6509e0164a Add __eq__ in fraction 2014-02-21 18:02:34 +01:00
Lafrite
8e86220b50 add float method in fraction 2014-02-21 11:08:55 +01:00
Lafrite
1abd903c9b Add case when numerator is 0 2014-02-21 11:05:25 +01:00
Lafrite
ab903c368e renders for packaging 2014-02-21 06:51:37 +01:00
Lafrite
77da30d0b7 add a test 2014-02-21 06:51:37 +01:00
lafrite
e669e9707d allow raw string generation 2014-02-21 06:51:37 +01:00
lafrite
698fea5c63 generate letters can't be equal to 0 2014-02-21 06:51:37 +01:00
lafrite
d566867ae8 not very good render especially with negativ numbers... but can work 2014-02-21 06:51:37 +01:00
lafrite
cb198eb5f0 improve printing ofr FormalExp 2014-02-21 06:51:36 +01:00
lafrite
eece262566 parsing and rendering "^" done.Computing with integer too 2014-02-21 06:51:36 +01:00
lafrite
5a8da2f470 modif for be able to use it for first big use 2014-02-21 06:50:34 +01:00
lafrite
9ec684477f Expression handle ":" but can't simplify with it yet 2014-02-21 06:48:15 +01:00
lafrite
5799d9a48d render accept ":" 2014-02-21 06:47:35 +01:00
lafrite
52ee73c340 Integrate exp and render into random_expression 2014-02-21 06:47:08 +01:00
lafrite
d74e18b663 Change ** to ^ and mod test in render 2014-02-21 06:43:57 +01:00
lafrite
9b104f020f formal multiplication done, need to simplify keys 2014-02-21 06:43:34 +01:00
lafrite
c5300991d5 Dictionary convolution 2014-02-21 06:39:54 +01:00
lafrite
2ffce67867 formal (which should be called polynom...) are ok.No mult yet 2014-02-21 06:37:22 +01:00
lafrite
b0a60f706b Render ~work with letters still some bugs 2014-02-21 06:34:17 +01:00
Lafrite
4834186bec Packaging files 2014-02-21 06:29:58 +01:00