[Ilugc] .a-tip-a-day. (bc - interactive calculator)

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Wed Sep 23 07:28:03 2009

On Wed, Sep 23, 2009 at 6:30 AM, Kapil Hari Paranjape <kapil@xxxxxxxxxxx> wrote:

Hello,
?$ bc -l

which is required if you want to use things like sine, cosine, etc.


This is driving me mad Kapil.

First off many thanks for this great tip. Much appreciated.

But I have a problem. How will I convert from degrees to radians?

Also sine and cosine are to be given as s() and c().

http://www.gnu.org/software/bc/manual/html_node/bc_18.html

That is not driving me mad.

But how to ask for sin(30), sin(60), sin(90) in degrees to radians?

Is there a simple math formula or will the same bc do it for me in
 non interactive mode(converting deg to radians and vice versa) ?

Apropos of that, we can use expr for non interactive math. You don't
 have exponentiation though. Also use \ before a * for multiplication!

Thanks.

-Girish

-- 
Gayatri Hitech
web: http://gayatri-hitech.com

SpamCheetah Spam filter:
http://spam-cheetah.com

Other related posts: