Ulauncher: Calculator: 2^8 should return 256

Created on 28 Sep 2020  路  5Comments  路  Source: Ulauncher/Ulauncher

Current behavior

When put 2^8 to calculator, it returns 10 as a result.

Expected behavior

2^8 returns 256.

Most helpful comment

You can do it like this: 2**8
It's because Ulauncher uses Python syntax for math evaluation.
Using ^ to raise a number to a power would be a nice improvement though.

All 5 comments

Not the most required thing under the Sun, but sometimes it would be handy to quickly calculate such things.

You can do it like this: 2**8
It's because Ulauncher uses Python syntax for math evaluation.
Using ^ to raise a number to a power would be a nice improvement though.

Oh! Thank you for letting me know :+1:

Does Ulauncher supports modulo operator (%)?

@AlwaysBeCalm nope, it does not.

Ulauncher uses Python's ast.parse(expr, mode='eval') to evaluate expressions and that function doesn't seem to recognize '%' sign.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fossfreedom picture fossfreedom  路  5Comments

frdrk picture frdrk  路  4Comments

cirala picture cirala  路  3Comments

Warmuser picture Warmuser  路  3Comments

andersfylling picture andersfylling  路  5Comments