Live data from Hacker News

SpeedCrunch

speedcrunch.org

81–90 of 138 posts

Re: SpeedCrunch

#81

Earlier quoted context omitted.

Is that not correct? I guess I should touch on my order of operations. I thought distributing was part of the parenthesis step, that came before MDAS.

The disconnect is that a lot of people mentally treat implicit multiplication with a higher priority than explicit, which is pretty understandable. For instance: 1/3x is likely to be understood as 1/(3*x), because otherwise it would’ve been written like x/3. If that’s true, then so surely 1/3(x) should be the same, right? Smarter people than I have argued both sides of this, and I don’t have a strong opinion except t…

The part that confuses me is why someone would think the SpeedCrunch implementation is correct:

Say again that you have 1/3x. This is implicitly stating 1/3x. However, no parenthesis are used, and multiplication & division are on the same level in the order of operations, so the expression gets evaluated sequentially from left to right.

If you have 1/3(9.8), evaluating the parenthesis gives you 9.8. So you now have 1/39.8. The expression inside the parenthesis gets evaluated first, then the final result is just multiplied by whatever precedes or succeeds the parenthetical if no other term is given. So 1/3+(9.8) would obviously evaluate to be 1/3+9.8.

Again, if the parenthesis aren't enclosing operations within themselves, then they shouldn't modify the way you'd evaluate the expression. I've had this problem with SpeedCrunch many times over and wish they would update it. Still the best desktop calculator IMO.

edit: a word

Re: SpeedCrunch

#82

echo "expression" | bc -l :)

In zsh at least, you can do also do:

echo $((expression))

It will treat values as integers by default I think, so $((1/2)) evaluates to zero. But $((1./2)) treats the 1. as something else, I guess probably a float, and so produces .5.

Re: SpeedCrunch

#84
post #81

Earlier quoted context omitted.

The disconnect is that a lot of people mentally treat implicit multiplication with a higher priority than explicit, which is pretty understandable. For instance: 1/3x is likely to be understood as 1/(3*x), because otherwise it would’ve been written like x/3. If that’s true, then so surely 1/3(x) should be the same, right? Smarter people than I have argued both sides of this, and I don’t have a strong opinion except t…

The part that confuses me is why someone would think the SpeedCrunch implementation is correct: Say again that you have 1/3x. This is implicitly stating 1/3 x. However, no parenthesis are used, and multiplication & division are on the same level in the order of operations, so the expression gets evaluated sequentially from left to right. If you have 1/3(9.8), evaluating the parenthesis gives you 9.8. So you now have…

Implied multiplication (with no operator) has a higher precedence than explicit multiplication (with an operator). Most mathematicians see it this way.

Re: SpeedCrunch

#85
post #64

Fun fact about SpeedCrunch history, the software descends from an off-hand blog post by Roberto Alsina, a KDE developer, complaining about KCalc usability [1]. Back then developers were often just unthinkingly cloning 'skeuomorphic' interfaces like Apple used back then, designing user interfaces that resembled physical objects instead of taking advantage of the opportunities afforded by computers. His blog post elici…

Original post, in the Wayback Machine: https://web.archive.org/web/20050316093428/http://ariya.pand...

Re: SpeedCrunch

#87

SpeedCrunch looks very promising, and I've used it a lot in the past. I'm sad to see that they still haven't released the order of operations bug fix [0] they made in 2017. SpeedCrunch does some operations in an order most people wouldn't expect. For example, SpeedCrunch says 1/2(-9.8) = -0.05102040816326530612 [0] - https://bitbucket.org/heldercorreia/speedcrunch/commits/ac49...

Is that not correct? I guess I should touch on my order of operations. I thought distributing was part of the parenthesis step, that came before MDAS.

It’s a question of whether the above is supposed to mean (1/2)(-9.8), or 1/(2(-9.8)). Technically it’s ambiguous (I think), in practice it’s obviously the former, because if it was the latter you’d write it as 1/(2-9.8).

Re: SpeedCrunch

#88

I used to use this back when I mained Windows. Ever since moving primarily to Linux, and getting familiar with Emacs, Calc mode simply beats every calculator I've ever used in total functionality. However, there are certain cases where I also like to use https://insect.sh if lots of units are involved.

I use calc as well, especially practical in combination with guake ( a drop-down quake style console: https://github.com/Guake/guake ).

Re: SpeedCrunch

#89

I used to use this back when I mained Windows. Ever since moving primarily to Linux, and getting familiar with Emacs, Calc mode simply beats every calculator I've ever used in total functionality. However, there are certain cases where I also like to use https://insect.sh if lots of units are involved.

You may like qalc. It's an apt-get away and does all those units.

I love you.

Re: SpeedCrunch

#90
post #55

A small plug for my own script: I'm proud to present the most useful, least-work script I've ever written: `math` https://github.com/shawwn/scrap/blob/master/math #!/bin/sh scale=4 # results will print to the 4th decimal echo "scale=$scale; $@" | bc -l It just yeets all its arguments into bc -l, so you can run math 1+2-3 or math '(1024 - 7)*10' or whatever else you want. I even use it in other shell scripts, since ba…

> I miss MsPaint every day. I’m like you. On Linux there’s KolourPaint that does the job, but on macOS I never found any desktop app that does what I want. In the browser, there’s this clone [1] that mimicks all the features of the original one. You can "open" a file, "save" it, and everything in the meantime is saved in local storage. [1]: https://jspaint.app/

Also see:

https://paint.js.org/

https://paint.ssuiteoffice.com/#local:a29cc260bea4d

https://paintz.app/

Post reply on HN