Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: Doubt about...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 23 of 35 Topic 8111 of 8908
Post > Topic >>

Re: Doubt about formula transcription

by Leonardo Marques <surf3r0@[EMAIL PROTECTED] > Apr 7, 2008 at 04:11 PM

On 7 abr, 16:36, Leonardo Marques <surf...@[EMAIL PROTECTED]
> wrote:
> hey guys,
>
> im with a little problem when im transcripting a math formula from
> maple to fortran, because when i put a solution on the equation, i got
> a result diferent from zero.
>
> The formula is: 2*arctan(sin(a)*cos(a)/(.8-cos(a)^2))-4/9*Pi ;
> I've transcripted to fortran as: 2*atan((sin(a)*cos(a))/(0.8-
> cos(a)**2))-((pi)*4/9)
>
> There's correct?!
> a piece of my code:
>
> ! usando o metodo da zoada kkkkk
>       program missel
> !constantes e variaveis
>       real FUNCAO
> ! programa
>       write(*,*)'Valor de f:',FUNCAO(1.023762140);
>       end
> ! funcoes, para facilitar, tava foda ficar repetindo...
>       real function FUNCAO(a);
>       real pi,a; parameter(k=0.8,pi=3.141592653);
>       FUNCAO=dble(2*atan((sin(a)*cos(a))/(k-cos(a)**2))-((pi)*4/9))
>       return
>       end

Hey guys,

first thanks for everybody who helped at this topic.
im using de g77 compiler, and f77 is what im using now, this is a
piece of a bigger applicattion which im writinh for a discipline at
college called "numerical calculus", to find zeroes of functions by
numerical a approaching.

i really missed about the 4.0/9.0 what truncate for 0, a eliminate all
the unecessary brackets, i was trying to find the error so a i started
to put it everywhere, but now i rewrote using the preference sequence
at my mind. and the k was eliminate too.

double precision is not necessary at this moment, now i just want
fininsh a first version with single, but later would be nice use
double to get more precise results.

now i get a number really closer to zero =) maple really sux about
precision :P

i rewrote this app as this way:
! usando o metodo da zoada kkkkk
      program missel
!constantes e variaveis
      real FUNCAO,y;
! programa
      write(*,*)FUNCAO(1.023762140);
      end
! funcoes, para facilitar, tava foda ficar repetindo...
      real function FUNCAO(a);
      real pi,a; parameter(pi=3.141592653);
      FUNCAO=2*atan(sin(a)*cos(a)/(0.8-cos(a)**2))-4.0*pi/9.0;
      return
      end

thanks for all guys =)
 




 35 Posts in Topic:
Doubt about formula transcription
Leonardo Marques <surf  2008-04-07 12:36:05 
Re: Doubt about formula transcription
"Michael Metcalf&quo  2008-04-07 20:09:04 
Re: Doubt about formula transcription
fj <francois.jacq@[EMA  2008-04-07 13:34:42 
Re: Doubt about formula transcription
e p chandler <epc8@[EM  2008-04-07 13:36:08 
Re: Doubt about formula transcription
Gordon Sande <g.sande@  2008-04-07 20:38:15 
Re: Doubt about formula transcription
"James Giles" &  2008-04-07 21:11:48 
Re: Doubt about formula transcription
Gordon Sande <g.sande@  2008-04-07 21:49:55 
Re: Doubt about formula transcription
"James Giles" &  2008-04-07 21:58:11 
Re: Doubt about formula transcription
glen herrmannsfeldt <g  2008-04-07 22:33:23 
Re: Doubt about formula transcription
"Michael Metcalf&quo  2008-04-08 11:05:57 
Re: Doubt about formula transcription
"James Giles" &  2008-04-08 11:34:56 
Re: Doubt about formula transcription
glen herrmannsfeldt <g  2008-04-08 09:25:43 
Re: Doubt about formula transcription
"James Giles" &  2008-04-08 18:38:41 
Re: Doubt about formula transcription
glen herrmannsfeldt <g  2008-04-08 11:30:45 
Re: Doubt about formula transcription
"robin" <rob  2008-06-28 04:01:42 
Re: Doubt about formula transcription
"robin" <rob  2008-06-28 04:01:43 
Re: Doubt about formula transcription
glen herrmannsfeldt <g  2008-06-28 00:04:40 
Re: Doubt about formula transcription
"Tim C." <ti  2008-06-30 08:31:23 
Re: Doubt about formula transcription
"robin" <rob  2008-06-28 04:01:40 
Re: Doubt about formula transcription
glen herrmannsfeldt <g  2008-06-28 00:06:31 
Re: Doubt about formula transcription
"robin" <rob  2008-06-28 04:01:41 
Re: Doubt about formula transcription
"robin" <rob  2008-06-28 04:01:41 
Re: Doubt about formula transcription
Leonardo Marques <surf  2008-04-07 16:11:34 
Re: Doubt about formula transcription
"robin" <rob  2008-04-12 14:45:35 
Re: Doubt about formula transcription
e p chandler <epc8@[EM  2008-05-04 19:30:52 
Re: Doubt about formula transcription
glen herrmannsfeldt <g  2008-05-04 18:55:15 
Re: Doubt about formula transcription
Terence <tbwright@[EMA  2008-05-04 20:50:17 
Re: Doubt about formula transcription
robert.corbett@[EMAIL PRO  2008-06-28 01:17:25 
Re: Doubt about formula transcription
"robin" <rob  2008-07-01 03:53:20 
Re: Doubt about formula transcription
Dick Hendrickson <dick  2008-07-04 22:29:29 
Re: CRAY
"robin" <rob  2008-07-05 12:38:49 
Re: CRAY
glen herrmannsfeldt <g  2008-07-18 16:51:09 
Re: CRAY
"robin" <rob  2008-07-22 05:34:38 
Re: CRAY
Dick Hendrickson <dick  2008-07-22 15:36:05 
Re: CRAY
"robin" <rob  2008-07-23 05:14:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 8:21:01 CST 2008.