svenstaro / rofi-calc

🖩 Do live calculations in rofi!
MIT License
964 stars 31 forks source link

Found some very odd conversions, couldn't find any info about it online #118

Closed m-hrstv closed 5 months ago

m-hrstv commented 5 months ago

So just a general question, i was trying to convert 28M seconds to days last night, and typed 'in' instead of 'to', and got a very curious and funny result - it tried(and succeeded, somehow!) to convert second-inch-days to kg/nPa. Works with all kinds of other conversions too, for instance you can convert meters to calories, somehow. Is that some sort of bug or is it intended and if so - what is the logic behind it? Thank you in advance. 11

svenstaro commented 5 months ago

All of the strings are put into libqalculate. There is no math logic on our side.

m-hrstv commented 5 months ago

Alright, thank you, i'll have to look into it to satisfy my curiosity then :D

svenstaro commented 5 months ago

You can also always just use the command line tool qalc. It will give you exactly the same output as rofi. :)