shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Calculo de Seno,Cosseno em Shell Script


From: Eduardo Lucas
Subject: Re: [shell-script] Calculo de Seno,Cosseno em Shell Script
Date: Mon, 6 Jun 2011 08:52:17 -0300

Valeu...era isso mesmo!..
Muchas gracias!

Em 5 de junho de 2011 10:42, Tiago Peczenyj <address@hidden>escreveu:

> Exato, o bc pode resolver
>
> PI, por exemplo, vc pode usar 4*a(1) e por ai vai. Outra opção é usar AWK.
>
> Vc fará algo mais complexo que isto:
> pi=$(echo "scale=10; 4*a(1)" | bc -l)
>
>
> do man bc:
>
>
>   MATH LIBRARY
>       If bc is invoked with the -l option, a math library  is  preloaded
>  and
>       the  default  scale  is  set to 20.   The math functions will
> calculate
>       their results to the scale set at the time of  their  call.   The
>  math
>       library defines the following functions:
>
>       s (x)  The sine of x, x is in radians.
>
>       c (x)  The cosine of x, x is in radians.
>
>       a (x)  The arctangent of x, arctangent returns radians.
>
>       l (x)  The natural logarithm of x.
>
>       e (x)  The exponential function of raising e to the value x.
>
>
> 2011/6/5 Cristiano Amaral <address@hidden>
>
> >
> >
> > Faz um teste com bc, deve resolver...
> >
> >
> > [As partes desta mensagem que não continham texto foram removidas]
> >
> >
> >
>
>
>
> --
> Tiago B. Peczenyj
> Linux User #405772
>
> http://pacman.blog.br
>
>
> [As partes desta mensagem que não continham texto foram removidas]
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
> Esta lista não admite a abordagem de outras liguagens de programação, como
> perl, C etc. Quem insistir em não seguir esta regra será moderado sem prévio
> aviso.
> ---------------------------------------------------------------------
> Sair da lista: address@hidden
> ---------------------------------------------------------------------
> Esta lista é moderada de acordo com o previsto em
> http://www.listas-discussao.cjb.net
> ---------------------------------------------------------------------
> Servidor Newsgroup da lista: news.gmane.org
> Grupo: gmane.org.user-groups.programming.shell.brazil
>
> Links do Yahoo! Grupos
>
>
>


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]