Hacker News new | ask | show | jobs
by nimih 1683 days ago
qalc[1] is also quite nice if you're looking for a command line calculator; it handles units well, but has some other fancy features, and has a very lax parser which i find to be a huge plus.

    $ qalc '0.03$/hr*1month'
    error: "r" is not a valid variable/function/unit.
    (0.03 × (USD / hour)) × (1 × month) = $21.915

    $ qalc '0.03$/h*1month -> CAD'
    (0.03 × (USD / hour)) × (1 × month) ≈ CAD 27.28388011

    $ qalc '10TB/month -> Mbit/s'
    10 × (terabyte / month) ≈ 30.42056430 megabits/s

    $ qalc 'integrate(x+x^2)'
    integrate(x + (x^2)) = x^3 / 3 + x^2 / 2 + C
[1] https://qalculate.github.io/manual/qalc.html