Qalculate / qalculate-qt

GNU General Public License v2.0
385 stars 42 forks source link

number units #161

Open davidlovelace-ifx opened 2 months ago

davidlovelace-ifx commented 2 months ago

Testing out a simple equation of 17m 2 (where m is meant to be "milli" since I set milli in at the prompt), the result comes out as "(17 meters) x 2" and displays a as "34m", ok display, but not "meters" and if I try 17m*2, I get the same result.

Also, if I change the results format, when I type in (17m2, again selecting "milli") the result is 3410^6.

I tried a variant doing 17u*2 (selecting "micro" but got the result 34 with the comment: "- "μ" is not a valid variable/function/unit."

Finally, is there a way to simply force the use of number prefixes without the prompt and have the result display in number prefix format?

hanna-kn commented 2 months ago

Unit prefixes should generally not be used without a unit.

In Qalculate, all prefix symbols/abbreviations, except k and M, require a unit. When you select a prefix from the completion menu, you are expected enter a unit symbol immediately after. Otherwise it would not possible to differentiate between m for milli and m for meter, G for giga and G for gravitational constant, etc.

Full prefix names are however always recognized without units (e.g. 17 milli × 2 = 0.034).