Commit Graph

3656 Commits

Author SHA1 Message Date
Quentin
13874cd2e0 Merge branch 'omega-hotfix' into omega-dev 2020-04-16 14:24:47 +02:00
Quentin
f37040dc8a [Fix] Conflicts 2020-04-16 14:04:56 +02:00
Émilie Feral
675a0d3f4c Add missing definition of static member variables 2020-04-15 10:34:00 -04:00
Léa Saviot
9988447b9a [poincare] Expression::isIdenticalToWithoutParentheses 2020-04-15 09:16:32 -04:00
Romain Goyet
4d981fbfb6 [poincare] Define a member variable even if it's kind of useless
https://stackoverflow.com/questions/8016780/undefined-reference-to-static-constexpr-char
2020-04-14 09:31:02 -04:00
Romain Goyet
84768472bd Explicit std::min/max template usage
This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
644c44e069 Misc cleanups 2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Romain Goyet
807dd73e7b [poincare] Use a Tuple instead of an ArrayBuilder for expression
The Tuple is simply an initializer_list along with a convenience method
to cast between a list of TreeHandle and a list of Expression
2020-04-10 13:35:14 -04:00
Émilie Feral
ec5587904f [poincare] Unit: double comparison should be done with care. On windows
platform pow(10.0, -6.0) leads to small loss of precision and eventually
to beautify(_Mg) --> _t
2020-04-10 13:34:00 -04:00
Émilie Feral
8c844a772b [poincare] Fix tests to be passed on windows platform (approximation
issues)
2020-04-10 13:34:00 -04:00
Léa Saviot
49cd841f99 [poincare/test] Increase some test precisions 2020-04-09 13:58:56 +02:00
Léa Saviot
44fb06890e [poincare/test] Reduce asin(-1) approximation test precision
Now the computation is really done in floats
2020-04-09 13:58:56 +02:00
Neven Sajko
c92b770112 Performance fixes relating to floating point constants
This replaces unnecessary double-precision soft-float operations with
single-precision floating-point operations, mainly by casting.

In a couple places I also replace a function call with a constant.
2020-04-09 13:58:56 +02:00
Émilie Feral
82c4936e04 Coding style: remove unecessary 'virtual' keyword when 'override' is
present 1/2
2020-04-09 11:36:51 +02:00
Quentin
e383c3429f [Fix] Conflicts 2020-04-08 15:05:17 +02:00
Quentin
26d68c8039 [Update] Upstream 2020-04-08 12:48:09 +02:00
Jean-Baptiste Boric
2f61b823d0 [poincare] Remove statically-allocated buffers 2020-04-08 10:09:47 +02:00
Romain Goyet
35d446353f [escher] Avoid long switches on Left/Up/Right/Down 2020-04-08 09:56:33 +02:00
Quentin
aea963dac0 [Fix] Fix conflicts ._. 2020-04-07 14:53:19 +02:00
Romain Goyet
bfb39618e1 [poincare] Add some missing std::move 2020-04-06 10:13:14 +02:00
Quentin
e35b9c5fb1 Merge branch 'omega-dev' of github.com:Omega-Numworks/Omega into omega-dev 2020-04-01 00:17:56 +02:00
Quentin
9ecdaeeb88 Merge branch 'omega-hotfix' into omega-dev 2020-04-01 00:17:37 +02:00
Quentin
735294b91b [Git] Fix conflicts 2020-04-01 00:17:17 +02:00
Léa Saviot
620ef3f570 [poincare] Use SymbolAbstract::hasSameNameAs 2020-03-31 13:42:42 +02:00
Léa Saviot
169d6bf94d [poincare/parametered_expression] Use parameter() 2020-03-31 13:42:42 +02:00
Léa Saviot
94fb5815f9 [poincare] Fix replaceReplaceableSymbols for parametered expressions
Scenario: ans*int(0,x,0,0)->x then cos(x) crashed because replaceReplaceableSymbols
would not care if it was replacing parameters in a parametered
expression
2020-03-31 13:42:42 +02:00
David
a7c62aa176 [Feature] Made Compact Display the Default (#317)
* Made Compact Display the Default

* Made Input Field Slightly Smaller

* Removed Comma

* Fixed bug with x->a(x)

* Update escher/include/escher/expression_field.h

* Update escher/include/escher/expression_field.h
2020-03-28 17:09:00 +01:00
Quentin
0beec8f506 Merge branch 'omega-hotfix' into omega-dev 2020-03-27 21:17:09 +01:00
Quentin
6c3261b356 [Git] Fix conflicts 2020-03-27 21:16:47 +01:00
Émilie Feral
f84b3dc5c1 [poincare] Power approximation: avoid approximating a power to 0 when
one of the real/imaginary part was not null
2020-03-24 16:22:43 +01:00
Émilie Feral
7c79c70890 [poincare] When simplification has been interrupted, escape the end of
simplification. Otherwise we can be stuck in infinite loop.

This fixes the following bug: when simplifying an expression as
'bigRational1^x*bigRational2^x', we use the rule a^x*b^x --> (a¨b)^x. However,
in this case, a*b can't be reduce (resulting rational would be too big) and
we're stuck in the loop a^x*b^x --> (a¨b)^x --> a^x*b^x --> (a¨b)^x...
2020-03-24 16:22:43 +01:00
Quentin Guidée
a25bb04122 Fix conflicts 2020-03-17 21:22:31 +01:00
Quentin Guidée
b1d558617a Merge branch 'omega-hotfix' into omega-dev 2020-03-17 21:03:52 +01:00
Quentin Guidée
bfe2fc1a04 Merge remote-tracking branch 'upstream/master' into omega-hotfix 2020-03-17 20:59:23 +01:00
Émilie Feral
d222d13156 [poincare] CHange name PowerNode::tryComputeRealRootOfRationalPow -->
PowerNode::computeNotPrincipalRealRootOfRationalPow
2020-03-16 11:36:37 +01:00
Léa Saviot
da6306cb11 [poincare/multiplication] Interrupt reduction if overflow
When the overflow is due to the max size a rational can hold, stop the
reduction, otherwise some false results can appear.
For instance: 1.0092^50*ln(1.0092) was computed to 0 due to this problem
2020-03-13 14:16:43 +01:00
Léa Saviot
f00bd4d1c5 [poincare/multiplication] Factorize code 2020-03-13 14:16:43 +01:00
Léa Saviot
1e11650122 [poincare/test] Fix precision in approximation test 2020-03-13 14:16:43 +01:00
Léa Saviot
e636a2c315 [poincare/test] Add failing tests (commented but to fix later!) 2020-03-13 14:16:43 +01:00
Léa Saviot
313cbf6767 [poincare/arithmetic] Shortcut the LCM and GCD computation if equal
This fixes: LCM(7.88861e+169, 7.88861e+169), which overflowed at some
point during the computation
2020-03-13 14:16:43 +01:00
Léa Saviot
97d94d9e56 [poincare/test] Add failing test on multiplication simplification 2020-03-13 14:16:43 +01:00
LeaNumworks
13b2deb714 [poincare/approximation_helper] Clearer code
This should do the same output.
2020-03-12 14:41:50 +01:00
Léa Saviot
576d1dcd6b [poincare/power] Rename and comment computeRealRootOfRationalPow 2020-03-12 14:41:50 +01:00
Léa Saviot
175af27ea9 [poincare/approximation_helper] Factorize some code 2020-03-12 14:41:50 +01:00
Émilie Feral
879c1e3bf1 [poincare] ApproximationHelper: fix precision threshold of
NeglectRealOrImaginaryPartIfNeglectable
2020-03-12 14:41:50 +01:00
Émilie Feral
d431642e60 [poincare] Add tests on atanh approximation 2020-03-12 14:41:50 +01:00
Émilie Feral
a2e9d8efd6 [poincare] Improve trigonometry functions and power functions
approximations. We neglect the real or imaginary parts when it is
neglectable compared to the input.
2020-03-12 14:41:50 +01:00
Émilie Feral
9936d99411 [poincare] Add comment on Power::templatedApproximate 2020-03-12 14:41:50 +01:00
Émilie Feral
12a5f5499c [poincare] Handle real root finding in Power and NthRoot in order to
remove beautifying x^(p/q) -> root(x,q)^p. This triggered precision
loss!
2020-03-12 14:41:50 +01:00