Commit Graph

59 Commits

Author SHA1 Message Date
Émilie Feral
5fd415eb9e [poincare] Register Static Allocation Failure if required 2018-08-09 17:16:22 +02:00
Émilie Feral
8a1aab6d67 [poincare] Fix Number 2018-08-09 14:10:25 +02:00
Émilie Feral
0eda414cdf [poincare] Fix Decimal 2018-08-09 10:54:34 +02:00
Émilie Feral
aaa20a58fa [poincare] Implement SerializationHelper and
SerializationHelperInterface. WriteTextInBuffer->serialize
2018-08-08 15:31:40 +02:00
Émilie Feral
cb4bb4f8f0 [poincare] Engine-->Helper and break LayoutHelper into LayoutHelper and
SerializationHelper
2018-08-08 14:00:52 +02:00
Romain Goyet
ba5d80f09b [poincare] ComplexReference becomes Complex 2018-08-08 13:34:16 +02:00
Romain Goyet
56fb29786e [poincare] ExpressionReference becomes Expression 2018-08-08 13:34:16 +02:00
Romain Goyet
b44e643b18 [poincare] EvaluationReference becomes Evaluation 2018-08-08 13:34:16 +02:00
Émilie Feral
2c5c14f0ab [poincare] Create DecimalNode, DecimalReference 2018-08-03 16:42:09 +02:00
Émilie Feral
54f9ea2d46 [poincare] Redesign of Expression: first attempt 2018-08-02 15:46:31 +02:00
Émilie Feral
48f890ef93 [poincare] AngleUnit, FormatComplex and PrintFloatMode are now
enumeration of Preferences class
2018-07-30 13:48:04 +02:00
Léa Saviot
a3032e5ec3 Merge branch Tree into master 2018-07-19 14:01:02 +02:00
Émilie Feral
0bfe78e568 [poincare] Decimal: fix the number of significative digits displayed 2018-07-18 17:09:07 +02:00
Émilie Feral
1455923904 [poincare] Decimal: fix error in convert to text 2018-07-18 17:09:07 +02:00
Émilie Feral
2e7c08241a [poincare] Change writeTextInBuffer signature (parameters are float
display mode and number of significant digits)
2018-07-18 16:32:50 +02:00
Émilie Feral
b8af15f1ab [poincare] change createLayout signature
- CreateLayout depends on the float display mode and the number of
significant digits
- Float display mode does not have a default value anymore
2018-07-18 16:32:50 +02:00
Émilie Feral
d94ed82ab8 [poincare] Create class Approximation<T> to avoid useless conversion
between Decimal and float/double
2018-07-18 16:32:50 +02:00
Émilie Feral
350480cc6e [poincare] Implement toScalar on Decimal 2018-07-18 16:32:49 +02:00
Émilie Feral
dd0bc491f6 [poincare] Replace Poincare::Complex by std::complex 2018-07-18 16:32:49 +02:00
Émilie Feral
b0d94f6ead [poincare] Decimal: templatize Decimal constructor on float/double 2018-07-18 16:32:49 +02:00
Léa Saviot
4eac450787 [poincare] Put layouts on expressions 2018-07-13 13:07:51 +02:00
Léa Saviot
880c3e59de [poincare] Continue removing layouts 2018-07-03 18:29:08 +02:00
Léa Saviot
f579e95815 [poincare] Start removing ExpressionLayout 2018-07-03 17:33:06 +02:00
Émilie Feral
386ebc5bfc [poincare] Decimal: fix buffer overflow in convertToText 2018-05-23 10:26:52 +02:00
Émilie Feral
bb8ab2a42e Merge branch 'saisie-jolie' into master-merge-saisie-jolie 2018-05-16 11:28:07 +02:00
Émilie Feral
02c1d3206a [poincare] Decimal: we do not need to remove zero at the end of the
mantissa as they are not printed when converting to text
2018-05-15 11:33:28 +02:00
Émilie Feral
6e1c0043e0 [poincare] In Decimal::convertToText, round mantissa rather than
truncate
2018-05-15 11:33:28 +02:00
Émilie Feral
1669bee2f6 [poincare] Fix Decimal::convertToText 2018-05-15 11:33:28 +02:00
Émilie Feral
bffdb59847 [poincare] Fix Decimal constructor from double 2018-05-15 11:33:28 +02:00
Léa Saviot
c4b5d4cf40 Merge branch 'SaisieJolieRebase1201' into SaisieJolieMerge10Apr
Change-Id: I802dbb9f7c0eebf75a1b6cd21ddd194e89b53752
2018-04-10 17:21:54 +02:00
Émilie Feral
6de71ae145 [poincare] Clean: convertFloatToText should be in PrintFloat instead of
Complex
2018-03-21 15:57:19 +01:00
Émilie Feral
f9241bd7e6 [poincare] Decimal: writeTextInBuffer has to handle cases when the
mantissa is too big to be serialize
2018-02-01 11:49:39 +01:00
Émilie Feral
26af09843e [poincare] Enable writeTextInBuffer to work with different numbers of
significant digits
2018-01-30 19:14:42 +01:00
Émilie Feral
4731cbd6e0 [poincare] Fix parenthesis addition on Complex object
Implement 'needParenthesisWithParent' instead of 'operandNeedParenthesis'
2018-01-30 16:17:03 +01:00
Léa Saviot
55044d8e0b [poincare] Update Expression's privateCreateLayout().
We use the new layouts and no longer the old ones such as StringLayout
or BaselineRelativeLayout.

Change-Id: Ic15167b694c3adab46f348c8f823ce19b3e5ef33
2018-01-15 11:58:05 +01:00
Léa Saviot
f49168d779 [poincare] Use editable String and BaselineRelative layouts.
Change-Id: I978c4aa43772b294251b948fc20bb0d8b8b05a08
2018-01-15 11:58:01 +01:00
Émilie Feral
4cbe8fbf52 [poincare] Stopping the process inside a SimplificationOrfer call is not
always enable

Change-Id: Iad4cc54d4f9b139e967ead8ee6f8e9635cc39351
2017-12-04 17:57:19 +01:00
Émilie Feral
97ab64296b [poincare] clean warning
Change-Id: I4549b237391f46fcb4a28a33c497fb9013c9659c
2017-11-28 14:05:51 +01:00
Émilie Feral
fda382cc0d [poincare] Change name: evaluate->approximate
Change-Id: I649a7c640190713dcf063a4148decd6038e62796
2017-11-24 13:31:44 +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
Émilie Feral
53c66baa16 [poincare] Re-enable matrix in simplified expression-> handle matrix in
evaluate

Change-Id: I455845398f0799b9e25fd192ada7478c872ab892
2017-11-17 13:34:46 +01:00
Émilie Feral
b6a0733fea [poincare] Handle edge case in removeZeroAtTheEnd of the mantissa
Change-Id: I8e73d99037fe7f7c280730844b4ec6ebef4d3474
2017-11-17 13:34:44 +01:00
Émilie Feral
7e68cbf386 [poincare] Fix bug when converting double to decimal: 0.999999999999999
exponent is -1 but it is stored with a mantissa of 1

Change-Id: I48f79a7aacc9fc69674f7d32e49d2d528f80ca16
2017-11-17 13:32:57 +01:00
Émilie Feral
a4e06e123f [poincare] Implement comparison on decimal
Change-Id: I87cd42d9b1bbae0e0bb68cd2dcd6449dee9910a5
2017-11-14 16:30:21 +01:00
Émilie Feral
ecf5f05773 [poincare] Decimal::shallowBeautify
Change-Id: I2b23a0c2b6ebb700c88012a5b3d53654cc65d480
2017-11-10 23:58:28 +01:00
Émilie Feral
ed6c6d2b20 [poincare] Add a constructor in Decimal to build from a double
Change-Id: If00cd2cff8fa254a95c28a807df5db5857a2d577
2017-11-10 23:58:20 +01:00
Émilie Feral
81b3a544d9 [poincare] Fix writeTextInBuffer of Decimal to handle negative decimal
Change-Id: Ie9900145eab43a402e21c1fabc6d4d2199a2169f
2017-11-10 20:17:03 +01:00
Émilie Feral
d5fc8d139f [poincare] First version of Simplification with matrix (no tests yet!)
Change-Id: I28ad4750ad31995836b23725f7d715669fcb7ae2
2017-11-10 15:22:33 +01:00
Émilie Feral
8aa4444337 [poincare] Rather check for undefined operand in shallowReduce instead
of in deepReduce

Change-Id: I6db09297c75867178d83f27909f915b53ec161c9
2017-11-10 15:13:44 +01:00
Émilie Feral
f0af91321a [poincare] Change name: simplify->reduce
Change-Id: I7291c9f46406cc0f4b612090422aaecad45115c8
2017-11-03 15:38:23 +01:00