Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few feature requests/ ideas, if not existing #566

Open
LSAXYZ321 opened this issue Dec 6, 2024 · 2 comments
Open

Few feature requests/ ideas, if not existing #566

LSAXYZ321 opened this issue Dec 6, 2024 · 2 comments

Comments

@LSAXYZ321
Copy link

Hope it's ok to pust the following in the "Issues" group ..
I do have a few ideas for feature requests for Qalculate, if existing I haven't found them

1: It would be great if possible, to type in a repeated sequence of digit's in the way that Qalculate can show the same as a result
Example, the fraction 2/11 if displayed with decimals shows up like the following:
0,1818…
, since sequence of digit's "18" repeat indefinitely

I haven't found a way to type a repeating sequence, e.g. using symbols for that as shown here, like the use of parentheses as an example
Repeating decimal
https://en.wikipedia.org/wiki/Repeating_decimal

This can be used, in cases where the use of a fraction isn't easy to add, like the calculated value for planck length, as:
1,616255(18)e-35 meter

2: For equations with more solutions
Since some equations have more than one solution, like in the example below:
x^2=8
x = 2,828427124746190098 or x = -2,828427124746190098

, it would be great if each solution can be accessed with full precision (by configuration), like an index number known for programming in an object collection/ variable array
The following syntax could be used for the first solution:
x(0) = 2,828427124746190098 ..... (= sqr(8))
x(1) = -2,828427124746190098 .....

  1. For multisolve, I haven't found a way to use more than 3 unknown variables like x, y, z
    If I use other letters for variables like: a, b, c
    , Qalculate fails since many letters are assigned to constants, see the examples

multisolve([x+y=10; z+y=20; x+z=24]; [x; y; z])
, solves

multisolve([a+b=10; c+b=20; a+c=24]; [a; b; c])
, fails

multisolve([v01+v02=10; v03+v02=20; v01+v03=24]; [v01; v02; v03])
, fails
It would be great if there could be made a solution for "named" variables, e.g. as in the last example

BR Lars

@hanna-kn
Copy link
Contributor

hanna-kn commented Dec 6, 2024

This can be used, in cases where the use of a fraction isn't easy to add, like the calculated value for planck length, as:
1,616255(18)e-35 meter

In this case, the digits in parenthesis does not show repeating decimals, but the uncertainty of the last two digits. This format can be used for input in Qalculate if "allow concise uncertainty input" (under Mode➞Interval Display in qalculate-gtk) is enabled (output using this format is enabled with the "concise" interval option). It is however in direct conflict with any use of parentheses for repeating decimals.

For equations with more solutions
Since some equations have more than one solution, like in the example below:
x^2=8
x = 2,828427124746190098 or x = -2,828427124746190098

, it would be great if each solution can be accessed with full precision (by configuration), like an index number known for programming in an object collection/ variable array

The solve() function returns an array of solutions, but it still cumbersome to access a single solution, unless the number of solutions are reduced by specifying the allowed range of the variable (e.g. solve(x^2=8) where x>0).

One simple solution would be to add a second argument to the answer() function (which is used for the insert value option in the history list), and to modify ans, as if solve() was used (possibly using ans2 for the second solution).

For multisolve, I haven't found a way to use more than 3 unknown variables like x, y, z
If I use other letters for variables like: a, b, c, Qalculate fails since many letters are assigned to constants

Single letters can be used for variables if preceded by backslash, e.g. \a, \b, \c. For variables with multiple letters (or digits), quotation marks can be used (e.g. "v01").

hanna-kn added a commit that referenced this issue Dec 8, 2024
@hanna-kn
Copy link
Contributor

hanna-kn commented Dec 8, 2024

ans(1) and ans(2) can now be used for the first and second solution in the result of equation in the previous expression (a(i) and a[i] is interpreted as element(a, i)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants