This method is used to remove extraneous empty sapce in the middle of
the window for functions that are discontinuous between their points of
interest.
To find the optimal range with a specified ratio, we compute the values
of the function on a default range, then center the Y axis to display
the maximum number of points of the function.
Unreal's derivate method returns true, to signify that it is unchanged
by the derivation operation. This implementation mostly exists for
documentation, as an Unreal derivand will be handled by the
defaultShallowReduce method.
The general formula for deriving a power makes use of the logarithm,
which often disappears at simplification. However, replacing the symbol
before simplifying can lead to applying an invalid argument to the
logarithm, making the whole expression invalid.
e.g. diff(1/x,x,-2)
If x is replaced by -2 before reducing the power derivative, ln(-2)
will reduce to Unreal, as will the rest of the expression.
The classic differentiation forumals for trigonometric functions assume
a variable in radians. A multiplicative constant must be added when
another unit is used.
Change-Id: Iec428acd7d93e415fddb184300437ae09d1d997c
The logarithm function is undefined for negative numbers, but its
derivative, the inverse function, is defined everywhere. We thus need to
virtually limit the domain of definition of the derivative.
Functions with a single point of inerest used to be drawn on a tiny
interval around this point.
Now, an orthonormal window is built around the point of interest, giving
a much nicer view.
Change-Id: I7793797aead2695532ddea44d93d62bb7ef870f4
When looking for extrema in a function, we need to discard results where
the function growth rate is smaller than the precision of the float type
itself : these results are likely to be too noisy, and can cause false
positives.
e.g. : The sqrt(x^2+1)-x function
Change-Id: I6e2c002d7308b41a4c226d274cbb5d9efe4ea7db
Do not use the bounds of the interval when computing a refined range.
As the bounds are often integers, the zoom would give strange result on
some non-continuous functions (e.g. f(x) = x!).
Change-Id: Ie127fe15191cb3951cff223adc8dc3172188c789
The algorithm to search for points of interest will miss some. We reduce
the step to make it more precise, so that tan(x) and tan(x-90) have the
same profile.
Change-Id: Ia1bac1d4e7b98d2d6f36f8ce12ed9dac67d40198
Allow removing empty columns with backspace, the same way one can remove
empty rows. This allows deleting the internal columns that are not
automatically deleted.
Change-Id: I52def7939257942a8396721d01c4d1531ef90361
Empty columns and rows are only removed automatically when they are the
last row/column. This way, the user can edit a median row/column without
the matrix collapsing.
Change-Id: If611fa0133f270d785809d433ae879879b6b093f