Émilie Feral
4a7a95fddf
[poincare] ComplexCartesian: improve norm on real numbers
2019-01-10 11:42:03 +01:00
Émilie Feral
2f8a65d04c
[poincare] Improve shallowReduce of AbsoluteValue, ComplexArgument,
...
ImaginaryPart, RealPart
2019-01-10 11:42:03 +01:00
Émilie Feral
cbd4f44539
[poincare] SignFunction: improve shallowReduce: sign(-x) = -sign(x)
2019-01-10 11:42:03 +01:00
Émilie Feral
68b6d4211b
[poincare] Power: improve isReal
2019-01-10 11:42:03 +01:00
Émilie Feral
5b782c3ff7
[poincare] Power: fix sqrt(-1*i) != i*sqrt(i)
2019-01-10 11:42:03 +01:00
Émilie Feral
383ac004cf
[poincare] Take into account complex format in simplify
2019-01-10 11:42:03 +01:00
Émilie Feral
4b45d40bf8
[poincare] Fix Expression::degreeToRadian
2019-01-10 11:42:03 +01:00
Émilie Feral
a6ac075442
[poincare] Fix Expression::CreateComplexExpression
2019-01-10 11:42:03 +01:00
Émilie Feral
cbef3dadb9
[poincare] Implement real and shallowReduce of ComplexCartesian on nodes: conjugate, function, symbol
2019-01-10 11:42:03 +01:00
Émilie Feral
ced136f843
[poincare] Fix ComplexCartesian::powerInteger to handle pure imaginary
...
complex
2019-01-10 11:42:03 +01:00
Émilie Feral
76ec7d3a58
[poincare] Implement ComplexCartesian::powerInteger
2019-01-10 11:42:03 +01:00
Émilie Feral
3292bdfd44
[poincare] Sketch of complex reduction as part of the reduce routine
2019-01-10 11:42:03 +01:00
Émilie Feral
e11b7ca631
[poincare] Power: improve shallowReduce using
...
makePositiveAnyNegativeNumeralFactor
2019-01-10 11:42:03 +01:00
Émilie Feral
f714699575
[poincare] Clean Expression::CreateComplexExpression
2019-01-10 11:42:03 +01:00
Émilie Feral
9efc9e02e6
[poincare] Revert simplifyForComplexFormat
2019-01-10 11:42:03 +01:00
Émilie Feral
2fe8b386c3
[poincare] Add tests on Complex
2019-01-10 11:42:03 +01:00
Émilie Feral
2e89f8b7de
[poincare] Expression::simplifyForComplexFormat: Use a shortcut if the expression approximation is a real pure
2019-01-10 11:42:03 +01:00
Émilie Feral
7d9c49919c
[poincare] simplifyForComplexFormat: before extracting
...
ComplexCartesian/ComplexPolar, deepReduce instead of simplify to avoid
generating uselessly big trees. To make it work, implement shortcuts for
Power::complexCartesian and Power::complexPolar to return nice cartesian
expression when the power index is -1, 1/2 or -1/2
2019-01-10 11:42:03 +01:00
Émilie Feral
c62922ec5c
[poincare] Change complex getters design: extract real and imaginary
...
parts at the same time in complexCartesian and norm and arg in
complexPolar
2019-01-10 11:42:03 +01:00
Émilie Feral
91163ae6f5
[poincare] Improve complexSquareNorm thanks to sign
2019-01-10 11:42:03 +01:00
Émilie Feral
64aebcf16d
[poincare] Implement shallowReduce of ComplexArgument, AbsoluteValue,
...
RealPart and ImaginaryPart
2019-01-10 11:42:03 +01:00
Émilie Feral
2f8ede54f2
[poincare] The sign function was used to decide wether an expression was
...
of form -x. However, ln(0.3) has a negative sign but is not of form -x.
This commit fixes the misuse of ExpressionNode::Sign::negative.
For example, we do not turn sin(tan(9)) in -sin(-tan(9)) or
arcsin(sin(12)) in -arcsin(-sin(12) because tan(9)<0 and sin(12)<0
2019-01-10 11:42:03 +01:00
Émilie Feral
9e2b709fcb
[poincare] Change sign() signature to sign(context, angleUnit)
2019-01-10 11:42:03 +01:00
Émilie Feral
cc83fec322
[poincare} Power::complexPolarPart: avoid an extra shallowReduce by
...
inserting *(-1) instead of an OppositeNode
2019-01-10 11:42:03 +01:00
Émilie Feral
be741415b0
[poincare] Fix comment
2019-01-10 11:42:03 +01:00
Émilie Feral
8f63416097
[calculation] Fix Calculation operator ==
2019-01-10 11:42:03 +01:00
Émilie Feral
f8251a74bc
[poincare] SquareRoot: use realPart and imaginaryPart to compute the
...
complexArgument
2019-01-10 11:42:03 +01:00
Émilie Feral
68367343ed
[poincare] Add tests on complex extractors
2019-01-10 11:42:03 +01:00
Émilie Feral
466efc1dbd
[poincare] Trigonometry: speed up the look up in the cheat table
2019-01-10 11:42:03 +01:00
Émilie Feral
d72b906919
[poincare] SquareRoot: implement realPart & imaginaryPart
2019-01-10 11:42:03 +01:00
Émilie Feral
ee0d158bd9
[poincare] Add rules on cos(arcsin), cos(arctan), sin(arccos),
...
sin(arctan), tan(arccos), tan(arcsin)
2019-01-10 11:42:03 +01:00
Émilie Feral
a13246fca1
[poincare] simplifyForComplexFormat: simplify instead of reducing before extracting
...
real and imaginary parts
2019-01-10 11:42:03 +01:00
Émilie Feral
5dae60bc7e
[poincare] Complex parts getters (realPart, imaginaryPart,
...
complexNorm...) simplify while building the complex part
2019-01-10 11:42:03 +01:00
Émilie Feral
79e7fb2183
[calculation] Use ParseAndSimplifyForComplexFormat instead of
...
ParseAndSimplify
2019-01-10 11:42:03 +01:00
Émilie Feral
56c8e8b704
[poincare] Expression: create method ParseAndSimplifyForComplexFormat
2019-01-10 11:42:03 +01:00
Émilie Feral
f452d8fced
[poincare] Fatorize code of Complex::complexToExpression in
...
Expression::CreateComplexExpression that create the expression a+i*b or
r*e^(i*th) from 2 expressions representing a & b or r & th.
2019-01-10 11:42:03 +01:00
Émilie Feral
476a79565f
[poincare] Number::setSign does not need a context or angleUnit
2019-01-10 11:42:03 +01:00
Émilie Feral
fe6a5af47b
[poincare] Change Expression::setSign signature
2019-01-10 11:42:03 +01:00
Émilie Feral
3c3f68c6c4
[poincare] Multiplication and Division implement realPart,
...
imaginaryPart and complexNorm
2019-01-10 11:42:03 +01:00
Émilie Feral
d95585956c
[poincare] Implement Expression::realPart, Expression::imaginaryPart,
...
Expression::complexNorm, Expression::complexArgument
2019-01-10 11:42:03 +01:00
Émilie Feral
0e1825817b
[poincare] Test: clean helper
...
Create a method expressions_are_equal
2019-01-10 11:42:02 +01:00
Émilie Feral
0c1e76c9c5
[poincare] Expression: add methods to get complex parts of expression
2019-01-10 11:42:02 +01:00
Émilie Feral
f8f3652687
[poincare] Expression: add radianToDegree and degreeToRadian methods
2019-01-10 11:42:02 +01:00
Émilie Feral
88a2751e6b
[poincare] Add SignFunction class
2019-01-10 11:42:02 +01:00
Émilie Feral
c4ce3c28e1
[poincare] Factorial::sign is always positive
2019-01-10 11:42:02 +01:00
Léa Saviot
fd34e83a56
[apps] In curve views, display floating labels when axes non visible
2019-01-10 11:42:02 +01:00
Léa Saviot
fa24a4fd54
[apps] Put the Y labels left of the Y axis
2019-01-10 11:42:02 +01:00
Léa Saviot
6b381957df
[apps] Handle cut labels in curves.
...
Draw all labels even if cut. If only the extrema horizontal labels are
drawn, pick the labels 1 and numberOfLabels-2 if the real extrema labels
will be cut.
2019-01-10 11:42:02 +01:00
Léa Saviot
9ac32cf8fe
[apps] Use standard variables in curve view
2019-01-10 11:42:02 +01:00
Léa Saviot
d40b17a45e
[apps] In curve view, draw the graduation even if the label is not drawn
2019-01-10 11:42:02 +01:00