But, while we're all posting wishlists, one thing that'd be nice is if it simplified unnecessarily complex compound units in the result. In the simplest case, it's able to do this, canceling out literally identical units that appear in both a numerator and denominator:
> 2m/s * 2s
> 2m/s * 2s
> 2m/s * 2min
You do get that result if you explicitly ask for it,
> 2m/s * 2min -> m
Absolutely agreed. This is on my priority list and there is already an open issue which is tracked here:
> = 25
> = 35
On Linux, set up a `Compose key`. That makes `°` become `Compose o o`. If you're on Windows, a useful thing to do is enable the US-International keyboard so that you can more easily type characters with accents, so you can type Pokémon properly. US-International also respects the AltGR/Right alt to compose many characters . For example, I can type ² by pressing AltGr+2 which really is quite easy. I can also type ° by pressing AltGr+Shift+;
However, everything the examples inspired me to try fails. 2² works but 2⁴ fails. 30° works but 30°25′8″ fails. 10×3÷4 fails. ‘pi’ and ‘hbar’ are predefined but ‘π’ and ‘ℏ’ aren't.
Edit: should be fixed now.
> Sin[30 Degree]
> Quantity[2, "Minutes"] + Quantity[30, "Seconds"]
> UnitConvert[Quantity[6, "Megabits"/"Seconds"] *Quantity[1.5, "Hours"], "Gigabits"]
> r = Quantity[80, "Centimeters"]
> UnitConvert[Pi r^2, ("Meters")^2]
Quantity[(16 \[Pi])/25, ("Meters")^2]
> UnitConvert[Quantity[40000., "Kilometers"/"SpeedOfLight"], "Milliseconds"]
> 1.00000356237 + 0.0000001
> 3e6 + 0.1
> 3e7 + 1
> 3e7 + 1.1
> 3e7 + 42.9
This is not really a bug, but I agree that it looks quite weird right now. Explanation in this comment: https://news.ycombinator.com/item?id=13918393
One small annoyance is that it captures common browser shortcuts: e.g. Cmd-L on Mac (iirc Ctrl-L on Win/Linux) is a shortcut for the URL which is what I usually use when I want to go to another page. In insect, it just prints an "l" on screen, so I need to use the mouse to navigate elsewhere.
Ctrl-L is used to clear the screen (same as in terminals, apparently it does not work for you?), but I agree... I also use Ctrl-L to change the URL. I'll see if I can change it (this is not really part of insect, but jquery.terminal).
Just to clarify: Ctrl-L does clear the screen -- this would have been a problem on Windows, but does not bother me on a Mac; on the other hand, Cmd-L (which is the Mac shortcut for the URL) simply prints an "l".
(And I agree this is very cool, especially the way it handles physical units.)
Oddly enough, the reason I eventually stumbled Calca was trying to find a replacement for qalculate.
Anyway, nice project.
> 6Mbit/s * 1.5h
> 6Mbit/s * 1.5h -> Gb
Yes, thank you. This is already tracked here:
> It would also be nice if "month" and "year" were added. WolframAlpha uses "30 days 10 hours" for a month and 365 days for a year.
I thought about it and didn't add it at first, due to the ambiguity. But I guess these values seem like reasonable defaults.
For conversions, why use GNU Units over, say, Google in your browser? I find that most of my unit conversions happen in my browser, while I'm online. Anecdotal evidence, obviously, but is this not the case for others? Where do most people use unit conversions?
I'm also not an engineer, so I can't take that into account from experience alone. Wouldn't your tooling provide automated conversions into "correct" units?
250 lbf * 1 m/s -> kW
You can put hp or other desired units you require in the answer. It will hint on balancing the equation to make the units physically similar.
Is there a way around this without doing all computation symbolically?
A hacky solution could be to round the output of sin(x) to a given internal precision. This would only hide the real internal numerical problem, though.
It seems that other calculators suffer from the same issue: https://www.google.de/search?q=sin(1e10*pi)
For now, I have increased the internal precision to 30 significant digits and updated the value of Pi to be more precise than that. Of course, this doesn't really solve the problem... just shifts it by a few orders of magnitude :-)
Edit: Also, note that everything is fine if the answer is not zero (due to the rounding in the output):
> I would say that six sign. digits are more than enough for most applications
A better solution would be to not use a fixed number of significant digits, but to display the result with the precision of the least precise number the user entered. If you could follow the propagation of uncertainty through the calculations, that would be even better.
PS: Great job anyway, bookmarked, thanks!
> It's great that you use significant digits, but then you have to be explicit about it, and display exactly that many digits, in this case all the zeros (1,00000).
Yes, I completely agree from a statistics/physics viewpoint. The reason I display it as `1` right now is that I only have a fixed number of sign. digits (and not the sophisticated solution that you propose - which would be great!). If I always displayed all six digits, one would get `3 - 2 = 1.00000`...
> A better solution would be to not use a fixed number of significant digits, but to display the result with the precision of the least precise number the user entered. If you could follow the propagation of uncertainty through the calculations, that would be even better.
That would be fantastic. I'll look into it.
> PS: Great job anyway, bookmarked, thanks!
I'm glad you like it!
First impressions are everything. Please see in "The Psychology of Human Misjudgment" the excellent description of humans' "Influence-from-Mere-Association Tendency." The technical merits of a product will not matter if people can't get past their initial feelings. This is highly inconsiderate.
Until the name is swapped out for a more sensible one, I will not be downloading this software.