Commit Graph

7312 Commits

Author SHA1 Message Date
Émilie Feral
1fed5c15cf [poincare] Power: do not reduce too big negative power (999^-999)
Change-Id: I52fdd31dcea53bc8926ad14945d6bb42ea18f668
2017-11-24 09:36:21 +01:00
Émilie Feral
051f7c4a8a [poincare] Multiplication: fix shallowReduce
Change-Id: I95a1423e19d3d6e020a60736838be27124dc79d4
2017-11-24 09:35:13 +01:00
Émilie Feral
54fbcfe15c [poincare] In trigonometry, avoid to loop on trigo table if the
expression does have the right type

Change-Id: I2cd5169df6709943aeddf96d098aa8d8275465d0
2017-11-23 14:54:29 +01:00
Émilie Feral
42e407cad5 [poincare] Improve implementation of Division::shallowReduce
Change-Id: Id6b1f6606e5d4aa11b2543151fbba3c7be54551c
2017-11-23 14:53:52 +01:00
Émilie Feral
5acafb0cdb [poincare] Cap the length of integer that are printed
Change-Id: I6d5e1f1201d1354ca48fee6f84dc0400143b7347
2017-11-23 14:52:25 +01:00
Émilie Feral
6f75b54e8b [poincare] Fix: Do not reduce too big power (999^-999)
Change-Id: I46bab384d1700cfc7d8069eb68b0c77efc2b343d
2017-11-23 14:02:41 +01:00
Émilie Feral
a90228a48f [poincare] Power of true complexes is undefined (otherwise, some rules
cannot be applied: (x^y)^z)

Change-Id: I44b64a9fb80997abb7d957b9ac9c1d4d38f8de8e
2017-11-23 13:47:29 +01:00
Émilie Feral
888d1a6df1 [poincare] In DynamicHierarchy: speed up sort operands as we know there
is no matrix among operands

Change-Id: Ia673fbcdf7ae8d07138efa6b43a81b3de19a5444
2017-11-23 11:50:29 +01:00
Émilie Feral
a5c984fce3 [apps] Calculation: change the grey of approximate output
Change-Id: Iac001fc581544af0634ad1d7765074f69aa07809
2017-11-23 11:49:52 +01:00
Émilie Feral
7f0c54e6e1 [poincare] Add a todo with commented test
Change-Id: I9cc1a758d77c3ee5267c019dc2b4f40834f198ca
2017-11-23 11:01:56 +01:00
Émilie Feral
942e8c5bd4 [poincare] Multiplication::shallowReduce : factorizing factors can lead
to new rational that have to be merge afterwards (ie 2^(1/2)*2^(1/2) or
i*i or pi*pi^(-1))

Change-Id: Ibeb21e305ff065524210a5cfb46182b0de2f49c9
2017-11-23 10:41:43 +01:00
Émilie Feral
920a12027f [poincare] In complex writeToText, change '*' to MiddleDot
Change-Id: If5e56f5c1a96ce0d0d5136272086dc78887a1cec
2017-11-23 10:01:43 +01:00
Émilie Feral
cbea9aa091 [poincare] Do not split in prime factors integers that are too big (to
avoid lagging)

Change-Id: Icb70a5ca96fbd8b3eb1c829f8de798df43d54de5
2017-11-22 18:01:38 +01:00
Émilie Feral
7503a6aedd [poincare] implement Round::shallowReduce for rationals
Change-Id: I552570bceed2b52dbf6db9b6d47979e0f87b7a4f
2017-11-22 17:20:01 +01:00
Émilie Feral
156e08dc12 [poincare] Fix unitary tests (part I)
Change-Id: Ib971a3562a7dbf98dda3a02ad1b7064ad7b57fdf
2017-11-22 16:47:39 +01:00
Émilie Feral
f5983c97e6 [poincare] Fix confusion between double and float!
Change-Id: I57a12f85f3e24a80c09de48a3f33e4e81593fc85
2017-11-22 16:46:49 +01:00
Émilie Feral
8f4c49d8c1 [apps] In calculation, fix the almostEqual aligmnent
Change-Id: I26eca4c9c2b5a3b1ad05567e8d5daf76922f2cb7
2017-11-22 14:38:53 +01:00
Émilie Feral
7ae6241acd [poincare] Fix all layouts: redefine baseline
Change-Id: Iff04bf9bee946050721fc095d1617586dc251d6b
2017-11-22 14:38:08 +01:00
Émilie Feral
a536ef58cf [poincare] Fix writeTextInBuffer of Power and Division: add parenthesis
to x^(2/3) and x^y^z

Change-Id: I61bed286260a21b42712eff04d46fc664724c203
2017-11-22 14:18:51 +01:00
Émilie Feral
ff0a72177c [poincare] Fix error in write in buffer: conjugate(2)->conj(2)
Change-Id: I68056b192afc76f50117fd4157d85d5f9fa029db
2017-11-22 13:57:02 +01:00
Émilie Feral
b126c1927b [poincare] Modify power rule: 0^0 = undef and x^0 = 1
Change-Id: I5e0d04c55d730a04c2a671465a49c592f0f1819a
2017-11-22 11:59:12 +01:00
Émilie Feral
091a0ff10e [poincare] Fix bug: print 0 in polar mode should print 0 and not undef
Change-Id: Ic38168a2c80bc97fa539963e6c6da2f408ec5659
2017-11-22 11:07:47 +01:00
Émilie Feral
43aadf41fe [poincare] In store, do not evaluate twice stored value: evaluate only
once in global context

Change-Id: I7e0ec3122e4d84500ea4f3e157a8398d0ed09d50
2017-11-22 10:28:38 +01:00
Léa Saviot
6ccd0c1c55 [python] Fixed the Python stack length computation.
On the device, the stack is stored in reverse order, but it might not be
the case on other platforms, which changes stack length computation.

Change-Id: I0218224a77465b9672f137771c00f734fdfaea64
2017-11-22 09:53:34 +01:00
Romain Goyet
52bdf4a41f Merge branch 'cas_with_app_copy' into python_console 2017-11-21 18:44:38 +01:00
Léa Saviot
07bc7672e8 [code] Fixed cursor bug when inserting text in editor.
Now the cursor moves only if the insterion was successful.

Change-Id: If2f74307aecd4b9b86183a3437a53fd8875c1751
2017-11-21 17:37:48 +01:00
Léa Saviot
5bfc482e62 [escher] textArea now returns a bool when inserting text.
Change-Id: I79111148e8e8b30abb24a6aecea0c187dbd7e2f6
2017-11-21 17:37:48 +01:00
Léa Saviot
711f78f837 [code] Added Kandinsky module and other functions in Toolbox.
Change-Id: I81a1323993c91990b13e81cbf4ea2af1ace8ef11
2017-11-21 17:37:48 +01:00
Léa Saviot
c537a59006 [code] Removed "input()" and Random module from the Toolbox catalog.
Change-Id: Id9e99cc908d533f018b1fe28f60b6fa26d8ea546
2017-11-21 17:37:48 +01:00
Léa Saviot
f7a6e615ca [code] The cursor in a toolbox command does not go before a point.
The cursor now goes either after the first open parenthesis or at the
end of the command.
Fixed z.real and z.imag.

Change-Id: I46ca3be0415832fd91273ca7fed12ed3d6f125dc
2017-11-21 17:37:48 +01:00
Émilie Feral
7c772d85b7 [apps] In calculation, do not display exact output if it is identical to input
Change-Id: I4b0733c7e3090bc2b04c68661bd34cf0b6da17f1
2017-11-21 17:37:25 +01:00
Émilie Feral
b2d6c2e305 [apps] In calculation, avoid blinking when changing selection
Change-Id: I8b94362183e1aed0d87cfdfa39b3f67ccbbd8b42
2017-11-21 17:37:25 +01:00
Émilie Feral
35b979798d [escher] Optimize redrawing when changing features in cells (color,
highlight, even)

Change-Id: I0afa8b6fad656d578bb8e071183646196bc816f9
2017-11-21 17:37:25 +01:00
Émilie Feral
5e822a8001 [apps] In calculation, fix scrolling between approximate and exact
outputs

Change-Id: I8920cc3eab9f72d4b82cf2361bd1eba02232a268
2017-11-21 17:37:25 +01:00
Émilie Feral
7d30801e68 [apps] Change output colors
Change-Id: Ic8cb3f6bf3130c8b5e4c84edc1513353631d0336
2017-11-21 17:37:25 +01:00
Émilie Feral
fe73c69b11 [apps] In calculation, swap exact and approximate outputs
Change-Id: I0cbce8b56a37b31d3249a53b35d69098a8d45c78
2017-11-21 17:37:25 +01:00
Émilie Feral
65722ff875 [apps] Fix bug when computing the history cell height in Calculation
Change-Id: Ic45f3da26a47b189ef6050d68c25f27c9a1f4bb7
2017-11-21 17:37:25 +01:00
Émilie Feral
fe4a3e8058 [escher] Increase textfield size
Change-Id: I1fed662ad11ecb556a5a1f8a5a2828ccb7fb600b
2017-11-21 17:37:25 +01:00
Émilie Feral
bb590bc529 [apps/calculation] Valgrind: fix call to deleted memory
Change-Id: I36e25684dfd260e04ce29fe0698c179e372030d4
2017-11-21 17:37:25 +01:00
Émilie Feral
5fd8fda4b1 [calculation] Display exact and approximate results
Change-Id: Id5fe5b5db464c45f09bd1a1285def95e738a78c7
2017-11-21 17:37:25 +01:00
Émilie Feral
6c51c584f2 [apps] Change Calculation to hold an exact and an approximate output
Change-Id: I1805839e17cd42b82f06ce0a320d20b49cd2a6cd
2017-11-21 17:37:25 +01:00
Émilie Feral
e112383ce3 [poincare] In Decimal, do not reduce to rational if exponent is too big
or too small

Change-Id: Ibf80302e6e2ad3242f6d9f2ee7de31de2ef0dd1f
2017-11-21 17:37:04 +01:00
Léa Saviot
92789330de [code] Search function in the code Toolbox.
When the user types a letter, the toolbox scrolls to the first row that begins
with said letter (without considering if it is lower or upper case). If
there is not such a row, the toolbox scrolls to the first row that has a
letter higher than the typed letter.

Change-Id: I353d23560d8a4d618d96426c393b024e7fb487af
2017-11-21 17:30:04 +01:00
Léa Saviot
95bf921138 [code] The Mandelbrot script now uses complex numbers.
Change-Id: I47f14d414c86c09f85093c201d16ef71ce028510
2017-11-21 17:12:42 +01:00
Léa Saviot
a9f4da92c0 [code/python] Fixed the Kandinsky module in Python.
User can draw on the 320*220 drawing screen.

Change-Id: I25034b05f21aacc35608358fdb7a4d9924dd22e8
2017-11-21 17:12:38 +01:00
Émilie Feral
0cd2ac42fb [poincare] In multiplication, fix bug in addMissingFactors: treat
rational as a special case

Change-Id: I609c05c8a1981d1ecbd51775c7186f3a4e97896e
2017-11-21 16:31:28 +01:00
Émilie Feral
b29ebcf154 [poincare] Fix bug in VariableContext: when the value put in x is not a
complex, we put NAN in x

Change-Id: I28e75fb407a285ae7451e80bb862279a2aa8ae3d
2017-11-21 15:49:50 +01:00
Émilie Feral
6498e13a09 [poincare] In Power, do not reduce too big rational power (ie 999^999)
Change-Id: I21f4437c347f9041f9b9a186dbc729d03ff6c7f4
2017-11-21 15:33:17 +01:00
Émilie Feral
180b575091 [poincare] Improve Tangent::shallowReduce
Change-Id: I4b419200dfa4a04a8589c7542e734b7ba3d06436
2017-11-20 16:56:08 +01:00
Émilie Feral
28d6012d25 [poincare] Fix bug: cannot add matrix of different dimensions
Change-Id: Ia1fb2c8dc9a4ded09dee6fafc917f352cff5b948
2017-11-20 16:22:56 +01:00