Linux's Forgotten Gem: Calculator
forget about all the nice looking graphics, the quickiest programmable calculator in linux is bc. Start it withbc -l
and you'll have a shell calculator with c-style instructions including
=,+,-,*,/,%,++,--,>,<,>=,<=,==,!=,&&,||
s(x) is sine, c(x) is cosine, a(x) is atan, l(x) is ln, e() is exp, j(n,x) is bessel function
EOF (ctrl-D) quits the program
Also, you can use it in the shell (or in a script), for example
localhost:~$ echo "(1+3)/5" | bc -l
.80000000000000000000
Finally, the -l flag is needed for floating point arithmetic, you can default this flag by putting the line
alias bc='bc -l'
in your shell start-up file
you can use "man bc" to learn more about it ok
thx for your tips on linux....
but I don't think no one would really care about it on here....
not much people are doing programming with linux on here...
頁:
[1]