3 ms·
Do you know about the `units` command? $ units Currency exchange rates from www.timegenie.com on 2017-08-24 2980 units, 109 prefixes, 96 nonlinear units
by jxcl 9y ago
Do you know about the `units` command?
$ units
Currency exchange rates from www.timegenie.com on 2017-08-24
2980 units, 109 prefixes, 96 nonlinear units
You have: 5 lbs
You want: kg
* 2.2679619
/ 0.44092452
You have: 100 furlongs
You want: meters
* 20116.8
/ 4.9709695e-05
You have: 100 miles/hour
You want: meters/second
* 44.704
/ 0.022369363
You have: 2 kiloisraelnewshekels
You want: picodollars
* 5.5271109e+14
/ 1.8092635e-15
- iainmerrick 9y agoI didn't know about that! Strange interface, though -- why isn't the first response just "2.27kg"?
- jxcl 9y agoBecause a kg goes into 5 lbs 2.2679619 times, and 5 lbs goes into 1 kg 0.44092452 times.
- iainmerrick 9y agoThe first number is the one I want, pretty much 100% of the time, and I hardly ever need 8 digits of precision.
- marcosdumay 9y agoI like `qalc` a lot: > 5 pounds to kg 5 * pound = approx. 2.2679619 kg > x^2 + 8*x = 4 ((x^2) + (8 * x)) = 4 = approx. x = 0.47213595 or x = -8.472136 And so on.
- dredmorbius 9y agoUnits absolutely rocks. It can do quite complex calculations as well, and you can add to the units it knows.