Proektsoftbg / Calcpad

Free and open source software for mathematical and engineering calculations.
https://calcpad.eu
MIT License
313 stars 38 forks source link

Unit for very small or very large numbers #289

Open berkdemir opened 2 months ago

berkdemir commented 2 months ago

Hi, I wished this worked. Any workaround? ε_f_120 = ε_ca + ε_cd_120y|10^-6

hildebrandopsj commented 2 months ago

Hi, you can use permille.

image

berkdemir commented 2 months ago

That's 1000. I am talking aboudt showing the bumbers as f. ex. 4 * 10^6.

idealkindom commented 2 months ago

Hi, you can use permille.

image

She/he wants a scientific number fortmatting.

Proektsoftbg commented 2 months ago

Hi!

Thank you for your feedback. Unfortunately, there is no chance to make it work currently. Calcpad does not have number formatting. However, it can be developed in future of course. Instead, it automatically displays small numbers with scientific format:

image

This works for most cases. The threshold is bellow 10-4. After that, we consider that there are too many leading zeros to make the output readable. Maybe your number is a bit larger. It is also possible to make this threshold customizable. What do you think?

BTW, I like the idea to use the unit conversion syntax for that. It looks very natural for Calcpad.

berkdemir commented 2 months ago

Yes, I have two problems here:

But, if you liked the idea of "| number", maybe we can have following rules for "number units"? a = 2000 | E3 = 2 x 10^3 a = 200000 | E6 = 0.2 x 10^6

I don't know if there is a need for representing other numbers. For example: a = 2000 | 500 = 4 x 500. I don't think so for now.

So, if we save the E to do this, I think it would be very simple, what do you think?

idealkindom commented 2 months ago

Hi!

Thank you for your feedback. Unfortunately, there is no chance to make it work currently. Calcpad does not have number formatting. However, it can be developed in future of course. Instead, it automatically displays small numbers with scientific format: image This works for most cases. The threshold is bellow 10-4. After that, we consider that there are too many leading zeros to make the output readable. Maybe your number is a bit larger. It is also possible to make this threshold customizable. What do you think?

BTW, I like the idea to use the unit conversion syntax for that. It looks very natural for Calcpad.

He/She has some uinit like με for shrinkage, which is the same with rad, a non dimensional unit, which is of use for engineering analysis.

berkdemir commented 2 months ago

Exactly @idealkindom, but to generalize the solution I think the following solution I proposed would be better:

But, if you liked the idea of "| number", maybe we can have following rules for "number units"? a = 2000 | E3 = 2 x 10^3 a = 200000 | E6 = 0.2 x 10^6

Proektsoftbg commented 2 months ago

@berkdemir Thank you! This is a good idea. I will consider it for the future versions.