Re: Simple calculator
Joey Hess wrote:
> I just use bc:
>
> joey@kite:~/lab>which calc
> calc () {
> echo $* | bc -l
> }
That one´s really nice. However, bc cannot do sin(1), can it?
Rob Browning wrote:
>Seriously, if I were you, I'd probably use bc or dc with a suitable
>wrapper for command line stuff. Though in reality, *I* usually just
>do something like this:
>
> $ guile -c "(display (/ 20 13))"
> 1.53846153846154
> $
Uuh, polish notation? Not my thing I´m afraid.
John Lapeyre wrote:
>homey 3 > perl -e 'print 20/13,"\n"'
>1.53846153846154
>
> Yours is 30 characters , mine is 26. nyahhh...
But perl has way too much footprint. For this simple calculation starting a
500KB file seems to much to me.
Michael
--
Dr. Michael Meskes meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire! Use Debian GNU/Linux!
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: