Commit Graph

35 Commits

Author SHA1 Message Date
Émilie Feral
3d0917070e [poincare] Handle square root of negative values
Change-Id: I1ce214ba13ba4d94d662da0441439602ef39e3fe
2017-04-24 17:36:33 +02:00
Émilie Feral
448e803f78 [poincare] Ensure that a float power an integer in a real
Change-Id: I19416271f127ac487f61191cacc6243bb4e0c160
2017-04-21 10:08:09 +02:00
Émilie Feral
f031bfdabd [poincare] Clean power implementation
Change-Id: I17f01cd7dc10a9864571c3fd76d44ff8da9b3fc0
2017-04-05 17:41:21 +02:00
Émilie Feral
fa2ee9e624 [poincare] Never return nullptr when creating a expression to avoid
nullptr dereference

Change-Id: Ie7976a8ee86c82283ebcbffc28fe902ddfb7a952
2017-03-29 11:35:30 +02:00
Émilie Feral
a019289a6a [poincare] Implement complex format
Change-Id: I98731b356cce0ae3107fd0a660697241210692ae
2017-03-07 15:53:05 +01:00
Émilie Feral
dc7a629dfa [poincare] Replace complex constructors by named constructors
Change-Id: I6aad82edfb1bd243c4537a48888655608b90eeb5
2017-02-20 09:39:25 +01:00
Émilie Feral
e5e9f7cc41 [poincare][apps] Make preferences a const object accessible from
anywhere (poincare and apps)

Change-Id: I49cc6bf940d1efeb6b153daac949ffcb23999a8d
2017-02-20 09:39:24 +01:00
Émilie Feral
b79bcfb9dc [poincare] Change name DisplayMode -> FloatDisplayMode
Change-Id: I7754b4a5ac96c3f3564749749b49130ddf357e20
2017-02-17 16:35:07 +01:00
Émilie Feral
69e46f4958 [poincare] Namespace Poincare
Change-Id: I51a84fa7978ba16f128cfe1d32c390970f2037e8
2017-02-13 17:15:06 +01:00
Émilie Feral
6f846636e6 [poincare] Implement complex power
Change-Id: I7e1344d298209e243b53c727d95dfadf801b1a7f
2017-02-13 17:15:04 +01:00
Émilie Feral
676bd46f33 [poincare] Expand numbers to complex numbers
Change-Id: I2e7cf5240e184da45b656ee4f121ad76aabfd1c7
2017-02-13 17:15:03 +01:00
Émilie Feral
42e4cf408d [poincare] Enbale to evaluate expression in degrees or radian
Change-Id: I8b08e7fa93431817559a594a1ea03d4414f0c830
2017-02-06 16:30:48 +01:00
Émilie Feral
e951140298 [poincare] Change method createLayout() to createLayout(DisplayMode)
Change-Id: Ifb1027d38b53a50a0ada80e11b68d44e72ac9099
2017-01-31 10:36:13 +01:00
Émilie Feral
ced026e7d6 [poincare] Merge together exponent layout and subscript layout
Change-Id: I0225911249de60e96bfb6ceda369233bdb47942e
2017-01-27 12:02:46 +01:00
Émilie Feral
eb485d52b5 [poincare] Improve power layout (delete eventual useless parenthesis)
Change-Id: Ibdd80662277c9c7cdd11712380b2da6544b7d46b
2017-01-27 12:02:29 +01:00
Émilie Feral
5bfa345b0b [poincare] Change name: product->multiplication
Change-Id: Ie4f4580675a68ddad32256df568ec000e6f50ede
2017-01-15 20:09:22 +01:00
Émilie Feral
a07a59efe9 [poincare] Factorise the method evaluate
Change-Id: Ief252568e8d232fc4606e8c86b5e3f9b4c076955
2016-12-09 11:01:39 +01:00
Émilie Feral
4df7f4aaa1 [poincare] Correct memory leaking issue
Change-Id: Ide22a702f7a23b140cad7cd61f4543355b2de8f6
2016-12-08 17:10:36 +01:00
Émilie Feral
357f971120 [poincare] Change name: createEvaluation -> evaluate
Change-Id: I8f241541af0435c6ab4f7ba1f561f880c4e95ac0
2016-12-08 17:10:36 +01:00
Émilie Feral
0ce0995e0c [poincare] add a method createEvaluation in all expressions
Change-Id: I72e78afcae2a931376108859a5615c227d364d74
2016-12-08 15:21:52 +01:00
Felix Raimundo
77f057de82 Add the const qualifier to Expression methods
Change-Id: Ic05828a91c89cb391e6d7c1d4a5220fad4aea5e7
2016-04-18 18:48:56 +02:00
Felix Raimundo
2f7b1f4860 Add the cloneWithNewOperands method.
This allows to replace the operands of an expression with new ones.

Change-Id: I3c2d183bbdbcc43b776f7ce2a302216c52e494bd
2016-04-11 12:21:14 +02:00
Romain Goyet
de2f83e8bd Poincare: Put the AST printing in its own file
Change-Id: I1793fa2057098f31a549faf6bf39e64c333b5b06
2016-04-01 15:02:31 +02:00
Felix Raimundo
ed2c4cfb59 First version of the simplifications.
Change-Id: Idbddb92b6bd098d6b862f5fc4abd741948e15194
2016-04-01 11:32:11 +02:00
Felix Raimundo
3710103f40 Change the layout creation.
The father now sets itself as teh father of its children.
ExpressionLayout do not know anything about expressions now.

Change-Id: I28954c78f3102eec056ebbc3c52ccd862a5ab8fd
2016-03-25 14:35:00 +01:00
Romain Goyet
202d110488 Add a BinaryOperation class
Parent of Fraction, Power, Subtraction

Change-Id: Ibb03e96062acd4870c5f10fe21eeea896a5927ec
2016-03-24 15:49:58 +01:00
Romain Goyet
0d7813dc7b Poincare: Expressions can now be cloned
Change-Id: I5a291c56dd031ec5e7aa6fbfe09823807f1b0e3c
2016-03-24 13:35:16 +01:00
Romain Goyet
dfdaa54928 Poincare: Clean the Expression::Type
Change-Id: I3809a8b1b040314466554866555fb634c35156a5
2016-03-24 10:19:04 +01:00
Romain Goyet
d3b0841af6 Poincare: Add a simplifier
Change-Id: Iac53c9b7dda5cb284fe750bb84c92ce5d1fba497
2016-03-23 17:24:11 +01:00
Romain Goyet
cddb2ab887 Don't depend on the PLATFORM variable being defined
Change-Id: Ia1d0e5f320dfc0c6ab1cf8a588c297cbbc3c0df3
2016-03-18 16:53:01 +01:00
Felix Raimundo
a4e3f1e2d1 Compute power for real on the simulator.
Change-Id: I790f0b1216584835cd551893f16c052d21de7e31
2016-03-18 14:33:48 +01:00
Felix Raimundo
d42bbaf25a Add exponent layout.
Change-Id: Iffce8dcdd4ecf10a8ed4170494b59fa6c524b9cb
2016-03-18 14:31:58 +01:00
Felix Raimundo
b33eb99067 Adds the power and parentheses to the parser.
Also removes some dead code and adds buttons in order to have parentehses.

Change-Id: Iaf6d678f765bb6a1c3405818738c51661aa43e12
2016-03-18 13:00:17 +01:00
Romain Goyet
46e3e614bf [poincare] approximate 2015-09-17 20:15:20 +02:00
Romain Goyet
ac26f20ffb Proper drawing of expressions 2015-05-19 18:06:25 +02:00