Commit Graph

10265 Commits

Author SHA1 Message Date
Émilie Feral
60048cb9a9 [poincare] Create a ContextWithParent that implements expressionTypeForIdentifier 2020-02-12 15:13:22 +01:00
Émilie Feral
c629cb66ba [apps/calculation] Calculation: don't memoize the display in height
computation. It has to be updated everytime an exception is raised and
this was forgotten.
2020-02-12 15:13:22 +01:00
Émilie Feral
4e948ce533 [poincare] Change Factor approximation to return undef on non real
values
2020-02-12 15:13:22 +01:00
Émilie Feral
8deb81b8c2 [apps/calculation] CalculationStore: Equal and Store node are always at
the root, no need to recursively check their presence
2020-02-12 15:13:22 +01:00
Émilie Feral
0c19b54365 [apps/calculation] Do not display additional results for Equal or Store
expressions
2020-02-12 15:13:22 +01:00
Émilie Feral
2a37fa4447 [apps/calculation] ComplexListController: change the way the
Complex model parameters are computed.

Sometimes, approximation without simplification doesn't not give the
same results as approximation after simplification. As we decided to
display the additional results from an approximation without
simplifcation (done in Expression::hasDefinedComplexApproximation), we
compute the model parameters the same way (to ensure that both
parameters are defined)
2020-02-12 15:13:21 +01:00
Émilie Feral
58a4dcf62a [poincare] Multiplication: improve splitIntoNormalForm to fill Numeral
factor (instead of returning uninitialized factors) if the multiplication is 1x1
2020-02-12 15:13:21 +01:00
Émilie Feral
8d7eebbf0e [apps/calculation] Calculation: fix variable confusion 2020-02-12 15:13:21 +01:00
Léa Saviot
f0ca8296bf [poincare/function] f(1/0) = undef when f(x) = 3 2020-02-12 15:13:21 +01:00
Léa Saviot
167fdf285f [poincare/test] Simplification test on f(1/0) when f(x) = 3 2020-02-12 15:13:21 +01:00
Léa Saviot
a3a1f86f8d [apps] Add context parameter to fix tests 2020-02-12 15:13:21 +01:00
Léa Saviot
78adca7113 [poincare/tests] Fix tests after parsing change 2020-02-12 15:13:21 +01:00
Léa Saviot
9d6bab092f [poincare/parser] Identifier is not already function -> symbol
We check the context: if an identifier is already a function, we
interpret it as such, otherwise it is a symbol.
This way, in the Equation app, x(x+1) is interpreted as x*(x+1)
2020-02-12 15:13:21 +01:00
Léa Saviot
756eeeb2d8 [poincare/parser] Add context 2020-02-12 15:13:21 +01:00
Émilie Feral
158a45e94d [apps/shared] AbstractScrollableExactApproximateExpressionsView: let the
child class decides which subview to select
2020-02-12 15:13:21 +01:00
Émilie Feral
3d3189d0dd [escher] BurgerMenuView: when drawRect, reinitialize the rectangle to
avoid corruption when re-drawing above a burger. Indeed,
blendRectWithMask pulls the current color to blend it.
2020-02-12 15:13:21 +01:00
Émilie Feral
764277fbb8 [escher] BurgerMenuView: fix masks 2020-02-12 15:13:21 +01:00
Émilie Feral
d61336936e [apps/shared] Create a class Dots to share dots masks between CurveView
and RoundCursorView. Use the same dot for illustrations of additional
results in Calculation app and Function app
2020-02-12 15:13:21 +01:00
Émilie Feral
ba159de21d [apps/calculation] Trigonometry additional results are displayed if the
input OR the output is a cosine/sine
2020-02-12 15:13:21 +01:00
Émilie Feral
f5523fe01c [apps] Slightly change the message of Empty variable box to avoid text
cropping
2020-02-12 15:13:21 +01:00
Émilie Feral
60cac1f928 [apps] Add borders to VariableBoxEmptyController 2020-02-12 15:13:21 +01:00
Émilie Feral
581756b046 [escher] Fix Bordered::drawInnerRect 2020-02-12 15:13:21 +01:00
Émilie Feral
061c96df45 [escher] Add vertical borders to StackView 2020-02-12 15:13:21 +01:00
Émilie Feral
3fa4e0838a [escher] Create a class Bordered instead of BorderedCell: this enable
non-cell view to use it as well
2020-02-12 15:13:21 +01:00
Émilie Feral
398b529811 [apps/calculation][poincare] AdditionalInformationType is determined
from both input and output expressions of a Calculation
2020-02-12 15:13:21 +01:00
Émilie Feral
be6f11208f [apps/calculation] additional_outputs: make a parent class to
TrigonometryGraphCell and ComplexGraphCell inheriting from
BorderedCell
2020-02-12 15:13:21 +01:00
Émilie Feral
235b03a923 [escher] Create a BorderedCell that draws the border around a cell and
use it in TableCell
2020-02-12 15:13:21 +01:00
Émilie Feral
404c0945f9 [apps/calculation] additional_outputs: ComplexGraphView: simplify
computation of ellipsis equation (avoid computational errors for real =
-6 and imaginary = 1E-8 for instance)
2020-02-12 15:13:21 +01:00
Émilie Feral
06fa3bba5b [apps/shared][apps/calculation] CurveView: enable to personalize the
maximal glyph length of graduation labels. Shorten them in
ComplexGraphView
2020-02-12 15:13:21 +01:00
Léa Saviot
8b250e0ca0 [apps/i18n] Fix portuguese from Portugal, not Brazil 2020-02-12 15:13:21 +01:00
Léa Saviot
22601fd8a3 [apps/settings/exam_mode] "How to deactivate" messages 2020-02-12 15:13:21 +01:00
Léa Saviot
a51d434a78 [apps/settings] Inline method 2020-02-12 15:13:21 +01:00
Léa Saviot
155d2a4758 [apps/probability] Remove unneeded parameter 2020-02-12 15:13:21 +01:00
Léa Saviot
fafa0b90d1 [poincare/vertical_offset_layout] Fix up/down navigation
Scenario: 2^2^2^2 then Down, Right, Left, Down. The final Down does
nothing.
2020-02-12 15:13:21 +01:00
Léa Saviot
f6c15198bc [apps/regression] Power regression uses logarithm of series
This matches other apps results and we directly compute the values from
the data instead of doing a gradient descent.
2020-02-12 15:13:21 +01:00
Léa Saviot
97b495a4dc [apps/interactive_curve_view_range] Orthonormal keep max grid unit
When setting the axes then putting on the orthnormalization, 2 * (max of
the two axes units) is put to 1 cm instead of doing 2 units = 1cm. This
roughly keeps the configuration of the window.
2020-02-12 15:13:21 +01:00
Léa Saviot
ac6ce97dea [python/modturtle] Allowinterruption during reset
Scenario:
fro m turtle import *
while 1==1:
  reset()
-> This script cannot be interrupted
2020-02-12 15:13:21 +01:00
Léa Saviot
97c5ef79af [apps/calc] Display ApproximateOnly if approximate layout cannot be created 2020-02-12 15:13:21 +01:00
Léa Saviot
1af28d4310 [apps/calc] Display ApproximateOnly if exact layout cannot be created 2020-02-12 15:13:21 +01:00
Émilie Feral
8e407bd01e [apps/calculation] additional_outputs: fix assertion which checks that
both real and imaginary are well defined in ComplexGraphView
2020-02-12 15:13:21 +01:00
Émilie Feral
227a52940d [poincare] Fix Function::deepReplaceReplaceableSymbols, replace
replaceable symbols in the child first

This fixes the following bug: when checking whether 'blop(g(0))' is
circularly defined with g(x) = blop(g(0)), g(0) was not checked which
triggers a crash.
2020-02-12 15:13:21 +01:00
Émilie Feral
f6dcc35bce [poincare] Standardize the convention of 'deepReplaceReplaceableSymbols'
and 'ExpressionWithoutSymbols': they return an uninitialized expression
when the expression is circularly defined
2020-02-12 15:13:21 +01:00
Émilie Feral
71a968ec05 [apps/calculation] Clean Unicode character treated as a whitespace 2020-02-12 15:13:21 +01:00
Émilie Feral
2b18f585d0 [poincare] additionalInformationType returns "Complex" only when both
real and imaginary parts are defined (not NAN or INFINITY)
2020-02-12 15:13:21 +01:00
Émilie Feral
72d1370cff [poincare] Returns a RealUndefined evaluation for Expression that are
always real.
This avoids that floor(i) is simplified to (undef, 0) but approximates
to (undef, undef)
2020-02-12 15:13:21 +01:00
Léa Saviot
0260e2ffb4 [apps/proba] Fisher distribution authorized parameter values 2020-02-12 15:13:21 +01:00
Léa Saviot
8c801392a5 [apps/proba] Fisher distribution zoom values 2020-02-12 15:13:21 +01:00
Léa Saviot
09a2d554d1 [apps/probability] Fisher tests 2020-02-12 15:13:21 +01:00
Léa Saviot
55a4e3d94c [apps/proba] Implement Fisher formulae 2020-02-12 15:13:21 +01:00
Léa Saviot
93c96186c4 [apps/probability] Initial Fisher distribution 2020-02-12 15:13:21 +01:00