For fun, try to run this: `2 + 2 * 10%` in all calculators you have access to: on you phone, on your desktop, in kalk.
As they say, "the answer will surprise you" :)
As they say, "the answer will surprise you" :)
$ units
You have: 2 + 2 * 10%
Definition: 2.2
ITYM "the answer may surprise you", and in this case it did not. 2 + 2 × 10% = 2.2
At the risk of admitting my ignorance, yet more interested in learning something new: should this answer (2.2) surprise me?On MacOS the answer is 2.4
In kalk it's 2.002
On Windows it's 0.4 in simple calc, and 2 in programmer calc (and there's no % in engineering calc)
> and there's no % in engineering calc
Use 0.1 instead of 10%, it has the same vibe ;)
[0] https://www.google.com/search?gbv=1&q=2%2B2%C3%9710%25&oq=&a...
It seems like an expression like "1 * 10%" in kalk is computed as if it means "1% * 10%" => "0.01 * 0.1" => "0.001"
But, the moment you type `%`, it instead replaces `10` with `0.1`. So in the end the screen shows: 2+2x0.1 = 2.2
I guess not as surprising as you expected :-]
2 dup 100 10 */ swap 100 * + .S 220 OK