Émilie Feral
ecf3f2ea0f
[poincare] Create a a flag on Expression that is set when the
...
approximation encouters a complex value
All approximation methods take the complex format into account.
2019-01-10 11:42:04 +01:00
Émilie Feral
c3ad0e027c
[poincare] Create class Unreal
2019-01-10 11:42:04 +01:00
Émilie Feral
5e434a4c33
[poincare] Get rid of useless arguments in shallowReduce
2019-01-10 11:42:04 +01:00
Émilie Feral
26e2e9be0d
[poincare] Add complex format as an argument of simplification
2019-01-10 11:42:04 +01:00
Émilie Feral
1f247b731d
[poincare] Discard useless parameters of sign and isReal methods
2019-01-10 11:42:04 +01:00
Émilie Feral
3de8901c22
[poincare] Use reduce instead of setting the
...
sSimplificationHasBeenInterrupted flag and deepReducing
2019-01-10 11:42:04 +01:00
Émilie Feral
aa80710f4d
[solver] Take into account the complexFormat Real
2019-01-10 11:42:04 +01:00
Émilie Feral
6fd3a155df
[calculation] Take into account the complex format 'real'
2019-01-10 11:42:04 +01:00
Émilie Feral
b6ec84f6a9
[calculation] Clean and add tests on CalculationStore
2019-01-10 11:42:04 +01:00
Émilie Feral
ab13d137fd
[settings] Update PreferencesController with new ComplexFormat::Real
2019-01-10 11:42:04 +01:00
Émilie Feral
b83ee26636
[settings] Add a message I18n: Real
2019-01-10 11:42:04 +01:00
Émilie Feral
8bc1a7be05
[poincare] Preferences: add a ComplexFormat::Real
2019-01-10 11:42:04 +01:00
Émilie Feral
6d32c1866e
[poincare] Division: force division by 0 to be equal to NAN
...
Before x/0 = (Inf, NAN) which leads to arctan(1/0) = Pi/2.
2019-01-10 11:42:03 +01:00
Émilie Feral
5c98ff15cd
[poincare] Clean AbsoluteValue and ComplexArgument
2019-01-10 11:42:03 +01:00
Émilie Feral
9f42d5c7ec
[poincare] Trigonometry: arctan(1/x) = sign(x)Pi/2-arctan(x) only when x
...
!= 0
2019-01-10 11:42:03 +01:00
Émilie Feral
c0424089f7
[poincare] Clean Power
2019-01-10 11:42:03 +01:00
Émilie Feral
5e79949ba7
[poincare] Clean Trigonometry
2019-01-10 11:42:03 +01:00
Émilie Feral
f00f639bed
[poincare] Interrupt simplification of when too many nodes where
...
generated while bubbling up ComplexCartesian. Retry with another
ReductionTarget
2019-01-10 11:42:03 +01:00
Émilie Feral
759aee2345
[poincare] Discard wrong optimization. NAryExpression children are
...
sorted but Power(ComplexCartesian) is after ComplexCartesian in the
simplification order. ComplexCartesian are not ensure to be last ones if
some children are not real.
2019-01-10 11:42:03 +01:00
Émilie Feral
df2f6e3b6e
[poincare] Fix tests with complex cas
2019-01-10 11:42:03 +01:00
Émilie Feral
a02fd614ab
[poincare] Trigonometry: add rule arctan(1/x) = sign(x)*pi/2-arctan(x)
2019-01-10 11:42:03 +01:00
Émilie Feral
c89fec872c
[poincare] Constant: missing template declaration
2019-01-10 11:42:03 +01:00
Émilie Feral
6df1e3aee7
[poincare] Fix ComplexCartesian approximation
2019-01-10 11:42:03 +01:00
Émilie Feral
1671ee8ec8
[poincare] Fix Undefined:: isReal is false
2019-01-10 11:42:03 +01:00
Émilie Feral
0d8306aa7b
[poincare] Fix pow: do not bubble ComplexCartesian if the parent of the
...
pow is a Logarithm of the same base
2019-01-10 11:42:03 +01:00
Émilie Feral
c4758873d2
[poincare] ComplexCartesian: when computing the squareNorm, simplify
...
cos^2+sin^2
2019-01-10 11:42:03 +01:00
Émilie Feral
42aad48ec4
[solver] Fix EquationStore::oneDimensialPolynomialSolve
2019-01-10 11:42:03 +01:00
Émilie Feral
9401edfd3f
[poincare] Clean outdated comment
2019-01-10 11:42:03 +01:00
Émilie Feral
8f45cae358
[poincare] ComplexCartesian: fix bug due to clone missing
2019-01-10 11:42:03 +01:00
Émilie Feral
ff77b46276
[poincare] Power::shallowReduce. Fix bug: I complex should always be
...
shallowReduced as it turns into ComplexCartesian(0,1) if the reduction
target is the User and stays Constant(I) otherwise.
2019-01-10 11:42:03 +01:00
Émilie Feral
e4b59ddf69
[poincare] Fix Expression::simplifyAndApproximate to display polar form
...
of negative real expression. -5 --> 5*e^(i*Pi)
2019-01-10 11:42:03 +01:00
Émilie Feral
c6039423a9
[poincare] When simplifying an expression, also compute the approximation from the reduced
...
expression to avoid loss of precision.
If an expression is reduced to a ComplexCartesian(a, b), we compute the
approximation from ComplexCartesian(a,b) instead of going through the
potentially complicated expression resulting from beautifying
(sqrt(a^2+b^2)*exp(i*(arctan(b/a) -Pi/2*sign(b)) for example)
2019-01-10 11:42:03 +01:00
Émilie Feral
dae5c4d2d4
[poincare] Constant: i->ComplexCartesian(0,1) only if the reduction
...
target is the user
2019-01-10 11:42:03 +01:00
Émilie Feral
5463486d59
[poincare] Fix Power::setSign
2019-01-10 11:42:03 +01:00
Émilie Feral
38de794642
[poincare] Change signature setSign(Context, AngleUnit, ReductionTarget)
2019-01-10 11:42:03 +01:00
Émilie Feral
6794f8c802
[poincare] Add comments
2019-01-10 11:42:03 +01:00
Émilie Feral
8a00aa16cc
[poincare] Clean: remove complexCartesian and complexPolar methods
2019-01-10 11:42:03 +01:00
É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