Removed limitation in calculation of normal_distribution. It was used to
speed-up computation but yielded 0 for small values.
Previously P(X<5) with X->N(7,0.3162) gave 0 as a result
now it gives 1.26e-10
Change-Id: I3f1c997dfe2ba6424b372a0a82af6d9871443657
We now compute the value of the mantissa in double (instead of float)
to limit conversion error occuring for big numbers.
Change-Id: Ia61c052f0bc4a9196c53e2c7900eb48e3343d39c
New way of drawing sigma sign. Only a single branch is stored. The full
symbol is created by mirroring half a symbol.
Change-Id: I0fc32393203e51578c88b01125a907d402291534
Changed the look of the integral symbol and the positions of the upper
and lower bounds. Added a drawing of the window to explain the meaning
of various margins.
Change-Id: I3ffc07848dc9ad68dce3c0e01853d548e31dd152
Parenthesis collapsing is no longer handled by LeftParenthesisLayout and
RightParenthesisLayout, but by ParenthesisLayout itself.
Change-Id: I6797cd40ee02881544e01e9b88f31a597c51d179
Fraction are now only collapsed if they are the first thing to be
collapsed or if a parenthesis is open.
Change-Id: Ie7f3a99498b9981dff70221efd7de6bee6d0c379
Created function Layout::LayoutFromAddress, which creates in the pool a layout
that has been stored in a buffer. Functionally identical to
Expression::ExpressionFromAddress.
Change-Id: I204e6b7d42f259ef2732563aa2a168a644060867
New tests compute derivatives while replacing symbols with their definitions or undefined, as the device does.
Change-Id: I99179bf6540182ff929938fb96a00a1ed2fbcf49
Derivation now computes as expected on logarithms, as long as their base is not a function of the derivation variable.
Change-Id: Ia56da1c1151c0ddf3887be84ddb4bd02664c5188
Added a method unaryFunctionDifferential to ExpressionNode and Expression, to be implemented by subclasses representing unary functions.
Added a function derivateUnaryFunction to Derivative, to factor (f°g)' -> g' * f'°g.
Change-Id: Id1780f1082ccd001f1282fe4ddfff2b7055d3a27
Derivation now propagates to powers as expected, whether the base, the exponent, or both are functions of the variable. This also makes division derive as intended.
Change-Id: I51cbd5f7ec9f6aaa1df068625bbda1437941fa08
Derivation propagates as expected on multiplications (but not power). Some tests involving diff had to be updated to reflect that behaviour.
Change-Id: Ifa32031bc37a156c18d296757bcdd6ccdb0ea43e
Number's subclasses, with the exception of Undefined and Unreal, derive as zero. Symbols derive as expected. Derivation propagates as expected on additions.
Change-Id: Icedbb1dfac8099347a19c14bf2537011b2e8b199
This method is to be implemented by derivable expression subclasses, for use in Derivative::shallowReduce. It performs the calculation for the derivative, and returns whether calculations happened.
Change-Id: I13cdb131e2044578392f5178a9f389314c1c4c8a
Without this change, we would get weird "reduced" expression, such as
multiplication(undef, _s), but we do not always check
sSimplificationHasBeenInterrupted afterwards.