Closed frozenspider closed 1 year ago
Hi, @frozenspider there is already such a function. Please try a := |-5| a = ? b := |1+2i| b = ? c := |sin(4)| c = Please see attached screenshot Or do you need an other function?
Sorry @mkulesh, got a brain fart :) What I've intended to ask for was an exact opposite of that, plus-minus operator ±
.
Corrected the issue.
Hi @frozenspider Just to better understand... If we have an expresssion with a single ± operator: a := 1 ± 2 Then the result is an array with two elements, where the first corresponds to 1 + 2, and the second corresponds to 1 - 2. That is in the case if we have two or more ± operators in the same equation: a := (1 ± 2)*(3 ± 3)? Shall the result be an array with 4 elements (that corresponds to 4 different combination) or only 2 elements (for the first element, we use "+" for all ± operators, and for the second we use "-" for all ± operators)?
I see too ways of resolving this. Either:
x := a ± b ∓ c ∓ d
would mean a + b - c - d
and a - b + c + d
As far as I'm aware, second notation is more common, e.g. cos(x ± y) = cos(x)cos(y) ∓ sin(x)sin(y)
The second notation is also easier to implemen. I think I can first implement the second notation (where results always consists of two values): x := a ± b ∓ c ∓ d would mean a + b - c - d and a - b + c + d I can start with the implementation in January. Is it ok for you?
I'm merely a petitioner, I'll be happy with whatever improvement you do :) Thanks for the great app!
Currently, no plan to fix it
Please implement a
±x
function for taking an expression with both positive and negative sign. This is useful e.g. when square roots or absolute values are involved.Initial text for historical reasons:
Please implement a|x|
function for absolute value of an expression. This is useful e.g. when square roots are involved.